Documentation
¶
Index ¶
Constants ¶
View Source
const CodecVersion = 0
Variables ¶
View Source
var Codec codec.Manager
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block interface {
ID() ids.ID
ParentID() ids.ID
Block() []byte
Bytes() []byte
// contains filtered or unexported methods
}
func BuildOption ¶
BuildOption the option block [parentID] is the ID of this option's wrapper parent block [innerBytes] is the byte representation of a child option block
func Parse ¶
Parse a block and verify that the signature attached to the block is valid for the certificate provided in the block.
func ParseWithoutVerification ¶
ParseWithoutVerification parses a block without verifying that the signature on the block is correct.
type Epoch ¶ added in v1.16.56
type Epoch struct {
PChainHeight uint64 `serialize:"true" json:"pChainHeight"`
Number uint64 `serialize:"true" json:"number"`
StartTime int64 `serialize:"true" json:"startTime"`
}
Epoch represents a P-Chain epoch for validator set coordination
type ParseResult ¶
func ParseBlocks ¶
func ParseBlocks(blks [][]byte, chainID ids.ID) []ParseResult
ParseBlocks parses the given raw blocks into tuples of (Block, error). Each ParseResult is returned in the same order as its corresponding bytes in the input.
type SignedBlock ¶
type SignedBlock interface {
Block
PChainHeight() uint64
PChainEpoch() Epoch
Timestamp() time.Time
// Proposer returns the ID of the node that proposed this block. If no node
// signed this block, [ids.EmptyNodeID] will be returned.
Proposer() ids.NodeID
// Data Availability fields (v1.1 spec)
DARoot() [32]byte // Root of DA commitments
WitnessRoot() [32]byte // Root of witnesses/proofs
MessagesOutRoot() [32]byte // Root of outgoing cross-chain messages
BlobCount() uint32 // Number of DA blobs in block
}
Click to show internal directories.
Click to hide internal directories.