Documentation
¶
Overview ¶
Package chain provides basic blockchain primitives and interfaces.
This package defines the fundamental Block interface and common chain operations used across linear consensus implementations. It serves as the foundation for chain-based consensus modes like Nova.
Key types:
- Block: interface for blockchain blocks
- ChainState: state tracking for linear chains
- BlockID: unique block identifier type
The chain package is intentionally minimal, providing only the essential primitives needed by other consensus packages. Higher-level functionality is provided by packages like nova (linear consensus) and ray (linear driver).
See also: nova (linear consensus mode), ray (linear consensus driver).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block interface {
ID() ids.ID
Parent() ids.ID // Alias for ParentID for compatibility
ParentID() ids.ID
Height() uint64
Timestamp() time.Time
Bytes() []byte
Status() uint8
Accept(context.Context) error
Reject(context.Context) error
Verify(context.Context) error
}
Block represents a blockchain block
Click to show internal directories.
Click to hide internal directories.