cosmos-sdk: github.com/cosmos/cosmos-sdk/x/ibc/07-tendermint/types Index | Files

package types

import "github.com/cosmos/cosmos-sdk/x/ibc/07-tendermint/types"

Index

Package Files

client_state.go codec.go consensus_state.go errors.go evidence.go fraction.go header.go msgs.go store.go tendermint.pb.go test_utils.go

Constants

const (
    TypeMsgCreateClient             string = "create_client"
    TypeMsgUpdateClient             string = "update_client"
    TypeMsgSubmitClientMisbehaviour string = "submit_client_misbehaviour"
)

Message types for the IBC client

const (
    SubModuleName = "tendermint-client"
)
const TODO = "TODO"

this is a constant to satisfy the linter

Variables

var (
    ErrInvalidChainID         = sdkerrors.Register(SubModuleName, 2, "invalid chain-id")
    ErrInvalidTrustingPeriod  = sdkerrors.Register(SubModuleName, 3, "invalid trusting period")
    ErrInvalidUnbondingPeriod = sdkerrors.Register(SubModuleName, 4, "invalid unbonding period")
    ErrInvalidHeaderHeight    = sdkerrors.Register(SubModuleName, 5, "invalid header height")
    ErrInvalidHeader          = sdkerrors.Register(SubModuleName, 6, "invalid header")
    ErrInvalidMaxClockDrift   = sdkerrors.Register(SubModuleName, 7, "invalid max clock drift")
    ErrTrustingPeriodExpired  = sdkerrors.Register(SubModuleName, 8, "time since latest trusted state has passed the trusting period")
    ErrUnbondingPeriodExpired = sdkerrors.Register(SubModuleName, 9, "time since latest trusted state has passed the unbonding period")
    ErrInvalidProofSpecs      = sdkerrors.Register(SubModuleName, 10, "invalid proof specs")
    ErrInvalidValidatorSet    = sdkerrors.Register(SubModuleName, 11, "invalid validator set")
)

IBC tendermint client sentinel errors

var (
    ErrInvalidLengthTendermint        = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowTendermint          = fmt.Errorf("proto: integer overflow")
    ErrUnexpectedEndOfGroupTendermint = fmt.Errorf("proto: unexpected end of group")
)
var DefaultTrustLevel = NewFractionFromTm(lite.DefaultTrustLevel)

DefaultTrustLevel is the tendermint light client default trust level

var (

    // SubModuleCdc references the global x/ibc/07-tendermint module codec. Note, the codec should
    // ONLY be used in certain instances of tests and for JSON encoding as Amino is
    // still used for that purpose.
    //
    // The actual codec used for serialization should be provided to x/ibc/07-tendermint and
    // defined at the application level.
    SubModuleCdc = codec.NewProtoCodec(codectypes.NewInterfaceRegistry())
)

func MakeBlockID Uses

func MakeBlockID(hash []byte, partSetSize int, partSetHash []byte) tmtypes.BlockID

Copied unimported test functions from tmtypes to use them here

func RegisterCodec Uses

func RegisterCodec(cdc *codec.LegacyAmino)

RegisterCodec registers the necessary x/ibc/07-tendermint interfaces and conrete types on the provided Amino codec. These types are used for Amino JSON serialization.

func RegisterInterfaces Uses

func RegisterInterfaces(registry codectypes.InterfaceRegistry)

RegisterInterfaces registers the tendermint concrete evidence and client-related implementations and interfaces.

func ValidCommit Uses

func ValidCommit(chainID string, commit *tmtypes.Commit, valSet *tmtypes.ValidatorSet) (err error)

ValidCommit checks if the given commit is a valid commit from the passed-in validatorset

CommitToVoteSet will panic if the commit cannot be converted to a valid voteset given the validatorset This implies that someone tried to submit evidence that wasn't actually committed by the validatorset thus we should return an error here and reject the evidence rather than panicing.

type ClientState Uses

type ClientState struct {
    ChainID    string   `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
    TrustLevel Fraction `protobuf:"bytes,2,opt,name=trust_level,json=trustLevel,proto3" json:"trust_level" yaml:"trust_level"`
    // duration of the period since the LastestTimestamp during which the
    // submitted headers are valid for upgrade
    TrustingPeriod time.Duration `protobuf:"bytes,3,opt,name=trusting_period,json=trustingPeriod,proto3,stdduration" json:"trusting_period" yaml:"trusting_period"`
    // duration of the staking unbonding period
    UnbondingPeriod time.Duration `protobuf:"bytes,4,opt,name=unbonding_period,json=unbondingPeriod,proto3,stdduration" json:"unbonding_period" yaml:"unbonding_period"`
    // defines how much new (untrusted) header's Time can drift into the future.
    MaxClockDrift time.Duration `protobuf:"bytes,5,opt,name=max_clock_drift,json=maxClockDrift,proto3,stdduration" json:"max_clock_drift" yaml:"max_clock_drift"`
    // Block height when the client was frozen due to a misbehaviour
    FrozenHeight uint64 `protobuf:"varint,6,opt,name=frozen_height,json=frozenHeight,proto3" json:"frozen_height,omitempty" yaml:"frozen_height"`
    // Latest height the client was updated to
    LatestHeight uint64 `protobuf:"varint,7,opt,name=latest_height,json=latestHeight,proto3" json:"latest_height,omitempty" yaml:"latest_height"`
    // Proof specifications used in verifying counterparty state
    ProofSpecs []*_go.ProofSpec `protobuf:"bytes,8,rep,name=proof_specs,json=proofSpecs,proto3" json:"proof_specs,omitempty" yaml:"proof_specs"`
}

ClientState from Tendermint tracks the current validator set, latest height, and a possible frozen height.

func InitializeFromMsg Uses

func InitializeFromMsg(msg *MsgCreateClient) *ClientState

InitializeFromMsg creates a tendermint client state from a CreateClientMsg

func NewClientState Uses

func NewClientState(
    chainID string, trustLevel Fraction,
    trustingPeriod, ubdPeriod, maxClockDrift time.Duration,
    latestHeight uint64, specs []*ics23.ProofSpec,
) *ClientState

NewClientState creates a new ClientState instance

func (ClientState) ClientType Uses

func (cs ClientState) ClientType() clientexported.ClientType

ClientType is tendermint.

func (*ClientState) Descriptor Uses

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

func (ClientState) GetChainID Uses

func (cs ClientState) GetChainID() string

GetChainID returns the chain-id

func (ClientState) GetFrozenHeight Uses

func (cs ClientState) GetFrozenHeight() uint64

FrozenHeight returns the height at which client is frozen NOTE: FrozenHeight is 0 if client is unfrozen

func (ClientState) GetLatestHeight Uses

func (cs ClientState) GetLatestHeight() uint64

GetLatestHeight returns latest block height.

func (ClientState) GetProofSpecs Uses

func (cs ClientState) GetProofSpecs() []*ics23.ProofSpec

GetProofSpecs returns the format the client expects for proof verification as a string array specifying the proof type for each position in chained proof

func (ClientState) IsFrozen Uses

func (cs ClientState) IsFrozen() bool

IsFrozen returns true if the frozen height has been set.

func (*ClientState) Marshal Uses

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

func (*ClientState) MarshalTo Uses

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

func (*ClientState) MarshalToSizedBuffer Uses

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

func (*ClientState) ProtoMessage Uses

func (*ClientState) ProtoMessage()

func (*ClientState) Reset Uses

func (m *ClientState) Reset()

func (*ClientState) Size Uses

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

func (*ClientState) String Uses

func (m *ClientState) String() string

func (*ClientState) Unmarshal Uses

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

func (ClientState) Validate Uses

func (cs ClientState) Validate() error

Validate performs a basic validation of the client state fields.

func (ClientState) VerifyChannelState Uses

func (cs ClientState) VerifyChannelState(
    store sdk.KVStore,
    cdc codec.BinaryMarshaler,
    height uint64,
    prefix commitmentexported.Prefix,
    proof []byte,
    portID,
    channelID string,
    channel channelexported.ChannelI,
) error

VerifyChannelState verifies a proof of the channel state of the specified channel end, under the specified port, stored on the target machine.

func (ClientState) VerifyClientConsensusState Uses

func (cs ClientState) VerifyClientConsensusState(
    store sdk.KVStore,
    cdc codec.BinaryMarshaler,
    provingRoot commitmentexported.Root,
    height uint64,
    counterpartyClientIdentifier string,
    consensusHeight uint64,
    prefix commitmentexported.Prefix,
    proof []byte,
    consensusState clientexported.ConsensusState,
) error

VerifyClientConsensusState verifies a proof of the consensus state of the Tendermint client stored on the target machine.

func (ClientState) VerifyConnectionState Uses

func (cs ClientState) VerifyConnectionState(
    store sdk.KVStore,
    cdc codec.BinaryMarshaler,
    height uint64,
    prefix commitmentexported.Prefix,
    proof []byte,
    connectionID string,
    connectionEnd connectionexported.ConnectionI,
) error

VerifyConnectionState verifies a proof of the connection state of the specified connection end stored on the target machine.

func (ClientState) VerifyNextSequenceRecv Uses

func (cs ClientState) VerifyNextSequenceRecv(
    store sdk.KVStore,
    cdc codec.BinaryMarshaler,
    height uint64,
    prefix commitmentexported.Prefix,
    proof []byte,
    portID,
    channelID string,
    nextSequenceRecv uint64,
) error

VerifyNextSequenceRecv verifies a proof of the next sequence number to be received of the specified channel at the specified port.

func (ClientState) VerifyPacketAcknowledgement Uses

func (cs ClientState) VerifyPacketAcknowledgement(
    store sdk.KVStore,
    cdc codec.BinaryMarshaler,
    height uint64,
    prefix commitmentexported.Prefix,
    proof []byte,
    portID,
    channelID string,
    sequence uint64,
    acknowledgement []byte,
) error

VerifyPacketAcknowledgement verifies a proof of an incoming packet acknowledgement at the specified port, specified channel, and specified sequence.

func (ClientState) VerifyPacketAcknowledgementAbsence Uses

func (cs ClientState) VerifyPacketAcknowledgementAbsence(
    store sdk.KVStore,
    cdc codec.BinaryMarshaler,
    height uint64,
    prefix commitmentexported.Prefix,
    proof []byte,
    portID,
    channelID string,
    sequence uint64,
) error

VerifyPacketAcknowledgementAbsence verifies a proof of the absence of an incoming packet acknowledgement at the specified port, specified channel, and specified sequence.

func (ClientState) VerifyPacketCommitment Uses

func (cs ClientState) VerifyPacketCommitment(
    store sdk.KVStore,
    cdc codec.BinaryMarshaler,
    height uint64,
    prefix commitmentexported.Prefix,
    proof []byte,
    portID,
    channelID string,
    sequence uint64,
    commitmentBytes []byte,
) error

VerifyPacketCommitment verifies a proof of an outgoing packet commitment at the specified port, specified channel, and specified sequence.

func (*ClientState) XXX_DiscardUnknown Uses

func (m *ClientState) XXX_DiscardUnknown()

func (*ClientState) XXX_Marshal Uses

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

func (*ClientState) XXX_Merge Uses

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

func (*ClientState) XXX_Size Uses

func (m *ClientState) XXX_Size() int

func (*ClientState) XXX_Unmarshal Uses

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

type ConsensusState Uses

type ConsensusState struct {
    // timestamp that corresponds to the block height in which the ConsensusState
    // was stored.
    Timestamp time.Time `protobuf:"bytes,1,opt,name=timestamp,proto3,stdtime" json:"timestamp"`
    // commitment root (i.e app hash)
    Root types.MerkleRoot `protobuf:"bytes,2,opt,name=root,proto3" json:"root"`
    // height at which the consensus state was stored.
    Height             uint64                                               `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
    NextValidatorsHash github_com_tendermint_tendermint_libs_bytes.HexBytes `protobuf:"bytes,4,opt,name=next_validators_hash,json=nextValidatorsHash,proto3,casttype=github.com/tendermint/tendermint/libs/bytes.HexBytes" json:"next_validators_hash,omitempty" yaml:"next_validators_hash"`
}

ConsensusState defines the consensus state from Tendermint.

func GetConsensusState Uses

func GetConsensusState(store sdk.KVStore, cdc codec.BinaryMarshaler, height uint64) (*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 Uses

func NewConsensusState(
    timestamp time.Time, root commitmenttypes.MerkleRoot, height uint64,
    nextValsHash tmbytes.HexBytes,
) *ConsensusState

NewConsensusState creates a new ConsensusState instance.

func (ConsensusState) ClientType Uses

func (ConsensusState) ClientType() clientexported.ClientType

ClientType returns Tendermint

func (*ConsensusState) Descriptor Uses

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

func (ConsensusState) GetHeight Uses

func (cs ConsensusState) GetHeight() uint64

GetHeight returns the height for the specific consensus state

func (ConsensusState) GetRoot Uses

func (cs ConsensusState) GetRoot() commitmentexported.Root

GetRoot returns the commitment Root for the specific

func (ConsensusState) GetTimestamp Uses

func (cs ConsensusState) GetTimestamp() uint64

GetTimestamp returns block time in nanoseconds at which the consensus state was stored

func (*ConsensusState) Marshal Uses

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

func (*ConsensusState) MarshalTo Uses

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

func (*ConsensusState) MarshalToSizedBuffer Uses

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

func (*ConsensusState) ProtoMessage Uses

func (*ConsensusState) ProtoMessage()

func (*ConsensusState) Reset Uses

func (m *ConsensusState) Reset()

func (*ConsensusState) Size Uses

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

func (*ConsensusState) String Uses

func (m *ConsensusState) String() string

func (*ConsensusState) Unmarshal Uses

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

func (ConsensusState) ValidateBasic Uses

func (cs ConsensusState) ValidateBasic() error

ValidateBasic defines a basic validation for the tendermint consensus state.

func (*ConsensusState) XXX_DiscardUnknown Uses

func (m *ConsensusState) XXX_DiscardUnknown()

func (*ConsensusState) XXX_Marshal Uses

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

func (*ConsensusState) XXX_Merge Uses

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

func (*ConsensusState) XXX_Size Uses

func (m *ConsensusState) XXX_Size() int

func (*ConsensusState) XXX_Unmarshal Uses

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

type Evidence Uses

type Evidence struct {
    ClientID string `json:"client_id" yaml:"client_id"`
    Header1  Header `json:"header1" yaml:"header1"`
    Header2  Header `json:"header2" yaml:"header2"`
    ChainID  string `json:"chain_id" yaml:"chain_id"`
}

Evidence is a wrapper over tendermint's DuplicateVoteEvidence that implements Evidence interface expected by ICS-02

func (Evidence) ClientType Uses

func (ev Evidence) ClientType() clientexported.ClientType

ClientType is Tendermint light client

func (Evidence) GetClientID Uses

func (ev Evidence) GetClientID() string

GetClientID returns the ID of the client that committed a misbehaviour.

func (Evidence) GetHeight Uses

func (ev Evidence) GetHeight() int64

GetHeight returns the height at which misbehaviour occurred

NOTE: assumes that evidence headers have the same height

func (Evidence) GetTime Uses

func (ev Evidence) GetTime() time.Time

GetTime returns the timestamp at which misbehaviour occurred. It uses the maximum value from both headers to prevent producing an invalid header outside of the evidence age range.

func (Evidence) Hash Uses

func (ev Evidence) Hash() tmbytes.HexBytes

Hash implements Evidence interface

func (Evidence) Route Uses

func (ev Evidence) Route() string

Route implements Evidence interface

func (Evidence) String Uses

func (ev Evidence) String() string

String implements Evidence interface

func (Evidence) Type Uses

func (ev Evidence) Type() string

Type implements Evidence interface

func (Evidence) ValidateBasic Uses

func (ev Evidence) ValidateBasic() error

ValidateBasic implements Evidence interface

type Fraction Uses

type Fraction struct {
    Numerator   int64 `protobuf:"varint,1,opt,name=numerator,proto3" json:"numerator,omitempty"`
    Denominator int64 `protobuf:"varint,2,opt,name=denominator,proto3" json:"denominator,omitempty"`
}

Fraction defines the protobuf message type for tmmath.Fraction

func NewFractionFromTm Uses

func NewFractionFromTm(f tmmath.Fraction) Fraction

NewFractionFromTm returns a new Fraction instance from a tmmath.Fraction

func (*Fraction) Descriptor Uses

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

func (*Fraction) GetDenominator Uses

func (m *Fraction) GetDenominator() int64

func (*Fraction) GetNumerator Uses

func (m *Fraction) GetNumerator() int64

func (*Fraction) Marshal Uses

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

func (*Fraction) MarshalTo Uses

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

func (*Fraction) MarshalToSizedBuffer Uses

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

func (*Fraction) ProtoMessage Uses

func (*Fraction) ProtoMessage()

func (*Fraction) Reset Uses

func (m *Fraction) Reset()

func (*Fraction) Size Uses

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

func (*Fraction) String Uses

func (m *Fraction) String() string

func (Fraction) ToTendermint Uses

func (f Fraction) ToTendermint() tmmath.Fraction

ToTendermint converts Fraction to tmmath.Fraction

func (*Fraction) Unmarshal Uses

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

func (*Fraction) XXX_DiscardUnknown Uses

func (m *Fraction) XXX_DiscardUnknown()

func (*Fraction) XXX_Marshal Uses

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

func (*Fraction) XXX_Merge Uses

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

func (*Fraction) XXX_Size Uses

func (m *Fraction) XXX_Size() int

func (*Fraction) XXX_Unmarshal Uses

func (m *Fraction) XXX_Unmarshal(b []byte) error
type Header struct {
    tmtypes.SignedHeader `json:"signed_header" yaml:"signed_header"` // contains the commitment root
    ValidatorSet         *tmtypes.ValidatorSet                       `json:"validator_set" yaml:"validator_set"`   // the validator set that signed Header
    TrustedHeight        uint64                                      `json:"trusted_height" yaml:"trusted_height"` // the height of a trusted header seen by client less than or equal to Header
    TrustedValidators    *tmtypes.ValidatorSet                       `json:"trusted_vals" yaml:"trusted_vals"`     // the last trusted validator set at trusted height
}

Header defines the Tendermint client consensus Header. It encapsulates all the information necessary to update from a trusted Tendermint ConsensusState. The inclusion of TrustedHeight and TrustedValidators allows this update to process correctly, so long as the ConsensusState for the TrustedHeight exists, this removes race conditions among relayers The SignedHeader and ValidatorSet are the new untrusted update fields for the client. The TrustedHeight is the height of a stored ConsensusState on the client that will be used to verify the new untrusted header. The Trusted ConsensusState must be within the unbonding period of current time in order to correctly verify, and the TrustedValidators must hash to TrustedConsensusState.NextValidatorsHash since that is the last trusted validator set at the TrustedHeight.

func CreateTestHeader Uses

func CreateTestHeader(chainID string, height, trustedHeight int64, timestamp time.Time, valSet, trustedVals *tmtypes.ValidatorSet, signers []tmtypes.PrivValidator) Header

CreateTestHeader creates a mock header for testing only.

func (Header) ClientType Uses

func (h Header) ClientType() clientexported.ClientType

ClientType defines that the Header is a Tendermint consensus algorithm

func (Header) ConsensusState Uses

func (h Header) ConsensusState() *ConsensusState

ConsensusState returns the updated consensus state associated with the header

func (Header) GetHeight Uses

func (h Header) GetHeight() uint64

GetHeight returns the current height

NOTE: also referred as `sequence`

func (Header) ToABCIHeader Uses

func (h Header) ToABCIHeader() abci.Header

ToABCIHeader parses the header to an ABCI header type. NOTE: only for testing use.

func (Header) ValidateBasic Uses

func (h Header) ValidateBasic(chainID string) error

ValidateBasic calls the SignedHeader ValidateBasic function and checks that validatorsets are not nil NOTE: TrustedHeight and TrustedValidators may be empty when creating client with MsgCreateClient

type MsgCreateClient Uses

type MsgCreateClient struct {
    ClientID        string             `json:"client_id" yaml:"client_id"`
    Header          Header             `json:"header" yaml:"header"`
    TrustLevel      Fraction           `json:"trust_level" yaml:"trust_level"`
    TrustingPeriod  time.Duration      `json:"trusting_period" yaml:"trusting_period"`
    UnbondingPeriod time.Duration      `json:"unbonding_period" yaml:"unbonding_period"`
    MaxClockDrift   time.Duration      `json:"max_clock_drift" yaml:"max_clock_drift"`
    ProofSpecs      []*ics23.ProofSpec `json:"proof_specs" yaml:"proof_specs"`
    Signer          sdk.AccAddress     `json:"address" yaml:"address"`
}

MsgCreateClient defines a message to create an IBC client

func NewMsgCreateClient Uses

func NewMsgCreateClient(
    id string, header Header, trustLevel Fraction,
    trustingPeriod, unbondingPeriod, maxClockDrift time.Duration,
    specs []*ics23.ProofSpec, signer sdk.AccAddress,
) *MsgCreateClient

NewMsgCreateClient creates a new MsgCreateClient instance

func (MsgCreateClient) GetClientID Uses

func (msg MsgCreateClient) GetClientID() string

GetClientID implements clientexported.MsgCreateClient

func (MsgCreateClient) GetClientType Uses

func (msg MsgCreateClient) GetClientType() string

GetClientType implements clientexported.MsgCreateClient

func (MsgCreateClient) GetConsensusState Uses

func (msg MsgCreateClient) GetConsensusState() clientexported.ConsensusState

GetConsensusState implements clientexported.MsgCreateClient

func (MsgCreateClient) GetSignBytes Uses

func (msg MsgCreateClient) GetSignBytes() []byte

GetSignBytes implements sdk.Msg

func (MsgCreateClient) GetSigners Uses

func (msg MsgCreateClient) GetSigners() []sdk.AccAddress

GetSigners implements sdk.Msg

func (*MsgCreateClient) ProtoMessage Uses

func (msg *MsgCreateClient) ProtoMessage()

func (*MsgCreateClient) Reset Uses

func (msg *MsgCreateClient) Reset()

dummy implementation of proto.Message

func (MsgCreateClient) Route Uses

func (msg MsgCreateClient) Route() string

Route implements sdk.Msg

func (*MsgCreateClient) String Uses

func (msg *MsgCreateClient) String() string

func (MsgCreateClient) Type Uses

func (msg MsgCreateClient) Type() string

Type implements sdk.Msg

func (MsgCreateClient) ValidateBasic Uses

func (msg MsgCreateClient) ValidateBasic() error

ValidateBasic implements sdk.Msg

type MsgSubmitClientMisbehaviour Uses

type MsgSubmitClientMisbehaviour struct {
    Evidence  evidenceexported.Evidence `json:"evidence" yaml:"evidence"`
    Submitter sdk.AccAddress            `json:"submitter" yaml:"submitter"`
}

MsgSubmitClientMisbehaviour defines an sdk.Msg type that supports submitting Evidence for client misbehaviour.

func NewMsgSubmitClientMisbehaviour Uses

func NewMsgSubmitClientMisbehaviour(e evidenceexported.Evidence, s sdk.AccAddress) MsgSubmitClientMisbehaviour

NewMsgSubmitClientMisbehaviour creates a new MsgSubmitClientMisbehaviour instance.

func (MsgSubmitClientMisbehaviour) GetEvidence Uses

func (msg MsgSubmitClientMisbehaviour) GetEvidence() evidenceexported.Evidence

func (MsgSubmitClientMisbehaviour) GetSignBytes Uses

func (msg MsgSubmitClientMisbehaviour) GetSignBytes() []byte

GetSignBytes returns the raw bytes a signer is expected to sign when submitting a MsgSubmitClientMisbehaviour message.

func (MsgSubmitClientMisbehaviour) GetSigners Uses

func (msg MsgSubmitClientMisbehaviour) GetSigners() []sdk.AccAddress

GetSigners returns the single expected signer for a MsgSubmitClientMisbehaviour.

func (MsgSubmitClientMisbehaviour) GetSubmitter Uses

func (msg MsgSubmitClientMisbehaviour) GetSubmitter() sdk.AccAddress

func (MsgSubmitClientMisbehaviour) ProtoMessage Uses

func (msg MsgSubmitClientMisbehaviour) ProtoMessage()

func (MsgSubmitClientMisbehaviour) Reset Uses

func (msg MsgSubmitClientMisbehaviour) Reset()

dummy implementation of proto.Message

func (MsgSubmitClientMisbehaviour) Route Uses

func (msg MsgSubmitClientMisbehaviour) Route() string

Route returns the MsgSubmitClientMisbehaviour's route.

func (MsgSubmitClientMisbehaviour) String Uses

func (msg MsgSubmitClientMisbehaviour) String() string

func (MsgSubmitClientMisbehaviour) Type Uses

func (msg MsgSubmitClientMisbehaviour) Type() string

Type returns the MsgSubmitClientMisbehaviour's type.

func (MsgSubmitClientMisbehaviour) ValidateBasic Uses

func (msg MsgSubmitClientMisbehaviour) ValidateBasic() error

ValidateBasic performs basic (non-state-dependant) validation on a MsgSubmitClientMisbehaviour.

type MsgUpdateClient Uses

type MsgUpdateClient struct {
    ClientID string         `json:"client_id" yaml:"client_id"`
    Header   Header         `json:"header" yaml:"header"`
    Signer   sdk.AccAddress `json:"address" yaml:"address"`
}

MsgUpdateClient defines a message to update an IBC client

func NewMsgUpdateClient Uses

func NewMsgUpdateClient(id string, header Header, signer sdk.AccAddress) *MsgUpdateClient

NewMsgUpdateClient creates a new MsgUpdateClient instance

func (MsgUpdateClient) GetClientID Uses

func (msg MsgUpdateClient) GetClientID() string

GetClientID implements clientexported.MsgUpdateClient

func (MsgUpdateClient) GetHeader Uses

func (msg MsgUpdateClient) GetHeader() clientexported.Header

GetHeader implements clientexported.MsgUpdateClient

func (MsgUpdateClient) GetSignBytes Uses

func (msg MsgUpdateClient) GetSignBytes() []byte

GetSignBytes implements sdk.Msg

func (MsgUpdateClient) GetSigners Uses

func (msg MsgUpdateClient) GetSigners() []sdk.AccAddress

GetSigners implements sdk.Msg

func (*MsgUpdateClient) ProtoMessage Uses

func (msg *MsgUpdateClient) ProtoMessage()

func (*MsgUpdateClient) Reset Uses

func (msg *MsgUpdateClient) Reset()

dummy implementation of proto.Message

func (MsgUpdateClient) Route Uses

func (msg MsgUpdateClient) Route() string

Route implements sdk.Msg

func (*MsgUpdateClient) String Uses

func (msg *MsgUpdateClient) String() string

func (MsgUpdateClient) Type Uses

func (msg MsgUpdateClient) Type() string

Type implements sdk.Msg

func (MsgUpdateClient) ValidateBasic Uses

func (msg MsgUpdateClient) ValidateBasic() error

ValidateBasic implements sdk.Msg

Package types imports 37 packages (graph) and is imported by 8 packages. Updated 2020-08-13. Refresh now. Tools for package owners.