p2p

package
v0.1.3-alpha.9 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Code generated by fastssz. DO NOT EDIT.

Code generated by fastssz. DO NOT EDIT.

Code generated by fastssz. DO NOT EDIT.

Code generated by fastssz. DO NOT EDIT.

Code generated by fastssz. DO NOT EDIT.

Code generated by fastssz. DO NOT EDIT.

Code generated by fastssz. DO NOT EDIT.

Code generated by fastssz. DO NOT EDIT.

Code generated by fastssz. DO NOT EDIT.

Code generated by fastssz. DO NOT EDIT.

Code generated by fastssz. DO NOT EDIT.

Code generated by fastssz. DO NOT EDIT.

Code generated by fastssz. DO NOT EDIT.

Code generated by fastssz. DO NOT EDIT.

Index

Constants

View Source
const (
	// MsgBlockCmd is a single block element
	MsgBlockCmd = "block"
	// MsgTxCmd is a single tx element
	MsgTxCmd = "tx"
	// MsgDepositCmd is a single deposit element
	MsgDepositCmd = "deposit"
	// MsgDepositCmd is a deposit slice element
	MsgDepositsCmd = "deposits"
	// MsgVoteCmd is a single vote element
	MsgVoteCmd = "vote"
	// MsgValidatorStart is a validator hello element
	MsgValidatorStartCmd = "validator_hello"
	// MsgExitCmd is a exit element
	MsgExitCmd = "exit"
	// MsgExitsCmd is a exit slice element
	MsgExitsCmd = "exits"
	// MsgGovernanceCmd is a exit element
	MsgGovernanceCmd = "governance_vote"
	// MsgTxMultiCmd is a exit element
	MsgTxMultiCmd = "tx_multi"
	// MsgVersionCmd is for version handshake
	MsgVersionCmd = "version"
	// MsgGetBlocksCmd ask a node for blocks
	MsgGetBlocksCmd = "getblocks"
	// MsgSyncEnd announce the syncing node the stream finished
	MsgSyncEndCmd = "syncend"
	// MsgFinalizationCmd announce a peer to reached state finalization
	MsgFinalizationCmd = "finalized"
)

Variables

View Source
var (
	// ErrorChecksum returned when the message header checksum doesn't match.
	ErrorChecksum = errors.New("message checksum don't match")
	// ErrorAnnLength returned when the header length doesn't match the message length.
	ErrorAnnLength = errors.New("wrong announced length")
	// ErrorSizeExceed returned when the message exceed the maximum payload message.
	ErrorSizeExceed = errors.New("message exceed max payload length")
	// ErrorNetMismatch returned when the message doesn't match the specified network.
	ErrorNetMismatch = errors.New("wrong message network")
)
View Source
var MaxDeposits uint64 = 1024

MaxDeposits define the maximum amount a deposit slice message can contain

View Source
var MaxExits uint64 = 1024

MaxExits define the maximum amount a exits slice message can contain

Functions

func WriteMessage

func WriteMessage(w io.Writer, msg Message, net uint32) error

WriteMessage writes the message to writer

Types

type Message

type Message interface {
	Marshal() ([]byte, error)
	Unmarshal(b []byte) error
	Command() string
	MaxPayloadLength() uint64
}

Message interface for all the messages

func ReadMessage

func ReadMessage(r io.Reader, net uint32) (Message, error)

ReadMessage decodes the message from reader

type MessageHeader

type MessageHeader struct {
	Magic    uint64
	Command  [40]byte `ssz-size:"40"`
	Length   uint64
	Checksum [4]byte `ssz-size:"4"`
}

MessageHeader header of the message

func (*MessageHeader) HashTreeRoot

func (m *MessageHeader) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the MessageHeader object

func (*MessageHeader) HashTreeRootWith

func (m *MessageHeader) HashTreeRootWith(hh *ssz.Hasher) (err error)

HashTreeRootWith ssz hashes the MessageHeader object with a hasher

func (*MessageHeader) Marshal

func (m *MessageHeader) Marshal() ([]byte, error)

Marshal serializes the data to bytes

func (*MessageHeader) MarshalSSZ

func (m *MessageHeader) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the MessageHeader object

func (*MessageHeader) MarshalSSZTo

func (m *MessageHeader) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the MessageHeader object to a target array

func (*MessageHeader) SizeSSZ

func (m *MessageHeader) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the MessageHeader object

func (*MessageHeader) Unmarshal

func (m *MessageHeader) Unmarshal(b []byte) error

Unmarshal deserializes the data

func (*MessageHeader) UnmarshalSSZ

func (m *MessageHeader) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the MessageHeader object

type MsgBlock

type MsgBlock struct {
	Data *primitives.Block
}

MsgBlock is the struct of the message the is transmitted upon the network.

func (*MsgBlock) Command

func (m *MsgBlock) Command() string

Command returns the message topic

func (*MsgBlock) HashTreeRoot

func (m *MsgBlock) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the MsgBlock object

func (*MsgBlock) HashTreeRootWith

func (m *MsgBlock) HashTreeRootWith(hh *ssz.Hasher) (err error)

HashTreeRootWith ssz hashes the MsgBlock object with a hasher

func (*MsgBlock) Marshal

func (m *MsgBlock) Marshal() ([]byte, error)

Marshal serializes the data to bytes

func (*MsgBlock) MarshalSSZ

func (m *MsgBlock) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the MsgBlock object

func (*MsgBlock) MarshalSSZTo

func (m *MsgBlock) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the MsgBlock object to a target array

func (*MsgBlock) MaxPayloadLength

func (m *MsgBlock) MaxPayloadLength() uint64

MaxPayloadLength returns the maximum size of the MsgBlock message.

func (*MsgBlock) SizeSSZ

func (m *MsgBlock) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the MsgBlock object

func (*MsgBlock) Unmarshal

func (m *MsgBlock) Unmarshal(b []byte) error

Unmarshal deserializes the data

func (*MsgBlock) UnmarshalSSZ

func (m *MsgBlock) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the MsgBlock object

type MsgDeposit

type MsgDeposit struct {
	Data *primitives.Deposit
}

MsgDeposit is the struct of the message the is transmitted upon the network.

func (*MsgDeposit) Command

func (m *MsgDeposit) Command() string

Command returns the message topic

func (*MsgDeposit) HashTreeRoot

func (m *MsgDeposit) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the MsgDeposit object

func (*MsgDeposit) HashTreeRootWith

func (m *MsgDeposit) HashTreeRootWith(hh *ssz.Hasher) (err error)

HashTreeRootWith ssz hashes the MsgDeposit object with a hasher

func (*MsgDeposit) Marshal

func (m *MsgDeposit) Marshal() ([]byte, error)

Marshal serializes the data to bytes

func (*MsgDeposit) MarshalSSZ

func (m *MsgDeposit) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the MsgDeposit object

func (*MsgDeposit) MarshalSSZTo

func (m *MsgDeposit) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the MsgDeposit object to a target array

func (*MsgDeposit) MaxPayloadLength

func (m *MsgDeposit) MaxPayloadLength() uint64

MaxPayloadLength returns the maximum size of the MsgDeposit message.

func (*MsgDeposit) SizeSSZ

func (m *MsgDeposit) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the MsgDeposit object

func (*MsgDeposit) Unmarshal

func (m *MsgDeposit) Unmarshal(b []byte) error

Unmarshal deserializes the data

func (*MsgDeposit) UnmarshalSSZ

func (m *MsgDeposit) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the MsgDeposit object

type MsgDeposits

type MsgDeposits struct {
	Data []*primitives.Deposit `ssz-max:"1024"`
}

MsgDeposits is the struct of the message the is transmitted upon the network.

func (*MsgDeposits) Command

func (m *MsgDeposits) Command() string

Command returns the message topic

func (*MsgDeposits) HashTreeRoot

func (m *MsgDeposits) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the MsgDeposits object

func (*MsgDeposits) HashTreeRootWith

func (m *MsgDeposits) HashTreeRootWith(hh *ssz.Hasher) (err error)

HashTreeRootWith ssz hashes the MsgDeposits object with a hasher

func (*MsgDeposits) Marshal

func (m *MsgDeposits) Marshal() ([]byte, error)

Marshal serializes the data to bytes

func (*MsgDeposits) MarshalSSZ

func (m *MsgDeposits) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the MsgDeposits object

func (*MsgDeposits) MarshalSSZTo

func (m *MsgDeposits) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the MsgDeposits object to a target array

func (*MsgDeposits) MaxPayloadLength

func (m *MsgDeposits) MaxPayloadLength() uint64

MaxPayloadLength returns the maximum size of the MsgDeposits message.

func (*MsgDeposits) SizeSSZ

func (m *MsgDeposits) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the MsgDeposits object

func (*MsgDeposits) Unmarshal

func (m *MsgDeposits) Unmarshal(b []byte) error

Unmarshal deserializes the data

func (*MsgDeposits) UnmarshalSSZ

func (m *MsgDeposits) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the MsgDeposits object

type MsgExit

type MsgExit struct {
	Data *primitives.Exit
}

MsgExit is the struct of the message the is transmitted upon the network.

func (*MsgExit) Command

func (m *MsgExit) Command() string

Command returns the message topic

func (*MsgExit) HashTreeRoot

func (m *MsgExit) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the MsgExit object

func (*MsgExit) HashTreeRootWith

func (m *MsgExit) HashTreeRootWith(hh *ssz.Hasher) (err error)

HashTreeRootWith ssz hashes the MsgExit object with a hasher

func (*MsgExit) Marshal

func (m *MsgExit) Marshal() ([]byte, error)

Marshal serializes the data to bytes

func (*MsgExit) MarshalSSZ

func (m *MsgExit) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the MsgExit object

func (*MsgExit) MarshalSSZTo

func (m *MsgExit) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the MsgExit object to a target array

func (*MsgExit) MaxPayloadLength

func (m *MsgExit) MaxPayloadLength() uint64

MaxPayloadLength returns the maximum size of the MsgExit message.

func (*MsgExit) SizeSSZ

func (m *MsgExit) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the MsgExit object

func (*MsgExit) Unmarshal

func (m *MsgExit) Unmarshal(b []byte) error

Unmarshal deserializes the data

func (*MsgExit) UnmarshalSSZ

func (m *MsgExit) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the MsgExit object

type MsgExits

type MsgExits struct {
	Data []*primitives.Exit `ssz-max:"1024"`
}

MsgExits is the struct of the message the is transmitted upon the network.

func (*MsgExits) Command

func (m *MsgExits) Command() string

Command returns the message topic

func (*MsgExits) HashTreeRoot

func (m *MsgExits) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the MsgExits object

func (*MsgExits) HashTreeRootWith

func (m *MsgExits) HashTreeRootWith(hh *ssz.Hasher) (err error)

HashTreeRootWith ssz hashes the MsgExits object with a hasher

func (*MsgExits) Marshal

func (m *MsgExits) Marshal() ([]byte, error)

Marshal serializes the data to bytes

func (*MsgExits) MarshalSSZ

func (m *MsgExits) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the MsgExits object

func (*MsgExits) MarshalSSZTo

func (m *MsgExits) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the MsgExits object to a target array

func (*MsgExits) MaxPayloadLength

func (m *MsgExits) MaxPayloadLength() uint64

MaxPayloadLength returns the maximum size of the MsgExits message.

func (*MsgExits) SizeSSZ

func (m *MsgExits) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the MsgExits object

func (*MsgExits) Unmarshal

func (m *MsgExits) Unmarshal(b []byte) error

Unmarshal deserializes the data

func (*MsgExits) UnmarshalSSZ

func (m *MsgExits) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the MsgExits object

type MsgFinalization

type MsgFinalization struct {
	Tip             uint64
	TipSlot         uint64
	TipHash         [32]byte
	JustifiedSlot   uint64
	JustifiedHeight uint64
	JustifiedHash   [32]byte
	FinalizedSlot   uint64
	FinalizedHeight uint64
	FinalizedHash   [32]byte
}

MsgFinalization is the struct that contains the node information when announcing a finalization.

func (*MsgFinalization) Command

func (m *MsgFinalization) Command() string

Command returns the message topic

func (*MsgFinalization) HashTreeRoot

func (m *MsgFinalization) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the MsgFinalization object

func (*MsgFinalization) HashTreeRootWith

func (m *MsgFinalization) HashTreeRootWith(hh *ssz.Hasher) (err error)

HashTreeRootWith ssz hashes the MsgFinalization object with a hasher

func (*MsgFinalization) Marshal

func (m *MsgFinalization) Marshal() ([]byte, error)

Marshal serializes the data to bytes

func (*MsgFinalization) MarshalSSZ

func (m *MsgFinalization) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the MsgFinalization object

func (*MsgFinalization) MarshalSSZTo

func (m *MsgFinalization) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the MsgFinalization object to a target array

func (*MsgFinalization) MaxPayloadLength

func (m *MsgFinalization) MaxPayloadLength() uint64

MaxPayloadLength returns the maximum size of the MsgVersion message.

func (*MsgFinalization) SizeSSZ

func (m *MsgFinalization) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the MsgFinalization object

func (*MsgFinalization) Unmarshal

func (m *MsgFinalization) Unmarshal(b []byte) error

Unmarshal deserializes the data

func (*MsgFinalization) UnmarshalSSZ

func (m *MsgFinalization) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the MsgFinalization object

type MsgGetBlocks

type MsgGetBlocks struct {
	LastBlockHash [32]byte
}

MsgGetBlocks is the message that contains the locator to fetch blocks.

func (*MsgGetBlocks) Command

func (m *MsgGetBlocks) Command() string

Command returns the message topic

func (*MsgGetBlocks) HashTreeRoot

func (m *MsgGetBlocks) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the MsgGetBlocks object

func (*MsgGetBlocks) HashTreeRootWith

func (m *MsgGetBlocks) HashTreeRootWith(hh *ssz.Hasher) (err error)

HashTreeRootWith ssz hashes the MsgGetBlocks object with a hasher

func (*MsgGetBlocks) Marshal

func (m *MsgGetBlocks) Marshal() ([]byte, error)

Marshal serializes the data to bytes

func (*MsgGetBlocks) MarshalSSZ

func (m *MsgGetBlocks) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the MsgGetBlocks object

func (*MsgGetBlocks) MarshalSSZTo

func (m *MsgGetBlocks) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the MsgGetBlocks object to a target array

func (*MsgGetBlocks) MaxPayloadLength

func (m *MsgGetBlocks) MaxPayloadLength() uint64

MaxPayloadLength returns the maximum size of the MsgGetBlocks message.

func (*MsgGetBlocks) SizeSSZ

func (m *MsgGetBlocks) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the MsgGetBlocks object

func (*MsgGetBlocks) Unmarshal

func (m *MsgGetBlocks) Unmarshal(b []byte) error

Unmarshal deserializes the data

func (*MsgGetBlocks) UnmarshalSSZ

func (m *MsgGetBlocks) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the MsgGetBlocks object

type MsgGovernance

type MsgGovernance struct {
	Data *primitives.GovernanceVote
}

MsgGovernance is the struct of the message the is transmitted upon the network.

func (*MsgGovernance) Command

func (m *MsgGovernance) Command() string

Command returns the message topic

func (*MsgGovernance) HashTreeRoot

func (m *MsgGovernance) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the MsgGovernance object

func (*MsgGovernance) HashTreeRootWith

func (m *MsgGovernance) HashTreeRootWith(hh *ssz.Hasher) (err error)

HashTreeRootWith ssz hashes the MsgGovernance object with a hasher

func (*MsgGovernance) Marshal

func (m *MsgGovernance) Marshal() ([]byte, error)

Marshal serializes the data to bytes

func (*MsgGovernance) MarshalSSZ

func (m *MsgGovernance) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the MsgGovernance object

func (*MsgGovernance) MarshalSSZTo

func (m *MsgGovernance) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the MsgGovernance object to a target array

func (*MsgGovernance) MaxPayloadLength

func (m *MsgGovernance) MaxPayloadLength() uint64

MaxPayloadLength returns the maximum size of the MsgGovernance message.

func (*MsgGovernance) SizeSSZ

func (m *MsgGovernance) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the MsgGovernance object

func (*MsgGovernance) Unmarshal

func (m *MsgGovernance) Unmarshal(b []byte) error

Unmarshal deserializes the data

func (*MsgGovernance) UnmarshalSSZ

func (m *MsgGovernance) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the MsgGovernance object

type MsgSyncEnd

type MsgSyncEnd struct{}

MsgSyncEnd is the struct containing the getaddr message command.

func (*MsgSyncEnd) Command

func (m *MsgSyncEnd) Command() string

Command returns the message topic

func (*MsgSyncEnd) Marshal

func (m *MsgSyncEnd) Marshal() ([]byte, error)

Marshal serializes the data to bytes

func (*MsgSyncEnd) MaxPayloadLength

func (m *MsgSyncEnd) MaxPayloadLength() uint64

MaxPayloadLength returns the maximum size of the MsgSyncEnd message.

func (*MsgSyncEnd) Unmarshal

func (m *MsgSyncEnd) Unmarshal([]byte) error

Unmarshal deserializes the data

type MsgTx

type MsgTx struct {
	Data *primitives.Tx
}

MsgTx is the struct of the message the is transmitted upon the network.

func (*MsgTx) Command

func (m *MsgTx) Command() string

Command returns the message topic

func (*MsgTx) HashTreeRoot

func (m *MsgTx) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the MsgTx object

func (*MsgTx) HashTreeRootWith

func (m *MsgTx) HashTreeRootWith(hh *ssz.Hasher) (err error)

HashTreeRootWith ssz hashes the MsgTx object with a hasher

func (*MsgTx) Marshal

func (m *MsgTx) Marshal() ([]byte, error)

Marshal serializes the data to bytes

func (*MsgTx) MarshalSSZ

func (m *MsgTx) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the MsgTx object

func (*MsgTx) MarshalSSZTo

func (m *MsgTx) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the MsgTx object to a target array

func (*MsgTx) MaxPayloadLength

func (m *MsgTx) MaxPayloadLength() uint64

MaxPayloadLength returns the maximum size of the MsgTx message.

func (*MsgTx) SizeSSZ

func (m *MsgTx) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the MsgTx object

func (*MsgTx) Unmarshal

func (m *MsgTx) Unmarshal(b []byte) error

Unmarshal deserializes the data

func (*MsgTx) UnmarshalSSZ

func (m *MsgTx) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the MsgTx object

type MsgTxMulti

type MsgTxMulti struct {
	Data *primitives.TxMulti
}

MsgTxMulti is the struct of the message the is transmitted upon the network.

func (*MsgTxMulti) Command

func (m *MsgTxMulti) Command() string

Command returns the message topic

func (*MsgTxMulti) HashTreeRoot

func (m *MsgTxMulti) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the MsgTxMulti object

func (*MsgTxMulti) HashTreeRootWith

func (m *MsgTxMulti) HashTreeRootWith(hh *ssz.Hasher) (err error)

HashTreeRootWith ssz hashes the MsgTxMulti object with a hasher

func (*MsgTxMulti) Marshal

func (m *MsgTxMulti) Marshal() ([]byte, error)

Marshal serializes the data to bytes

func (*MsgTxMulti) MarshalSSZ

func (m *MsgTxMulti) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the MsgTxMulti object

func (*MsgTxMulti) MarshalSSZTo

func (m *MsgTxMulti) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the MsgTxMulti object to a target array

func (*MsgTxMulti) MaxPayloadLength

func (m *MsgTxMulti) MaxPayloadLength() uint64

MaxPayloadLength returns the maximum size of the MsgTxMulti message.

func (*MsgTxMulti) SizeSSZ

func (m *MsgTxMulti) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the MsgTxMulti object

func (*MsgTxMulti) Unmarshal

func (m *MsgTxMulti) Unmarshal(b []byte) error

Unmarshal deserializes the data

func (*MsgTxMulti) UnmarshalSSZ

func (m *MsgTxMulti) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the MsgTxMulti object

type MsgValidatorStart

type MsgValidatorStart struct {
	Data *primitives.ValidatorHelloMessage
}

MsgValidatorStart is the struct of the message the is transmitted upon the network.

func (*MsgValidatorStart) Command

func (m *MsgValidatorStart) Command() string

Command returns the message topic

func (*MsgValidatorStart) HashTreeRoot

func (m *MsgValidatorStart) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the MsgValidatorStart object

func (*MsgValidatorStart) HashTreeRootWith

func (m *MsgValidatorStart) HashTreeRootWith(hh *ssz.Hasher) (err error)

HashTreeRootWith ssz hashes the MsgValidatorStart object with a hasher

func (*MsgValidatorStart) Marshal

func (m *MsgValidatorStart) Marshal() ([]byte, error)

Marshal serializes the data to bytes

func (*MsgValidatorStart) MarshalSSZ

func (m *MsgValidatorStart) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the MsgValidatorStart object

func (*MsgValidatorStart) MarshalSSZTo

func (m *MsgValidatorStart) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the MsgValidatorStart object to a target array

func (*MsgValidatorStart) MaxPayloadLength

func (m *MsgValidatorStart) MaxPayloadLength() uint64

MaxPayloadLength returns the maximum size of the MsgValidatorStart message.

func (*MsgValidatorStart) SizeSSZ

func (m *MsgValidatorStart) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the MsgValidatorStart object

func (*MsgValidatorStart) Unmarshal

func (m *MsgValidatorStart) Unmarshal(b []byte) error

Unmarshal deserializes the data

func (*MsgValidatorStart) UnmarshalSSZ

func (m *MsgValidatorStart) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the MsgValidatorStart object

type MsgVersion

type MsgVersion struct {
	Tip             uint64
	TipSlot         uint64
	TipHash         [32]byte
	Nonce           uint64
	Timestamp       uint64
	JustifiedSlot   uint64
	JustifiedHeight uint64
	JustifiedHash   [32]byte
	FinalizedSlot   uint64
	FinalizedHeight uint64
	FinalizedHash   [32]byte
}

MsgVersion is the struct that contains the node information during the version handshake.

func (*MsgVersion) Command

func (m *MsgVersion) Command() string

Command returns the message topic

func (*MsgVersion) HashTreeRoot

func (m *MsgVersion) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the MsgVersion object

func (*MsgVersion) HashTreeRootWith

func (m *MsgVersion) HashTreeRootWith(hh *ssz.Hasher) (err error)

HashTreeRootWith ssz hashes the MsgVersion object with a hasher

func (*MsgVersion) Marshal

func (m *MsgVersion) Marshal() ([]byte, error)

Marshal serializes the data to bytes

func (*MsgVersion) MarshalSSZ

func (m *MsgVersion) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the MsgVersion object

func (*MsgVersion) MarshalSSZTo

func (m *MsgVersion) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the MsgVersion object to a target array

func (*MsgVersion) MaxPayloadLength

func (m *MsgVersion) MaxPayloadLength() uint64

MaxPayloadLength returns the maximum size of the MsgVersion message.

func (*MsgVersion) SizeSSZ

func (m *MsgVersion) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the MsgVersion object

func (*MsgVersion) Unmarshal

func (m *MsgVersion) Unmarshal(b []byte) error

Unmarshal deserializes the data

func (*MsgVersion) UnmarshalSSZ

func (m *MsgVersion) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the MsgVersion object

type MsgVote

type MsgVote struct {
	Data *primitives.MultiValidatorVote
}

MsgVote is the struct of the message the is transmitted upon the network.

func (*MsgVote) Command

func (m *MsgVote) Command() string

Command returns the message topic

func (*MsgVote) HashTreeRoot

func (m *MsgVote) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the MsgVote object

func (*MsgVote) HashTreeRootWith

func (m *MsgVote) HashTreeRootWith(hh *ssz.Hasher) (err error)

HashTreeRootWith ssz hashes the MsgVote object with a hasher

func (*MsgVote) Marshal

func (m *MsgVote) Marshal() ([]byte, error)

Marshal serializes the data to bytes

func (*MsgVote) MarshalSSZ

func (m *MsgVote) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the MsgVote object

func (*MsgVote) MarshalSSZTo

func (m *MsgVote) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the MsgVote object to a target array

func (*MsgVote) MaxPayloadLength

func (m *MsgVote) MaxPayloadLength() uint64

MaxPayloadLength returns the maximum size of the MsgVote message.

func (*MsgVote) SizeSSZ

func (m *MsgVote) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the MsgVote object

func (*MsgVote) Unmarshal

func (m *MsgVote) Unmarshal(b []byte) error

Unmarshal deserializes the data

func (*MsgVote) UnmarshalSSZ

func (m *MsgVote) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the MsgVote object

Jump to

Keyboard shortcuts

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