eth

package
v0.0.0-...-a76333c Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthEth        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowEth          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupEth = fmt.Errorf("proto: unexpected end of group")
)

Functions

func RegisterInterfaces

func RegisterInterfaces(registry types.InterfaceRegistry)

Types

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) ClientType

func (m ClientState) ClientType() string

func (*ClientState) Descriptor

func (*ClientState) Descriptor() ([]byte, []int)

func (ClientState) GetDelayBlock

func (m ClientState) GetDelayBlock() uint64

func (ClientState) GetDelayTime

func (m ClientState) GetDelayTime() uint64

func (ClientState) GetLatestHeight

func (m ClientState) GetLatestHeight() tibctypes.Height

func (ClientState) GetPrefix

func (m ClientState) GetPrefix() tibctypes.Prefix

func (*ClientState) Marshal

func (m *ClientState) Marshal() (dAtA []byte, err error)

func (*ClientState) MarshalTo

func (m *ClientState) MarshalTo(dAtA []byte) (int, 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) Size

func (m *ClientState) Size() (n int)

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) 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 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    client.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 (*ConsensusState) ClientType

func (m *ConsensusState) ClientType() string

func (*ConsensusState) Descriptor

func (*ConsensusState) Descriptor() ([]byte, []int)

func (*ConsensusState) GetRoot

func (m *ConsensusState) GetRoot() tibctypes.Root

func (*ConsensusState) GetTimestamp

func (m *ConsensusState) GetTimestamp() uint64

func (*ConsensusState) Marshal

func (m *ConsensusState) Marshal() (dAtA []byte, err error)

func (*ConsensusState) MarshalTo

func (m *ConsensusState) MarshalTo(dAtA []byte) (int, 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.

func (EthHeader) ToHeader

func (h EthHeader) ToHeader() 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      client.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 (h Header) ClientType() string

func (*Header) Descriptor

func (*Header) Descriptor() ([]byte, []int)

func (Header) GetHeight

func (h Header) GetHeight() tibctypes.Height

func (*Header) Hash

func (h *Header) Hash() common.Hash

Hash returns the block hash of the header, which is simply the keccak256 hash of its RLP encoding.

func (*Header) Marshal

func (m *Header) Marshal() (dAtA []byte, err error)

func (*Header) MarshalTo

func (m *Header) MarshalTo(dAtA []byte) (int, error)

func (*Header) MarshalToSizedBuffer

func (m *Header) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Header) ProtoMessage

func (*Header) ProtoMessage()

func (*Header) Reset

func (m *Header) Reset()

func (*Header) Size

func (m *Header) Size() (n int)

func (*Header) String

func (m *Header) String() string

func (Header) ToEthHeader

func (h Header) ToEthHeader() EthHeader

func (*Header) Unmarshal

func (m *Header) Unmarshal(dAtA []byte) error

func (Header) ValidateBasic

func (h Header) ValidateBasic() error

func (*Header) XXX_DiscardUnknown

func (m *Header) XXX_DiscardUnknown()

func (*Header) XXX_Marshal

func (m *Header) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Header) XXX_Merge

func (m *Header) XXX_Merge(src proto.Message)

func (*Header) XXX_Size

func (m *Header) XXX_Size() int

func (*Header) XXX_Unmarshal

func (m *Header) XXX_Unmarshal(b []byte) error

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) Descriptor() ([]byte, []int)

func (*Proof) Marshal

func (m *Proof) Marshal() (dAtA []byte, err error)

func (*Proof) MarshalTo

func (m *Proof) MarshalTo(dAtA []byte) (int, error)

func (*Proof) MarshalToSizedBuffer

func (m *Proof) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Proof) ProtoMessage

func (*Proof) ProtoMessage()

func (*Proof) Reset

func (m *Proof) Reset()

func (*Proof) Size

func (m *Proof) Size() (n int)

func (*Proof) String

func (m *Proof) String() string

func (*Proof) Unmarshal

func (m *Proof) Unmarshal(dAtA []byte) error

func (*Proof) XXX_DiscardUnknown

func (m *Proof) XXX_DiscardUnknown()

func (*Proof) XXX_Marshal

func (m *Proof) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Proof) XXX_Merge

func (m *Proof) XXX_Merge(src proto.Message)

func (*Proof) XXX_Size

func (m *Proof) XXX_Size() int

func (*Proof) XXX_Unmarshal

func (m *Proof) XXX_Unmarshal(b []byte) error

type ProofAccount

type ProofAccount struct {
	Nonce    *big.Int
	Balance  *big.Int
	Storage  common.Hash
	Codehash common.Hash
}

ProofAccount ...

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) MarshalTo

func (m *StorageResult) MarshalTo(dAtA []byte) (int, 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

Jump to

Keyboard shortcuts

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