Documentation ¶
Index ¶
- Constants
- Variables
- func ErrBookKeeperNum(headerBookKeeperNum int, consensusNodeNum int) error
- func ErrDeserializeConsensusPeer(err error) error
- func ErrDeserializeHeader(err error) error
- func ErrGetConsensusPeers(chainId uint64) error
- func ErrGetKeyHeaderHash(reason string) error
- func ErrHeaderEmpty(headerhash []byte) error
- func ErrInvalidPublicKey(pubkey string) error
- func ErrMarshalSpecificTypeFail(o interface{}, err error) error
- func ErrSerializeHeader(err error) error
- func ErrSyncBlockHeader(operation string, chainId uint64, height uint32, err error) error
- func ErrSyncGenesisHeader(reason string) error
- func ErrUnmarshalSpecificTypeFail(o interface{}, err error) error
- func ErrVerifyMultiSigFail(err error, height uint32) error
- func RegisterCodec(cdc *codec.Codec)
- type ConsensusPeers
- type MsgSyncGenesisParam
- type MsgSyncHeadersParam
- type Peer
- type QueryConsensusPeersParams
Constants ¶
const ( AttributeValueCategory = ModuleName EventTypeSyncHeader = "sync_header" AttributeKeyChainId = "chain_id" AttributeKeyHeight = "height" AttributeKeyBlockHash = "block_hash" AttributeKeyNativeChainHeight = "native_chain_height" )
Minting module event types
const ( // module name ModuleName = "headersync" // default paramspace for params keeper DefaultParamspace = ModuleName // StoreKey is the default store key for mint StoreKey = ModuleName // QuerierRoute is the querier route for the minting store. QuerierRoute = StoreKey // RouterKey is the message route for gov RouterKey = ModuleName )
nolint
const ( TypeMsgSyncGenesis = "sync_genesis" TypeMsgSyncHeaders = "sync_headers" )
Governance message types and routes
const (
QueryConsensusPeers = "consensus_peers"
)
Variables ¶
var ( ErrDeserializeHeaderFailType = sdkerrors.Register(ModuleName, 1, "ErrDeserializeHeaderFailType") ErrSerializeHeaderFailType = sdkerrors.Register(ModuleName, 2, "ErrSerializeHeaderFailType") ErrHeaderEmptyType = sdkerrors.Register(ModuleName, 3, "ErrHeaderEmptyType") ErrGetKeyHeaderHashType = sdkerrors.Register(ModuleName, 4, "ErrGetKeyHeaderHashType") ErrGetConsensusPeersFailType = sdkerrors.Register(ModuleName, 5, "ErrGetConsensusPeersFailType") ErrBookKeeperNumErrType = sdkerrors.Register(ModuleName, 6, "ErrBookKeeperNumErrType") ErrInvalidPublicKeyType = sdkerrors.Register(ModuleName, 7, "ErrInvalidPublicKeyType") ErrUnmarshalSpecificType = sdkerrors.Register(ModuleName, 8, "ErrUnmarshalSpecificType") ErrVerifyMultiSigFailType = sdkerrors.Register(ModuleName, 9, "ErrVerifyMultiSignatureFailType") ErrDeserializeConsensusPeerType = sdkerrors.Register(ModuleName, 10, "ErrDeserializeConsensusPeerType") ErrSyncGenesisHeaderType = sdkerrors.Register(ModuleName, 11, "ErrSyncGenesisHeaderType") ErrSyncBlockHeaderType = sdkerrors.Register(ModuleName, 12, "ErrSyncBlockHeaderType") )
var ModuleCdc *codec.Codec
generic sealed codec to be used throughout this module
Functions ¶
func ErrBookKeeperNum ¶
func ErrDeserializeHeader ¶
func ErrGetConsensusPeers ¶
func ErrGetKeyHeaderHash ¶
func ErrHeaderEmpty ¶
func ErrInvalidPublicKey ¶
func ErrSerializeHeader ¶
func ErrSyncBlockHeader ¶
func ErrSyncGenesisHeader ¶
func ErrVerifyMultiSigFail ¶
func RegisterCodec ¶
Types ¶
type ConsensusPeers ¶
func (*ConsensusPeers) Deserialization ¶
func (this *ConsensusPeers) Deserialization(source *polycommon.ZeroCopySource) error
func (*ConsensusPeers) Serialization ¶
func (this *ConsensusPeers) Serialization(sink *polycommon.ZeroCopySink)
func (*ConsensusPeers) String ¶
func (this *ConsensusPeers) String() string
type MsgSyncGenesisParam ¶
type MsgSyncGenesisParam struct { Syncer sdk.AccAddress GenesisHeader string }
MsgSend - high level transaction of the coin module
func NewMsgSyncGenesisParam ¶
func NewMsgSyncGenesisParam(syncer sdk.AccAddress, genesisHeader string) MsgSyncGenesisParam
NewMsgSend - construct arbitrary multi-in, multi-out send msg.
func (MsgSyncGenesisParam) GetSignBytes ¶
func (msg MsgSyncGenesisParam) GetSignBytes() []byte
GetSignBytes Implements Msg.
func (MsgSyncGenesisParam) GetSigners ¶
func (msg MsgSyncGenesisParam) GetSigners() []sdk.AccAddress
GetSigners Implements Msg.
func (MsgSyncGenesisParam) Route ¶
func (msg MsgSyncGenesisParam) Route() string
Route Implements Msg.
func (MsgSyncGenesisParam) ValidateBasic ¶
func (msg MsgSyncGenesisParam) ValidateBasic() error
ValidateBasic Implements Msg.
type MsgSyncHeadersParam ¶
type MsgSyncHeadersParam struct { Syncer sdk.AccAddress Headers []string }
MsgMultiSend - high level transaction of the coin module
func NewMsgSyncHeadersParam ¶
func NewMsgSyncHeadersParam(syncer sdk.AccAddress, headers []string) MsgSyncHeadersParam
NewMsgMultiSend - construct arbitrary multi-in, multi-out send msg.
func (MsgSyncHeadersParam) GetSignBytes ¶
func (msg MsgSyncHeadersParam) GetSignBytes() []byte
GetSignBytes Implements Msg.
func (MsgSyncHeadersParam) GetSigners ¶
func (msg MsgSyncHeadersParam) GetSigners() []sdk.AccAddress
GetSigners Implements Msg.
func (MsgSyncHeadersParam) Route ¶
func (msg MsgSyncHeadersParam) Route() string
Route Implements Msg
func (MsgSyncHeadersParam) ValidateBasic ¶
func (msg MsgSyncHeadersParam) ValidateBasic() error
ValidateBasic Implements Msg.
type Peer ¶
func (*Peer) Deserialization ¶
func (this *Peer) Deserialization(source *polycommon.ZeroCopySource) error
func (*Peer) Serialization ¶
func (this *Peer) Serialization(sink *polycommon.ZeroCopySink)
type QueryConsensusPeersParams ¶
type QueryConsensusPeersParams struct {
ChainId uint64
}
QueryBalanceParams defines the params for querying an account balance.
func NewQueryConsensusPeersParams ¶
func NewQueryConsensusPeersParams(chainId uint64) QueryConsensusPeersParams
NewQueryBalanceParams creates a new instance of QueryBalanceParams.