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
Click to show internal directories.
Click to hide internal directories.