Documentation ¶
Index ¶
- Constants
- Variables
- func CalcBaseFee(parent *Header) *big.Int
- func EthHeaderIndexKey(hash common.Hash, height uint64) []byte
- func EthHeaderIndexPath(hash common.Hash, height uint64) string
- func EthRootMainKey(root common.Hash, height uint64) []byte
- func EthRootMainPath(root common.Hash, height uint64) string
- func GetHeaderIndexKeyByEthConsensusRoot(clientStore sdk.KVStore, root common.Hash, height uint64) []byte
- func GetHeightFromIterationKey(iterKey []byte) exported.Height
- func GetIterator(store sdk.KVStore, keyType string) types.Iterator
- func GetParentHeaderFromIndex(clientStore sdk.KVStore, header Header) []byte
- func IterateConsensusStateAscending(clientStore sdk.KVStore, cb func(height exported.Height) (stop bool))
- func IteratorEthMetaDataByPrefix(store sdk.KVStore, keyType string, cb func(key, val []byte) bool)
- func RegisterInterfaces(registry codectypes.InterfaceRegistry)
- func SeedHash(block uint64) []byte
- func SetEthConsensusRoot(clientStore sdk.KVStore, height uint64, root, headerHash common.Hash)
- func SetEthHeaderIndex(clientStore sdk.KVStore, header Header, headerBytes []byte)
- func VerifyEip1559Header(parent, header *Header) error
- func VerifyGaslimit(parentGasLimit, headerGasLimit uint64) error
- type API
- type ClientState
- func (m ClientState) CheckHeaderAndUpdateState(ctx sdk.Context, cdc codec.BinaryCodec, store sdk.KVStore, ...) (exported.ClientState, exported.ConsensusState, error)
- func (m ClientState) ClientType() string
- func (*ClientState) Descriptor() ([]byte, []int)
- func (m ClientState) ExportMetadata(store sdk.KVStore) []exported.GenesisMetadata
- func (m ClientState) GetDelayBlock() uint64
- func (m ClientState) GetDelayTime() uint64
- func (m ClientState) GetLatestHeight() exported.Height
- func (m ClientState) GetPrefix() exported.Prefix
- func (m ClientState) Initialize(ctx sdk.Context, cdc codec.BinaryCodec, store sdk.KVStore, ...) error
- func (m *ClientState) Marshal() (dAtA []byte, err error)
- func (m *ClientState) MarshalTo(dAtA []byte) (int, error)
- func (m *ClientState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ClientState) ProtoMessage()
- func (m *ClientState) Reset()
- func (m ClientState) RestrictChain(cdc codec.BinaryCodec, store sdk.KVStore, new Header) error
- func (m *ClientState) Size() (n int)
- func (m ClientState) Status(ctx sdk.Context, store sdk.KVStore, cdc codec.BinaryCodec) exported.Status
- func (m *ClientState) String() string
- func (m *ClientState) Unmarshal(dAtA []byte) error
- func (m ClientState) Validate() error
- func (m ClientState) VerifyPacketAcknowledgement(ctx sdk.Context, store sdk.KVStore, cdc codec.BinaryCodec, ...) error
- func (m ClientState) VerifyPacketCleanCommitment(ctx sdk.Context, store sdk.KVStore, cdc codec.BinaryCodec, ...) error
- func (m ClientState) VerifyPacketCommitment(ctx sdk.Context, store sdk.KVStore, cdc codec.BinaryCodec, ...) error
- func (m *ClientState) XXX_DiscardUnknown()
- func (m *ClientState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ClientState) XXX_Merge(src proto.Message)
- func (m *ClientState) XXX_Size() int
- func (m *ClientState) XXX_Unmarshal(b []byte) error
- type Config
- type ConsensusState
- func (m *ConsensusState) ClientType() string
- func (*ConsensusState) Descriptor() ([]byte, []int)
- func (m *ConsensusState) GetRoot() exported.Root
- func (m *ConsensusState) GetTimestamp() uint64
- func (m *ConsensusState) Marshal() (dAtA []byte, err error)
- func (m *ConsensusState) MarshalTo(dAtA []byte) (int, error)
- func (m *ConsensusState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ConsensusState) ProtoMessage()
- func (m *ConsensusState) Reset()
- func (m *ConsensusState) Size() (n int)
- func (m *ConsensusState) String() string
- func (m *ConsensusState) Unmarshal(dAtA []byte) error
- func (m *ConsensusState) ValidateBasic() error
- func (m *ConsensusState) XXX_DiscardUnknown()
- func (m *ConsensusState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ConsensusState) XXX_Merge(src proto.Message)
- func (m *ConsensusState) XXX_Size() int
- func (m *ConsensusState) XXX_Unmarshal(b []byte) error
- type EthHeader
- type Ethash
- func (ethash *Ethash) APIs(chain consensus.ChainHeaderReader) []rpc.API
- func (ethash *Ethash) Close() error
- func (ethash *Ethash) Hashrate() float64
- func (ethash *Ethash) Seal(chain consensus.ChainHeaderReader, block *types.Block, ...) error
- func (ethash *Ethash) SealHash(header *ethtypes.Header) (hash common.Hash)
- func (ethash *Ethash) SetThreads(threads int)
- func (ethash *Ethash) Threads() int
- func (ethash *Ethash) VerifySeal(header *types.Header, fulldag bool) error
- type Header
- func (h Header) ClientType() string
- func (*Header) Descriptor() ([]byte, []int)
- func (h Header) GetHeight() exported.Height
- func (h *Header) Hash() common.Hash
- func (m *Header) Marshal() (dAtA []byte, err error)
- func (m *Header) MarshalTo(dAtA []byte) (int, error)
- func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Header) ProtoMessage()
- func (m *Header) Reset()
- func (m *Header) Size() (n int)
- func (m *Header) String() string
- func (h Header) ToEthHeader() EthHeader
- func (h Header) ToVerifyHeader() *types.Header
- func (m *Header) Unmarshal(dAtA []byte) error
- func (h Header) ValidateBasic() error
- func (m *Header) XXX_DiscardUnknown()
- func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Header) XXX_Merge(src proto.Message)
- func (m *Header) XXX_Size() int
- func (m *Header) XXX_Unmarshal(b []byte) error
- type Mode
- type Proof
- func (*Proof) Descriptor() ([]byte, []int)
- func (m *Proof) Marshal() (dAtA []byte, err error)
- func (m *Proof) MarshalTo(dAtA []byte) (int, error)
- func (m *Proof) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Proof) ProtoMessage()
- func (m *Proof) Reset()
- func (m *Proof) Size() (n int)
- func (m *Proof) String() string
- func (m *Proof) Unmarshal(dAtA []byte) error
- func (m *Proof) XXX_DiscardUnknown()
- func (m *Proof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Proof) XXX_Merge(src proto.Message)
- func (m *Proof) XXX_Size() int
- func (m *Proof) XXX_Unmarshal(b []byte) error
- type ProofAccount
- type ProofKeyConstructor
- type StorageResult
- func (*StorageResult) Descriptor() ([]byte, []int)
- func (m *StorageResult) Marshal() (dAtA []byte, err error)
- func (m *StorageResult) MarshalTo(dAtA []byte) (int, error)
- func (m *StorageResult) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*StorageResult) ProtoMessage()
- func (m *StorageResult) Reset()
- func (m *StorageResult) Size() (n int)
- func (m *StorageResult) String() string
- func (m *StorageResult) Unmarshal(dAtA []byte) error
- func (m *StorageResult) XXX_DiscardUnknown()
- func (m *StorageResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *StorageResult) XXX_Merge(src proto.Message)
- func (m *StorageResult) XXX_Size() int
- func (m *StorageResult) XXX_Unmarshal(b []byte) error
Constants ¶
const ( BaseFeeChangeDenominator = 8 // Bounds the amount the base fee can change between blocks. ElasticityMultiplier = 2 // Bounds the maximum gas limit an EIP-1559 block may have. InitialBaseFee = 1000000000 // Initial base fee for EIP-1559 blocks. )
const (
SubModuleName = "eth-client"
)
Variables ¶
var ( ErrInvalidGenesisBlock = sdkerrors.Register(moduleName, 2, "invalid genesis block") ErrFutureBlock = sdkerrors.Register(moduleName, 3, "block in the future") // ErrInvalidMixDigest is returned if a block's mix digest is non-zero. ErrInvalidMixDigest = sdkerrors.Register(moduleName, 4, "non-zero mix digest") // ErrInvalidDifficulty is returned if the difficulty of a block is missing. ErrInvalidDifficulty = sdkerrors.Register(moduleName, 5, "invalid difficulty") ErrUnknownAncestor = sdkerrors.Register(moduleName, 6, "unknown ancestor") // ErrWrongDifficulty is returned if the difficulty of a block doesn't match the // turn of the signer. ErrWrongDifficulty = sdkerrors.Register(moduleName, 7, "wrong difficulty") ErrInvalidProof = sdkerrors.Register(moduleName, 8, "invalid proof") // ErrHeaderIsExist is returned if the header already in store ErrHeaderIsExist = sdkerrors.Register(moduleName, 9, "header already exist") // ErrUnmarshalInterface is returned if interface can not unmarshal ErrUnmarshalInterface = sdkerrors.Register(moduleName, 10, "unmarshal field") // ErrExtraLenth is returned if extra data is to long ErrExtraLenth = sdkerrors.Register(moduleName, 11, "extra-data to long") // ErrInvalidGas is returned if gas data is invalid ErrInvalidGas = sdkerrors.Register(moduleName, 12, "gas invalid") // ErrHeader is returned if the header invalid ErrHeader = sdkerrors.Register(moduleName, 13, "header invalid") // ErrMarshalInterface is returned if struct can not marshal ErrMarshalInterface = sdkerrors.Register(moduleName, 14, "marshal field") )
TIBC bsc client sentinel errors
var ( ErrInvalidLengthEth = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowEth = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupEth = fmt.Errorf("proto: unexpected end of group") )
var ( KeyIndexEthHeaderPrefix = "ethHeaderIndex" KeyMainRootPrefix = "ethRootMain" )
var (
DifficultyCalculatorParams = int64(9700000)
)
var ErrInvalidDumpMagic = errors.New("invalid dump magic")
Functions ¶
func CalcBaseFee ¶
CalcBaseFee calculates the basefee of the header.
func GetHeightFromIterationKey ¶
GetHeightFromIterationKey takes an iteration key and returns the height that it references
func IterateConsensusStateAscending ¶
func IterateConsensusStateAscending(clientStore sdk.KVStore, cb func(height exported.Height) (stop bool))
IterateConsensusStateAscending iterates through the consensus states in ascending order. It calls the provided callback on each height, until stop=true is returned.
func RegisterInterfaces ¶
func RegisterInterfaces(registry codectypes.InterfaceRegistry)
RegisterInterfaces registers the tendermint concrete client-related implementations and interfaces.
func SeedHash ¶
SeedHash is the seed to use for generating a verification cache and the mining dataset.
func SetEthConsensusRoot ¶
SetEthConsensusRoot sets the consensus metadata with the provided values
func SetEthHeaderIndex ¶
func VerifyEip1559Header ¶
VerifyEip1559Header verifies some header attributes which were changed in EIP-1559, - gas limit check - basefee check
func VerifyGaslimit ¶
VerifyGaslimit verifies the header gas limit according increase/decrease in relation to the parent gas limit.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API exposes ethash related methods for the RPC interface.
type ClientState ¶
type ClientState struct { Header Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header"` ChainId uint64 `protobuf:"varint,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` ContractAddress []byte `protobuf:"bytes,3,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` TrustingPeriod uint64 `protobuf:"varint,4,opt,name=trusting_period,json=trustingPeriod,proto3" json:"trusting_period,omitempty"` TimeDelay uint64 `protobuf:"varint,5,opt,name=timeDelay,proto3" json:"timeDelay,omitempty"` BlockDelay uint64 `protobuf:"varint,6,opt,name=blockDelay,proto3" json:"blockDelay,omitempty"` }
ClientState from eth tracks the current validator set, latest height, and a possible frozen height.
func (ClientState) CheckHeaderAndUpdateState ¶
func (m ClientState) CheckHeaderAndUpdateState( ctx sdk.Context, cdc codec.BinaryCodec, store sdk.KVStore, header exported.Header, ) ( exported.ClientState, exported.ConsensusState, error, )
func (ClientState) ClientType ¶
func (m ClientState) ClientType() string
func (*ClientState) Descriptor ¶
func (*ClientState) Descriptor() ([]byte, []int)
func (ClientState) ExportMetadata ¶
func (m ClientState) ExportMetadata(store sdk.KVStore) []exported.GenesisMetadata
func (ClientState) GetDelayBlock ¶
func (m ClientState) GetDelayBlock() uint64
func (ClientState) GetDelayTime ¶
func (m ClientState) GetDelayTime() uint64
func (ClientState) GetLatestHeight ¶
func (m ClientState) GetLatestHeight() exported.Height
func (ClientState) GetPrefix ¶
func (m ClientState) GetPrefix() exported.Prefix
func (ClientState) Initialize ¶
func (m ClientState) Initialize( ctx sdk.Context, cdc codec.BinaryCodec, store sdk.KVStore, state exported.ConsensusState, ) error
func (*ClientState) Marshal ¶
func (m *ClientState) Marshal() (dAtA []byte, err error)
func (*ClientState) MarshalToSizedBuffer ¶
func (m *ClientState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ClientState) ProtoMessage ¶
func (*ClientState) ProtoMessage()
func (*ClientState) Reset ¶
func (m *ClientState) Reset()
func (ClientState) RestrictChain ¶
func (m ClientState) RestrictChain(cdc codec.BinaryCodec, store sdk.KVStore, new Header) error
func (*ClientState) Size ¶
func (m *ClientState) Size() (n int)
func (ClientState) Status ¶
func (m ClientState) Status( ctx sdk.Context, store sdk.KVStore, cdc codec.BinaryCodec, ) exported.Status
func (*ClientState) String ¶
func (m *ClientState) String() string
func (*ClientState) Unmarshal ¶
func (m *ClientState) Unmarshal(dAtA []byte) error
func (ClientState) Validate ¶
func (m ClientState) Validate() error
func (ClientState) VerifyPacketAcknowledgement ¶
func (ClientState) VerifyPacketCleanCommitment ¶
func (ClientState) VerifyPacketCommitment ¶
func (*ClientState) XXX_DiscardUnknown ¶
func (m *ClientState) XXX_DiscardUnknown()
func (*ClientState) XXX_Marshal ¶
func (m *ClientState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ClientState) XXX_Merge ¶
func (m *ClientState) XXX_Merge(src proto.Message)
func (*ClientState) XXX_Size ¶
func (m *ClientState) XXX_Size() int
func (*ClientState) XXX_Unmarshal ¶
func (m *ClientState) XXX_Unmarshal(b []byte) error
type Config ¶
type Config struct { CacheDir string CachesInMem int CachesOnDisk int CachesLockMmap bool DatasetDir string DatasetsInMem int DatasetsOnDisk int DatasetsLockMmap bool PowMode Mode // When set, notifications sent by the remote sealer will // be block header JSON objects instead of work package arrays. NotifyFull bool Log log.Logger `toml:"-"` }
Config are the configuration parameters of the ethash.
type ConsensusState ¶
type ConsensusState struct { // timestamp that corresponds to the block height in which the ConsensusState // was stored. Timestamp uint64 `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"` Number types.Height `protobuf:"bytes,2,opt,name=number,proto3" json:"number"` Root []byte `protobuf:"bytes,3,opt,name=root,proto3" json:"root,omitempty"` }
ConsensusState defines the consensus state from eth.
func GetConsensusState ¶
func GetConsensusState(store sdk.KVStore, cdc codec.BinaryCodec, height exported.Height) (*ConsensusState, error)
GetConsensusState retrieves the consensus state from the client prefixed store. An error is returned if the consensus state does not exist.
func (*ConsensusState) ClientType ¶
func (m *ConsensusState) ClientType() string
func (*ConsensusState) Descriptor ¶
func (*ConsensusState) Descriptor() ([]byte, []int)
func (*ConsensusState) GetRoot ¶
func (m *ConsensusState) GetRoot() exported.Root
func (*ConsensusState) GetTimestamp ¶
func (m *ConsensusState) GetTimestamp() uint64
func (*ConsensusState) Marshal ¶
func (m *ConsensusState) Marshal() (dAtA []byte, err error)
func (*ConsensusState) MarshalToSizedBuffer ¶
func (m *ConsensusState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ConsensusState) ProtoMessage ¶
func (*ConsensusState) ProtoMessage()
func (*ConsensusState) Reset ¶
func (m *ConsensusState) Reset()
func (*ConsensusState) Size ¶
func (m *ConsensusState) Size() (n int)
func (*ConsensusState) String ¶
func (m *ConsensusState) String() string
func (*ConsensusState) Unmarshal ¶
func (m *ConsensusState) Unmarshal(dAtA []byte) error
func (*ConsensusState) ValidateBasic ¶
func (m *ConsensusState) ValidateBasic() error
func (*ConsensusState) XXX_DiscardUnknown ¶
func (m *ConsensusState) XXX_DiscardUnknown()
func (*ConsensusState) XXX_Marshal ¶
func (m *ConsensusState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ConsensusState) XXX_Merge ¶
func (m *ConsensusState) XXX_Merge(src proto.Message)
func (*ConsensusState) XXX_Size ¶
func (m *ConsensusState) XXX_Size() int
func (*ConsensusState) XXX_Unmarshal ¶
func (m *ConsensusState) XXX_Unmarshal(b []byte) error
type EthHeader ¶
type EthHeader struct { ParentHash common.Hash `json:"parentHash" gencodec:"required"` UncleHash common.Hash `json:"sha3Uncles" gencodec:"required"` Coinbase common.Address `json:"miner" gencodec:"required"` Root common.Hash `json:"stateRoot" gencodec:"required"` TxHash common.Hash `json:"transactionsRoot" gencodec:"required"` ReceiptHash common.Hash `json:"receiptsRoot" gencodec:"required"` Bloom types.Bloom `json:"logsBloom" gencodec:"required"` Difficulty *big.Int `json:"difficulty" gencodec:"required"` Number *big.Int `json:"number" gencodec:"required"` GasLimit uint64 `json:"gasLimit" gencodec:"required"` GasUsed uint64 `json:"gasUsed" gencodec:"required"` Time uint64 `json:"timestamp" gencodec:"required"` Extra []byte `json:"extraData" gencodec:"required"` MixDigest common.Hash `json:"mixHash"` Nonce types.BlockNonce `json:"nonce"` // BaseFee was added by EIP-1559 and is ignored in legacy headers. BaseFee *big.Int `json:"baseFeePerGas" rlp:"optional"` }
EthHeader represents a block header in the Ethereum blockchain.
type Ethash ¶
type Ethash struct {
// contains filtered or unexported fields
}
Ethash is a consensus engine based on proof-of-work implementing the ethash algorithm.
func New ¶
New creates a full sized ethash PoW scheme and starts a background thread for remote mining, also optionally notifying a batch of remote services of new work packages.
func NewFaker ¶
func NewFaker() *Ethash
NewFaker creates a ethash consensus engine with a fake PoW scheme that accepts all blocks' seal as valid, though they still have to conform to the Ethereum consensus rules.
func NewTester ¶
NewTester creates a small sized ethash PoW scheme useful only for testing purposes.
func (*Ethash) APIs ¶
func (ethash *Ethash) APIs(chain consensus.ChainHeaderReader) []rpc.API
APIs implements consensus.Engine, returning the user facing RPC APIs.
func (*Ethash) Hashrate ¶
Hashrate implements PoW, returning the measured rate of the search invocations per second over the last minute. Note the returned hashrate includes local hashrate, but also includes the total hashrate of all remote miner.
func (*Ethash) Seal ¶
func (ethash *Ethash) Seal(chain consensus.ChainHeaderReader, block *types.Block, results chan<- *types.Block, stop <-chan struct{}) error
Seal implements consensus.Engine, attempting to find a nonce that satisfies the block's difficulty requirements.
func (*Ethash) SetThreads ¶
SetThreads updates the number of mining threads currently enabled. Calling this method does not start mining, only sets the thread count. If zero is specified, the miner will use all cores of the machine. Setting a thread count below zero is allowed and will cause the miner to idle, without any work being done.
type Header ¶
type Header struct { ParentHash []byte `protobuf:"bytes,1,opt,name=parent_hash,json=parentHash,proto3" json:"parent_hash,omitempty"` UncleHash []byte `protobuf:"bytes,2,opt,name=uncle_hash,json=uncleHash,proto3" json:"uncle_hash,omitempty"` Coinbase []byte `protobuf:"bytes,3,opt,name=coinbase,proto3" json:"coinbase,omitempty"` Root []byte `protobuf:"bytes,4,opt,name=root,proto3" json:"root,omitempty"` TxHash []byte `protobuf:"bytes,5,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` ReceiptHash []byte `protobuf:"bytes,6,opt,name=receipt_hash,json=receiptHash,proto3" json:"receipt_hash,omitempty"` Bloom []byte `protobuf:"bytes,7,opt,name=bloom,proto3" json:"bloom,omitempty"` Difficulty string `protobuf:"bytes,8,opt,name=difficulty,proto3" json:"difficulty,omitempty"` Height types.Height `protobuf:"bytes,9,opt,name=height,proto3" json:"height"` GasLimit uint64 `protobuf:"varint,10,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` GasUsed uint64 `protobuf:"varint,11,opt,name=gas_used,json=gasUsed,proto3" json:"gas_used,omitempty"` Time uint64 `protobuf:"varint,12,opt,name=time,proto3" json:"time,omitempty"` Extra []byte `protobuf:"bytes,13,opt,name=extra,proto3" json:"extra,omitempty"` MixDigest []byte `protobuf:"bytes,14,opt,name=mix_digest,json=mixDigest,proto3" json:"mix_digest,omitempty"` Nonce uint64 `protobuf:"varint,15,opt,name=nonce,proto3" json:"nonce,omitempty"` BaseFee string `protobuf:"bytes,16,opt,name=baseFee,proto3" json:"baseFee,omitempty"` }
Header defines the eth client consensus Header.
func (Header) ClientType ¶
func (*Header) Descriptor ¶
func (*Header) Hash ¶
Hash returns the block hash of the header, which is simply the keccak256 hash of its RLP encoding.
func (*Header) MarshalToSizedBuffer ¶
func (*Header) ProtoMessage ¶
func (*Header) ProtoMessage()
func (Header) ToEthHeader ¶
func (Header) ToVerifyHeader ¶
func (Header) ValidateBasic ¶
func (*Header) XXX_DiscardUnknown ¶
func (m *Header) XXX_DiscardUnknown()
func (*Header) XXX_Marshal ¶
func (*Header) XXX_Unmarshal ¶
type Mode ¶
type Mode uint
Mode defines the type and amount of PoW verification an ethash engine makes.
type Proof ¶
type Proof struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` Balance string `protobuf:"bytes,2,opt,name=balance,proto3" json:"balance,omitempty"` CodeHash string `protobuf:"bytes,3,opt,name=code_hash,json=codeHash,proto3" json:"code_hash,omitempty"` Nonce string `protobuf:"bytes,4,opt,name=nonce,proto3" json:"nonce,omitempty"` StorageHash string `protobuf:"bytes,5,opt,name=storage_hash,json=storageHash,proto3" json:"storage_hash,omitempty"` AccountProof []string `protobuf:"bytes,6,rep,name=account_proof,json=accountProof,proto3" json:"account_proof,omitempty"` StorageProof []*StorageResult `protobuf:"bytes,7,rep,name=storage_proof,json=storageProof,proto3" json:"storage_proof,omitempty"` }
func (*Proof) Descriptor ¶
func (*Proof) ProtoMessage ¶
func (*Proof) ProtoMessage()
func (*Proof) XXX_DiscardUnknown ¶
func (m *Proof) XXX_DiscardUnknown()
func (*Proof) XXX_Marshal ¶
func (*Proof) XXX_Unmarshal ¶
type ProofAccount ¶
type ProofAccount struct { Nonce *big.Int Balance *big.Int Storage common.Hash Codehash common.Hash }
ProofAccount ...
type ProofKeyConstructor ¶
type ProofKeyConstructor struct {
// contains filtered or unexported fields
}
func NewProofKeyConstructor ¶
func NewProofKeyConstructor(sourceChain string, destChain string, sequence uint64) ProofKeyConstructor
func (ProofKeyConstructor) GetAckProofKey ¶
func (k ProofKeyConstructor) GetAckProofKey() []byte
func (ProofKeyConstructor) GetCleanPacketCommitmentProofKey ¶
func (k ProofKeyConstructor) GetCleanPacketCommitmentProofKey() []byte
func (ProofKeyConstructor) GetPacketCommitmentProofKey ¶
func (k ProofKeyConstructor) GetPacketCommitmentProofKey() []byte
type StorageResult ¶
type StorageResult struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` Proof []string `protobuf:"bytes,3,rep,name=proof,proto3" json:"proof,omitempty"` }
func (*StorageResult) Descriptor ¶
func (*StorageResult) Descriptor() ([]byte, []int)
func (*StorageResult) Marshal ¶
func (m *StorageResult) Marshal() (dAtA []byte, err error)
func (*StorageResult) MarshalToSizedBuffer ¶
func (m *StorageResult) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*StorageResult) ProtoMessage ¶
func (*StorageResult) ProtoMessage()
func (*StorageResult) Reset ¶
func (m *StorageResult) Reset()
func (*StorageResult) Size ¶
func (m *StorageResult) Size() (n int)
func (*StorageResult) String ¶
func (m *StorageResult) String() string
func (*StorageResult) Unmarshal ¶
func (m *StorageResult) Unmarshal(dAtA []byte) error
func (*StorageResult) XXX_DiscardUnknown ¶
func (m *StorageResult) XXX_DiscardUnknown()
func (*StorageResult) XXX_Marshal ¶
func (m *StorageResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*StorageResult) XXX_Merge ¶
func (m *StorageResult) XXX_Merge(src proto.Message)
func (*StorageResult) XXX_Size ¶
func (m *StorageResult) XXX_Size() int
func (*StorageResult) XXX_Unmarshal ¶
func (m *StorageResult) XXX_Unmarshal(b []byte) error