messages

package
v0.0.0-...-db4fafb Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Index

Constants

View Source
const (
	MsgBlock          byte = iota // breeze protocol new block with heder
	MsgAction                     // sinsgle action
	MsgActionArray                // multiple actions
	MsgSyncRequest                // Request Syncrhonization starting at given epoch
	MsgActionSubmit               // Submit action to the network
	MsgSyncError                  // Cannot synchronize
	MsgNewBlock                   // Breeze new block with header
	MsgSeal                       // Breeze Seal Block with seal
	MsgCommit                     // Breeze Node own Commit Block with invalidated
	MsgBuilding                   // Block under constructions
	MsgSealedBlock                // Block Seal
	MsgCommittedBlock             // Block Commit

	MsgProtocolHeader      // Sub-Protocol New Block Message
	MsgProtocolActionArray // Sub-Protocol Action Array Message
	MsgProtocolNewAction   // Sub-Protocol New Action Message
	MsgProtocolSeal        // Sub-Protool Seal Block Message
	MsgProtocolCommit      // Sub-Protocol Commit Block Message
	MsgProtocolSealedBlock
	MsgProtocolCommitBlock // Sub-Protocol Full Block Message
	MsgProtocolBlock
	MsgProtocolBlockCommit
	MsgProtocolSyncReq
	MsgProtocolSyncResp
	MsgProtocolChecksumSync
	MsgProtocolStateSync
	MsgProtocolSubscribe
	MsgCommittee

	MsgRequestBlock // Request a block
	MsgClockSync
	MsgSyncChecksum
	MsgSyncStateWallets
	MsgSyncStateDeposits
	MsgSyncStateEpochAndHash
	MsgChecksumStatement
	MsgNetworkTopologyReq
	MsgNetworkTopologyResponse
	MsgNextCommittee
	MsgSubscribeBlockEvents

	MsgActionForward
	MsgActionSealed
	MsgActionCommit

	MsgError
)

TODO: this must be revised

Variables

This section is empty.

Functions

func ActionMessage

func ActionMessage(action []byte) []byte

func BlockMessage

func BlockMessage(block []byte) []byte

func BlockSealMessage

func BlockSealMessage(epoch uint64, seal []byte) []byte

func Commit

func Commit(epoch uint64, hash crypto.Hash, commit []byte) []byte

func CommitBlock

func CommitBlock(epoch uint64, commit []byte) []byte

func NewBlockMessage

func NewBlockMessage(header []byte) []byte

func ParseEpochAndHash

func ParseEpochAndHash(data []byte) (uint64, crypto.Hash, []byte)

func ParseSealedAction

func ParseSealedAction(msg []byte) (crypto.Hash, uint64, crypto.Hash)

func RequestBlockMessage

func RequestBlockMessage(epoch uint64, hash crypto.Hash) []byte

func SealedAction

func SealedAction(action crypto.Hash, block uint64, blockHash crypto.Hash) []byte

func SealedBlock

func SealedBlock(sealed []byte) []byte

func SubmitActionMessage

func SubmitActionMessage(action []byte) []byte

func SyncErrroMessage

func SyncErrroMessage(msg string) []byte

func SyncMessage

func SyncMessage(epoch uint64) []byte

Types

type NetworkTopology

type NetworkTopology struct {
	Start      uint64
	End        uint64
	StartAt    time.Time
	Order      []crypto.Token
	Validators []socket.TokenAddr
}

func ParseNetworkTopologyMessage

func ParseNetworkTopologyMessage(data []byte) *NetworkTopology

func (*NetworkTopology) Serialize

func (n *NetworkTopology) Serialize() []byte

Jump to

Keyboard shortcuts

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