validator

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountResult

type AccountResult struct {
	Address      geth.Address    `json:"address"`
	AccountProof []string        `json:"accountProof"`
	Balance      *hexutil.Big    `json:"balance"`
	CodeHash     geth.Hash       `json:"codeHash"`
	Nonce        hexutil.Uint64  `json:"nonce"`
	StorageHash  geth.Hash       `json:"storageHash"`
	StorageProof []StorageResult `json:"storageProof"`
}

Result structs for eth_getProof

type StorageResult

type StorageResult struct {
	Key   string       `json:"key"`
	Value *hexutil.Big `json:"value"`
	Proof []string     `json:"proof"`
}

Result structs for eth_getProof

type TrustlessValidator

type TrustlessValidator interface {
	ValidateBlock(block *EthTypes.Block, receipts EthTypes.Receipts, hash geth.Hash) error
	ValidateAccount(ctx context.Context, balanceResponse *types.AccountBalanceResponse, address string) error
	ValidateAccountState(result AccountResult, stateRoot geth.Hash, blockNumber *big.Int) error
	GetAccountProof(ctx context.Context, account geth.Address, blockNumber *big.Int) (AccountResult, error)
	GetBlockStateRoot(ctx context.Context, blockNumber *big.Int) (geth.Hash, error)
}

func NewEthereumValidator

func NewEthereumValidator(cfg *config.Configuration) TrustlessValidator

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL