p2p

package
v0.2.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2021 License: MIT Imports: 8 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.

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 deposit slice element
	MsgDepositsCmd = "deposits"
	// MsgVoteCmd is a single vote element
	MsgVoteCmd = "vote"
	// MsgValidatorStart is a validator hello element
	MsgValidatorStartCmd = "validator_hello"
	// MsgExitsCmd is a exit slice element
	MsgExitsCmd = "exits"
	// MsgGovernanceCmd is a exit element
	MsgGovernanceCmd = "governance_vote"
	// MsgMultiSignatureTx is a exit element
	MsgMultiSignatureTxCmd = "multi_sig_tx"
	// MsgVersionCmd is for version handshake
	MsgVersionCmd = "version"
	// MsgGetBlocksCmd ask a node for blocks
	MsgGetBlocksCmd = "getblocks"
	// MsgFinalizationCmd announce a peer to reached state finalization
	MsgFinalizationCmd = "finalized"
	// MsgProofsCmd is coin redeem
	MsgProofsCmd = "proofs"
	// MsgPartialExitsCmd subtract coins from a contract
	MsgPartialExitsCmd = "partialexit"
	// MsgExecution executes a bytecode that modifies the state
	MsgExecutionCmd = "execute"
)

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
	PayloadLength() 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) PayloadLength

func (m *MsgBlock) PayloadLength() uint64

PayloadLength returns the 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 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) PayloadLength

func (m *MsgDeposits) PayloadLength() uint64

PayloadLength returns the 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 MsgExecution

type MsgExecution struct {
	FromPubKey [48]byte
	To         [20]byte
	Input      []byte `ssz-max:"32768"`
	Signature  [96]byte
	Gas        uint64
	GasLimit   uint64
}

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

func (*MsgExecution) Command

func (m *MsgExecution) Command() string

Command returns the message topic

func (*MsgExecution) HashTreeRoot

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

HashTreeRoot ssz hashes the MsgExecution object

func (*MsgExecution) HashTreeRootWith

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

HashTreeRootWith ssz hashes the MsgExecution object with a hasher

func (*MsgExecution) Marshal

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

Marshal serializes the data to bytes

func (*MsgExecution) MarshalSSZ

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

MarshalSSZ ssz marshals the MsgExecution object

func (*MsgExecution) MarshalSSZTo

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

MarshalSSZTo ssz marshals the MsgExecution object to a target array

func (*MsgExecution) MaxPayloadLength

func (m *MsgExecution) MaxPayloadLength() uint64

MaxPayloadLength returns the maximum size of the MsgGetBlocks message.

func (*MsgExecution) PayloadLength

func (m *MsgExecution) PayloadLength() uint64

PayloadLength returns the size of the MsgExecution message.

func (*MsgExecution) SizeSSZ

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

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

func (*MsgExecution) Unmarshal

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

Unmarshal deserializes the data

func (*MsgExecution) UnmarshalSSZ

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

UnmarshalSSZ ssz unmarshals the MsgExecution 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) PayloadLength

func (m *MsgExits) PayloadLength() uint64

PayloadLength returns the 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) PayloadLength

func (m *MsgFinalization) PayloadLength() uint64

PayloadLength returns the size of the MsgFinalization 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) PayloadLength

func (m *MsgGetBlocks) PayloadLength() uint64

PayloadLength returns the 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) PayloadLength

func (m *MsgGovernance) PayloadLength() uint64

PayloadLength returns the 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 MsgMultiSignatureTx

type MsgMultiSignatureTx struct {
	Data *primitives.MultiSignatureTx
}

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

func (*MsgMultiSignatureTx) Command

func (m *MsgMultiSignatureTx) Command() string

Command returns the message topic

func (*MsgMultiSignatureTx) HashTreeRoot

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

HashTreeRoot ssz hashes the MsgMultiSignatureTx object

func (*MsgMultiSignatureTx) HashTreeRootWith

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

HashTreeRootWith ssz hashes the MsgMultiSignatureTx object with a hasher

func (*MsgMultiSignatureTx) Marshal

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

Marshal serializes the data to bytes

func (*MsgMultiSignatureTx) MarshalSSZ

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

MarshalSSZ ssz marshals the MsgMultiSignatureTx object

func (*MsgMultiSignatureTx) MarshalSSZTo

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

MarshalSSZTo ssz marshals the MsgMultiSignatureTx object to a target array

func (*MsgMultiSignatureTx) MaxPayloadLength

func (m *MsgMultiSignatureTx) MaxPayloadLength() uint64

MaxPayloadLength returns the maximum size of the MsgTxMulti message.

func (*MsgMultiSignatureTx) PayloadLength

func (m *MsgMultiSignatureTx) PayloadLength() uint64

PayloadLength returns the size of the MsgMultiSignatureTx message.

func (*MsgMultiSignatureTx) SizeSSZ

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

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

func (*MsgMultiSignatureTx) Unmarshal

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

Unmarshal deserializes the data

func (*MsgMultiSignatureTx) UnmarshalSSZ

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

UnmarshalSSZ ssz unmarshals the MsgMultiSignatureTx object

type MsgPartialExits

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

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

func (*MsgPartialExits) Command

func (m *MsgPartialExits) Command() string

Command returns the message topic

func (*MsgPartialExits) HashTreeRoot

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

HashTreeRoot ssz hashes the MsgPartialExits object

func (*MsgPartialExits) HashTreeRootWith

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

HashTreeRootWith ssz hashes the MsgPartialExits object with a hasher

func (*MsgPartialExits) Marshal

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

Marshal serializes the data to bytes

func (*MsgPartialExits) MarshalSSZ

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

MarshalSSZ ssz marshals the MsgPartialExits object

func (*MsgPartialExits) MarshalSSZTo

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

MarshalSSZTo ssz marshals the MsgPartialExits object to a target array

func (*MsgPartialExits) MaxPayloadLength

func (m *MsgPartialExits) MaxPayloadLength() uint64

MaxPayloadLength returns the maximum size of the MsgExits message.

func (*MsgPartialExits) PayloadLength

func (m *MsgPartialExits) PayloadLength() uint64

PayloadLength returns the size of the MsgPartialExits message.

func (*MsgPartialExits) SizeSSZ

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

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

func (*MsgPartialExits) Unmarshal

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

Unmarshal deserializes the data

func (*MsgPartialExits) UnmarshalSSZ

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

UnmarshalSSZ ssz unmarshals the MsgPartialExits object

type MsgProofs

type MsgProofs struct {
	Proofs []*burnproof.CoinsProofSerializable `ssz-max:"2048"`
}

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

func (*MsgProofs) Command

func (m *MsgProofs) Command() string

Command returns the message topic

func (*MsgProofs) HashTreeRoot

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

HashTreeRoot ssz hashes the MsgProofs object

func (*MsgProofs) HashTreeRootWith

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

HashTreeRootWith ssz hashes the MsgProofs object with a hasher

func (*MsgProofs) Marshal

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

Marshal serializes the data to bytes

func (*MsgProofs) MarshalSSZ

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

MarshalSSZ ssz marshals the MsgProofs object

func (*MsgProofs) MarshalSSZTo

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

MarshalSSZTo ssz marshals the MsgProofs object to a target array

func (*MsgProofs) MaxPayloadLength

func (m *MsgProofs) MaxPayloadLength() uint64

MaxPayloadLength returns the maximum size of the MsgVersion message.

func (*MsgProofs) PayloadLength

func (m *MsgProofs) PayloadLength() uint64

PayloadLength returns the size of the MsgProofs message.

func (*MsgProofs) SizeSSZ

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

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

func (*MsgProofs) Unmarshal

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

Unmarshal deserializes the data

func (*MsgProofs) UnmarshalSSZ

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

UnmarshalSSZ ssz unmarshals the MsgProofs object

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) PayloadLength

func (m *MsgTx) PayloadLength() uint64

PayloadLength returns the 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 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) PayloadLength

func (m *MsgValidatorStart) PayloadLength() uint64

PayloadLength returns the 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) PayloadLength

func (m *MsgVersion) PayloadLength() uint64

PayloadLength returns the 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) PayloadLength

func (m *MsgVote) PayloadLength() uint64

PayloadLength returns the 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