messages

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2022 License: Apache-2.0, BSD-2-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MsgGetBlock = 1 + peering.FirstUserMsgCode + iota
	MsgBlock
	MsgSignedResult
	MsgSignedResultAck
	MsgOffLedgerRequest
	MsgMissingRequestIDs
	MsgMissingRequest
	MsgRequestAck
)

Message types for the committee communications.

Variables

This section is empty.

Functions

This section is empty.

Types

type AsynchronousCommonSubsetMsg

type AsynchronousCommonSubsetMsg struct {
	ProposedBatchesBin [][]byte
	SessionID          uint64
	LogIndex           journal.LogIndex
}

AsynchronousCommonSubsetMsg

type BlockMsg

type BlockMsg struct {
	BlockBytes []byte
}

BlockMsg StateManager in response to GetBlockMsg sends block data to the querying node's StateManager StateManager -> StateManager

func NewBlockMsg added in v0.2.3

func NewBlockMsg(data []byte) (*BlockMsg, error)

func (*BlockMsg) Write

func (msg *BlockMsg) Write(w io.Writer) error

type BlockMsgIn added in v0.2.3

type BlockMsgIn struct {
	BlockMsg
	SenderPubKey *cryptolib.PublicKey
}

type DssIndexProposalMsg added in v0.3.0

type DssIndexProposalMsg struct {
	DssKey        string
	IndexProposal []int
}

type DssSignatureMsg added in v0.3.0

type DssSignatureMsg struct {
	DssKey    string
	Signature []byte
}

type GetBlockMsg

type GetBlockMsg struct {
	BlockIndex uint32
}

GetBlockMsg StateManager queries specific block data from another peer (access node) StateManager -> StateManager

func NewGetBlockMsg added in v0.2.3

func NewGetBlockMsg(data []byte) (*GetBlockMsg, error)

func (*GetBlockMsg) Write

func (msg *GetBlockMsg) Write(w io.Writer) error

type GetBlockMsgIn added in v0.2.3

type GetBlockMsgIn struct {
	GetBlockMsg
	SenderPubKey *cryptolib.PublicKey
}

type MissingRequestIDsMsg

type MissingRequestIDsMsg struct {
	IDs []isc.RequestID
}

func NewMissingRequestIDsMsg

func NewMissingRequestIDsMsg(data []byte) (*MissingRequestIDsMsg, error)

func (*MissingRequestIDsMsg) Bytes

func (msg *MissingRequestIDsMsg) Bytes() []byte

type MissingRequestIDsMsgIn added in v0.2.3

type MissingRequestIDsMsgIn struct {
	MissingRequestIDsMsg
	SenderPubKey *cryptolib.PublicKey
}

type MissingRequestMsg

type MissingRequestMsg struct {
	Request isc.Request
}

func NewMissingRequestMsg

func NewMissingRequestMsg(data []byte) (*MissingRequestMsg, error)

func (*MissingRequestMsg) Bytes

func (msg *MissingRequestMsg) Bytes() []byte

type OffLedgerRequestMsg

type OffLedgerRequestMsg struct {
	ChainID *isc.ChainID
	Req     isc.OffLedgerRequest
}

func NewOffLedgerRequestMsg

func NewOffLedgerRequestMsg(chainID *isc.ChainID, req isc.OffLedgerRequest) *OffLedgerRequestMsg

func OffLedgerRequestMsgFromBytes

func OffLedgerRequestMsgFromBytes(data []byte) (*OffLedgerRequestMsg, error)

func (*OffLedgerRequestMsg) Bytes

func (msg *OffLedgerRequestMsg) Bytes() []byte

type OffLedgerRequestMsgIn added in v0.2.3

type OffLedgerRequestMsgIn struct {
	OffLedgerRequestMsg
	SenderPubKey *cryptolib.PublicKey
}

type OutputMsg added in v0.3.0

type OutputMsg struct {
	Output iotago.Output
	ID     *iotago.UTXOInput
}

Level 1 sends new state output to state manager

type PeerLogIndexMsg added in v0.3.0

type PeerLogIndexMsg struct {
	LogIndex journal.LogIndex
}

Consensus -> Consensus

Used to resync between consensus nodes on the last log index. This is needed to recover from misc failures, downtimes, etc.

func NewPeerLogIndexMsg added in v0.3.0

func NewPeerLogIndexMsg(data []byte) (*PeerLogIndexMsg, error)

func (*PeerLogIndexMsg) Bytes added in v0.3.0

func (msg *PeerLogIndexMsg) Bytes() ([]byte, error)

func (*PeerLogIndexMsg) Write added in v0.3.0

func (msg *PeerLogIndexMsg) Write(w io.Writer) error

type PeerLogIndexMsgIn added in v0.3.0

type PeerLogIndexMsgIn struct {
	PeerLogIndexMsg
	SenderIndex uint16
}

type RequestAckMsg added in v0.2.3

type RequestAckMsg struct {
	ReqID *isc.RequestID
}

func NewRequestAckMsg

func NewRequestAckMsg(buf []byte) (*RequestAckMsg, error)

func (*RequestAckMsg) Bytes added in v0.2.3

func (msg *RequestAckMsg) Bytes() []byte

type RequestAckMsgIn added in v0.2.3

type RequestAckMsgIn struct {
	RequestAckMsg
	SenderPubKey *cryptolib.PublicKey
}

type StateCandidateMsg

type StateCandidateMsg struct {
	State             state.VirtualStateAccess
	ApprovingOutputID *iotago.UTXOInput
}

StateCandidateMsg Consensus sends the finalized next state to StateManager

type StateMsg

type StateMsg struct {
	ChainOutput *isc.AliasOutputWithID
	Timestamp   time.Time
}

StateMsg txstream plugin sends the only existing AliasOutput in the chain's address to StateManager

type StateTransitionMsg

type StateTransitionMsg struct {
	// is transition a governance update
	IsGovernance bool
	// new variable state
	State state.VirtualStateAccess
	// corresponding state transaction
	StateOutput *isc.AliasOutputWithID
	//
	StateTimestamp time.Time
}

StateTransitionMsg Notifies chain about changed

type TimerTick

type TimerTick int

type TxInclusionStateMsg added in v0.3.0

type TxInclusionStateMsg struct {
	TxID  iotago.TransactionID
	State string
}

InclusionStateMsg txstream plugin sends inclusions state of the transaction to ConsensusOld

type VMResultMsg

type VMResultMsg struct {
	Task *vm.VMTask
}

VMResultMsg Consensus -> Consensus. VM sends result of async task started by Consensus to itself

Jump to

Keyboard shortcuts

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