types

package
v0.0.0-...-201aeb4 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2022 License: Apache-2.0 Imports: 19 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthMultiv        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMultiv          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMultiv = fmt.Errorf("proto: unexpected end of group")
)

Functions

func RegisterInterfaces

func RegisterInterfaces(registry codectypes.InterfaceRegistry)

RegisterInterfaces registers the commitment interfaces to protobuf Any.

Types

type ClientState

type ClientState struct {
	UnderlyingClientState *types.Any `` /* 126-byte string literal not displayed */
	Depth                 uint32     `protobuf:"varint,2,opt,name=depth,proto3" json:"depth,omitempty"`
}

func NewClientState

func NewClientState(clientState exported.ClientState, depth uint32) *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) GetUnderlyingClientState

func (cs *ClientState) GetUnderlyingClientState() exported.ClientState

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) 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) 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 (cs *ClientState) VerifyChannelState(store sdk.KVStore, cdc codec.BinaryCodec, height exported.Height, prefix exported.Prefix, proof []byte, portID string, channelID string, channel exported.ChannelI) error

func (*ClientState) VerifyClientConsensusState

func (cs *ClientState) VerifyClientConsensusState(store sdk.KVStore, cdc codec.BinaryCodec, height exported.Height, counterpartyClientIdentifier string, consensusHeight exported.Height, prefix exported.Prefix, proofBytes []byte, consensusState exported.ConsensusState) error

func (*ClientState) VerifyClientState

func (cs *ClientState) VerifyClientState(store sdk.KVStore, cdc codec.BinaryCodec, height exported.Height, prefix exported.Prefix, counterpartyClientIdentifier string, proofBytes []byte, clientState exported.ClientState) error

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 (cs *ClientState) VerifyNextSequenceRecv(ctx sdk.Context, store sdk.KVStore, cdc codec.BinaryCodec, height exported.Height, currentTimestamp uint64, delayPeriod uint64, prefix exported.Prefix, proof []byte, portID string, channelID string, nextSequenceRecv uint64) error

func (*ClientState) VerifyPacketAcknowledgement

func (cs *ClientState) VerifyPacketAcknowledgement(ctx sdk.Context, store sdk.KVStore, cdc codec.BinaryCodec, height exported.Height, currentTimestamp uint64, delayPeriod uint64, prefix exported.Prefix, proof []byte, portID string, channelID string, sequence uint64, acknowledgement []byte) error

func (*ClientState) VerifyPacketCommitment

func (cs *ClientState) VerifyPacketCommitment(ctx sdk.Context, store sdk.KVStore, cdc codec.BinaryCodec, height exported.Height, currentTimestamp uint64, delayPeriod uint64, prefix exported.Prefix, proof []byte, portID string, channelID string, sequence uint64, commitmentBytes []byte) error

func (*ClientState) VerifyPacketReceiptAbsence

func (cs *ClientState) VerifyPacketReceiptAbsence(ctx sdk.Context, store sdk.KVStore, cdc codec.BinaryCodec, height exported.Height, currentTimestamp uint64, delayPeriod uint64, prefix exported.Prefix, proof []byte, portID string, channelID string, sequence uint64) error

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 LeafProof

type LeafProof struct {
	Proof       []byte        `protobuf:"bytes,1,opt,name=proof,proto3" json:"proof,omitempty"`
	ProofHeight types1.Height `protobuf:"bytes,2,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"`
}

func (*LeafProof) Descriptor

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

func (*LeafProof) Marshal

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

func (*LeafProof) MarshalTo

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

func (*LeafProof) MarshalToSizedBuffer

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

func (*LeafProof) ProtoMessage

func (*LeafProof) ProtoMessage()

func (*LeafProof) Reset

func (m *LeafProof) Reset()

func (*LeafProof) Size

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

func (*LeafProof) String

func (m *LeafProof) String() string

func (*LeafProof) Unmarshal

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

func (*LeafProof) XXX_DiscardUnknown

func (m *LeafProof) XXX_DiscardUnknown()

func (*LeafProof) XXX_Marshal

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

func (*LeafProof) XXX_Merge

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

func (*LeafProof) XXX_Size

func (m *LeafProof) XXX_Size() int

func (*LeafProof) XXX_Unmarshal

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

type MultiProof

type MultiProof struct {
	Head     Proof     `protobuf:"bytes,1,opt,name=head,proto3" json:"head"`
	Branches []Proof   `protobuf:"bytes,2,rep,name=branches,proto3" json:"branches"`
	Leaf     LeafProof `protobuf:"bytes,3,opt,name=leaf,proto3" json:"leaf"`
}

func (*MultiProof) Descriptor

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

func (*MultiProof) Empty

func (p *MultiProof) Empty() bool

func (*MultiProof) Marshal

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

func (*MultiProof) MarshalTo

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

func (*MultiProof) MarshalToSizedBuffer

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

func (*MultiProof) ProtoMessage

func (*MultiProof) ProtoMessage()

func (*MultiProof) Reset

func (m *MultiProof) Reset()

func (*MultiProof) Size

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

func (*MultiProof) String

func (m *MultiProof) String() string

func (*MultiProof) Unmarshal

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

func (*MultiProof) ValidateBasic

func (p *MultiProof) ValidateBasic() error

func (*MultiProof) VerifyMembership

func (p *MultiProof) VerifyMembership(_ []*ics23.ProofSpec, _ exported.Root, _ exported.Path, _ []byte) error

func (*MultiProof) VerifyNonMembership

func (p *MultiProof) VerifyNonMembership(_ []*ics23.ProofSpec, _ exported.Root, _ exported.Path) error

func (*MultiProof) XXX_DiscardUnknown

func (m *MultiProof) XXX_DiscardUnknown()

func (*MultiProof) XXX_Marshal

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

func (*MultiProof) XXX_Merge

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

func (*MultiProof) XXX_Size

func (m *MultiProof) XXX_Size() int

func (*MultiProof) XXX_Unmarshal

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

type Proof

type Proof struct {
	ClientProof     []byte        `protobuf:"bytes,1,opt,name=client_proof,json=clientProof,proto3" json:"client_proof,omitempty"`
	ClientState     *types.Any    `protobuf:"bytes,2,opt,name=client_state,json=clientState,proto3" json:"client_state,omitempty"`
	ConsensusProof  []byte        `protobuf:"bytes,3,opt,name=consensus_proof,json=consensusProof,proto3" json:"consensus_proof,omitempty"`
	ConsensusState  *types.Any    `protobuf:"bytes,4,opt,name=consensus_state,json=consensusState,proto3" json:"consensus_state,omitempty"`
	ProofHeight     types1.Height `protobuf:"bytes,5,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height"`
	ConsensusHeight types1.Height `protobuf:"bytes,6,opt,name=consensus_height,json=consensusHeight,proto3" json:"consensus_height"`
}

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

Jump to

Keyboard shortcuts

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