Documentation ¶
Index ¶
- Constants
- Variables
- func NewProxyExtractorStore(cdc codec.BinaryCodec, store sdk.KVStore) proxyExtractorStore
- type ClientState
- func (cs ClientState) CheckHeaderAndUpdateState(ctx sdk.Context, cdc codec.BinaryCodec, clientStore sdk.KVStore, ...) (exported.ClientState, exported.ConsensusState, error)
- func (cs *ClientState) CheckMisbehaviourAndUpdateState(ctx sdk.Context, cdc codec.BinaryCodec, store sdk.KVStore, ...) (exported.ClientState, error)
- func (cs *ClientState) CheckSubstituteAndUpdateState(ctx sdk.Context, cdc codec.BinaryCodec, subjectClientStore sdk.KVStore, ...) (exported.ClientState, error)
- func (cs *ClientState) ClientType() string
- func (*ClientState) Descriptor() ([]byte, []int)
- func (cs *ClientState) ExportMetadata(store sdk.KVStore) []exported.GenesisMetadata
- func (cs *ClientState) GetLatestHeight() exported.Height
- func (cs *ClientState) GetProofSpecs() []*ics23.ProofSpec
- func (cs *ClientState) GetProxyClientState() exported.ClientState
- func (cs *ClientState) IBCVerifyClientConsensusState(store sdk.KVStore, cdc codec.BinaryCodec, height exported.Height, ...) error
- func (cs *ClientState) IBCVerifyClientState(store sdk.KVStore, cdc codec.BinaryCodec, height exported.Height, ...) error
- func (cs *ClientState) Initialize(ctx sdk.Context, cdc codec.BinaryCodec, clientStore sdk.KVStore, ...) error
- func (cs *ClientState) IsInitialized() bool
- 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) Size() (n int)
- func (cs *ClientState) Status(ctx sdk.Context, clientStore sdk.KVStore, cdc codec.BinaryCodec) exported.Status
- func (m *ClientState) String() string
- func (m *ClientState) Unmarshal(dAtA []byte) error
- func (cs *ClientState) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error
- func (cs *ClientState) Validate() error
- func (cs *ClientState) VerifyChannelState(store sdk.KVStore, cdc codec.BinaryCodec, height exported.Height, ...) error
- func (cs *ClientState) VerifyClientConsensusState(store sdk.KVStore, cdc codec.BinaryCodec, height exported.Height, ...) error
- func (cs *ClientState) VerifyClientState(store sdk.KVStore, cdc codec.BinaryCodec, height exported.Height, ...) error
- func (cs *ClientState) VerifyConnectionState(store sdk.KVStore, cdc codec.BinaryCodec, height exported.Height, ...) error
- func (cs *ClientState) VerifyNextSequenceRecv(ctx sdk.Context, store sdk.KVStore, cdc codec.BinaryCodec, ...) error
- func (cs *ClientState) VerifyPacketAcknowledgement(ctx sdk.Context, store sdk.KVStore, cdc codec.BinaryCodec, ...) error
- func (cs *ClientState) VerifyPacketCommitment(ctx sdk.Context, store sdk.KVStore, cdc codec.BinaryCodec, ...) error
- func (cs *ClientState) VerifyPacketReceiptAbsence(ctx sdk.Context, store sdk.KVStore, cdc codec.BinaryCodec, ...) error
- func (cs *ClientState) VerifyUpgradeAndUpdateState(ctx sdk.Context, cdc codec.BinaryCodec, store sdk.KVStore, ...) (exported.ClientState, exported.ConsensusState, 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
- func (cs *ClientState) ZeroCustomFields() exported.ClientState
- type ConsensusState
- func (cs *ConsensusState) ClientType() string
- func (*ConsensusState) Descriptor() ([]byte, []int)
- func (cs *ConsensusState) GetProxyConsensusState() exported.ConsensusState
- func (cs *ConsensusState) GetRoot() exported.Root
- func (cs *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 (cs *ConsensusState) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error
- func (cs *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
Constants ¶
const ProxyClientType string = "proxyclient"
Variables ¶
Functions ¶
func NewProxyExtractorStore ¶
func NewProxyExtractorStore(cdc codec.BinaryCodec, store sdk.KVStore) proxyExtractorStore
Types ¶
type ClientState ¶
type ClientState struct { // client state corresponding to proxy // the type must implements ClientState interface ProxyClientState *types.Any `protobuf:"bytes,1,opt,name=proxy_client_state,json=proxyClientState,proto3" json:"proxy_client_state,omitempty"` // client id corresponding to upstream on proxy UpstreamClientId string `protobuf:"bytes,2,opt,name=upstream_client_id,json=upstreamClientId,proto3" json:"upstream_client_id,omitempty"` // the proxy commitment prefix of the proxy chain. ProxyPrefix *types1.MerklePrefix `protobuf:"bytes,3,opt,name=proxy_prefix,json=proxyPrefix,proto3" json:"proxy_prefix,omitempty"` // the ibc commitment prefix of the proxy chain IbcPrefix *types1.MerklePrefix `protobuf:"bytes,4,opt,name=ibc_prefix,json=ibcPrefix,proto3" json:"ibc_prefix,omitempty"` }
func NewClientState ¶
func NewClientState(upstreamClientID string) *ClientState
func (ClientState) CheckHeaderAndUpdateState ¶
func (cs ClientState) CheckHeaderAndUpdateState(ctx sdk.Context, cdc codec.BinaryCodec, clientStore sdk.KVStore, header exported.Header) (exported.ClientState, exported.ConsensusState, error)
Update and Misbehaviour functions
func (*ClientState) CheckMisbehaviourAndUpdateState ¶
func (cs *ClientState) CheckMisbehaviourAndUpdateState(ctx sdk.Context, cdc codec.BinaryCodec, store sdk.KVStore, misbehaviour exported.Misbehaviour) (exported.ClientState, error)
func (*ClientState) CheckSubstituteAndUpdateState ¶
func (cs *ClientState) CheckSubstituteAndUpdateState(ctx sdk.Context, cdc codec.BinaryCodec, subjectClientStore sdk.KVStore, substituteClientStore sdk.KVStore, substituteClient exported.ClientState) (exported.ClientState, error)
func (*ClientState) ClientType ¶
func (cs *ClientState) ClientType() string
func (*ClientState) Descriptor ¶
func (*ClientState) Descriptor() ([]byte, []int)
func (*ClientState) ExportMetadata ¶
func (cs *ClientState) ExportMetadata(store sdk.KVStore) []exported.GenesisMetadata
Genesis function
func (*ClientState) GetLatestHeight ¶
func (cs *ClientState) GetLatestHeight() exported.Height
func (*ClientState) GetProofSpecs ¶
func (cs *ClientState) GetProofSpecs() []*ics23.ProofSpec
func (*ClientState) GetProxyClientState ¶
func (cs *ClientState) GetProxyClientState() exported.ClientState
func (*ClientState) IBCVerifyClientConsensusState ¶
func (cs *ClientState) IBCVerifyClientConsensusState(store sdk.KVStore, cdc codec.BinaryCodec, height exported.Height, counterpartyClientIdentifier string, consensusHeight exported.Height, prefix exported.Prefix, proof []byte, consensusState exported.ConsensusState) error
IBC verification function
func (*ClientState) IBCVerifyClientState ¶
func (cs *ClientState) IBCVerifyClientState(store sdk.KVStore, cdc codec.BinaryCodec, height exported.Height, prefix exported.Prefix, counterpartyClientIdentifier string, proof []byte, clientState exported.ClientState) error
IBC verification function
func (*ClientState) Initialize ¶
func (cs *ClientState) Initialize(ctx sdk.Context, cdc codec.BinaryCodec, clientStore sdk.KVStore, consState exported.ConsensusState) error
Initialization function Clients must validate the initial consensus state, and may store any client-specific metadata necessary for correct light client operation
func (*ClientState) IsInitialized ¶
func (cs *ClientState) IsInitialized() bool
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) Size ¶
func (m *ClientState) Size() (n int)
func (*ClientState) Status ¶
func (cs *ClientState) Status( ctx sdk.Context, clientStore 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) UnpackInterfaces ¶
func (cs *ClientState) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error
UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces
func (*ClientState) Validate ¶
func (cs *ClientState) Validate() error
func (*ClientState) VerifyChannelState ¶
func (*ClientState) VerifyClientConsensusState ¶
func (*ClientState) VerifyClientState ¶
func (cs *ClientState) VerifyClientState(store sdk.KVStore, cdc codec.BinaryCodec, height exported.Height, prefix exported.Prefix, counterpartyClientIdentifier string, proof []byte, clientState exported.ClientState) error
State verification functions
func (*ClientState) VerifyConnectionState ¶
func (cs *ClientState) VerifyConnectionState(store sdk.KVStore, cdc codec.BinaryCodec, height exported.Height, prefix exported.Prefix, proof []byte, connectionID string, connectionEnd exported.ConnectionI) error
func (*ClientState) VerifyNextSequenceRecv ¶
func (*ClientState) VerifyPacketAcknowledgement ¶
func (*ClientState) VerifyPacketCommitment ¶
func (*ClientState) VerifyPacketReceiptAbsence ¶
func (*ClientState) VerifyUpgradeAndUpdateState ¶
func (cs *ClientState) VerifyUpgradeAndUpdateState(ctx sdk.Context, cdc codec.BinaryCodec, store sdk.KVStore, newClient exported.ClientState, newConsState exported.ConsensusState, proofUpgradeClient []byte, proofUpgradeConsState []byte) (exported.ClientState, exported.ConsensusState, error)
Upgrade functions NOTE: proof heights are not included as upgrade to a new revision is expected to pass only on the last height committed by the current revision. Clients are responsible for ensuring that the planned last height of the current revision is somehow encoded in the proof verification process. This is to ensure that no premature upgrades occur, since upgrade plans committed to by the counterparty may be cancelled or modified before the last planned height.
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
func (*ClientState) ZeroCustomFields ¶
func (cs *ClientState) ZeroCustomFields() exported.ClientState
Utility function that zeroes out any client customizable fields in client state Ledger enforced fields are maintained while all custom fields are zero values Used to verify upgrades
type ConsensusState ¶
type ConsensusState struct { // consensus state corresponding to proxy // the type must implements ConsensusState interface ProxyConsensusState *types.Any `protobuf:"bytes,1,opt,name=proxy_consensus_state,json=proxyConsensusState,proto3" json:"proxy_consensus_state,omitempty"` }
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 NewConsensusState ¶
func NewConsensusState(consensusState *codectypes.Any) *ConsensusState
func (*ConsensusState) ClientType ¶
func (cs *ConsensusState) ClientType() string
func (*ConsensusState) Descriptor ¶
func (*ConsensusState) Descriptor() ([]byte, []int)
func (*ConsensusState) GetProxyConsensusState ¶
func (cs *ConsensusState) GetProxyConsensusState() exported.ConsensusState
func (*ConsensusState) GetRoot ¶
func (cs *ConsensusState) GetRoot() exported.Root
GetRoot returns the commitment root of the consensus state, which is used for key-value pair verification.
func (*ConsensusState) GetTimestamp ¶
func (cs *ConsensusState) GetTimestamp() uint64
GetTimestamp returns the timestamp (in nanoseconds) of the consensus state
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) UnpackInterfaces ¶
func (cs *ConsensusState) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error
UnpackInterfaces implements UnpackInterfacesMessage.UnpackInterfaces
func (*ConsensusState) ValidateBasic ¶
func (cs *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