Run NodesReferencevmsproposervm

block

Package block

import "github.com/luxfi/node/vms/proposervm/block"

Types

Block

func BuildOption(
	parentID ids.ID,
	innerBytes []byte,
) (Block, error)
func Parse(bytes []byte, chainID ids.ID) (Block, error)
func ParseWithoutVerification(bytes []byte) (Block, error)

Epoch

Epoch represents a P-Chain epoch for validator set coordination

func BuildHeader(
	chainID ids.ID,
	parentID ids.ID,
	bodyID ids.ID,
) (Header, error)
func ParseHeader(bytes []byte) (Header, error)

ParseResult

func ParseBlocks(blks [][]byte, chainID ids.ID) []ParseResult

SignedBlock

func Build(
	parentID ids.ID,
	timestamp time.Time,
	pChainHeight uint64,
	epoch Epoch,
	cert *staking.Certificate,
	blockBytes []byte,
	chainID ids.ID,
	key crypto.Signer,
) (SignedBlock, error)
func BuildMLDSA(
	parentID ids.ID,
	timestamp time.Time,
	pChainHeight uint64,
	epoch Epoch,
	mldsaPub []byte,
	blockBytes []byte,
	chainID ids.ID,
	key *mldsa.PrivateKey,
) (SignedBlock, error)
func BuildUnsigned(
	parentID ids.ID,
	timestamp time.Time,
	pChainHeight uint64,
	epoch Epoch,
	blockBytes []byte,
) (SignedBlock, error)