Documentation
¶
Overview ¶
Package chain implements linear consensus protocol.
Chain handles sequential blocks in a linear topology, where each block extends exactly one parent. The consensus pipeline flows: photon → wave → focus → nova, terminating in single-threaded finality. This is the classical blockchain model: one block, one parent, one chain.
Index ¶
- type Engine
- type Transitive
- func (t *Transitive) GetBlock(ctx context.Context, nodeID ids.NodeID, requestID uint32, blockID ids.ID) error
- func (t *Transitive) HealthCheck(ctx context.Context) (interface{}, error)
- func (t *Transitive) IsBootstrapped() bool
- func (t *Transitive) Start(ctx context.Context, requestID uint32) error
- func (t *Transitive) Stop(ctx context.Context) error
- type Transport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine interface {
// Start starts the engine
Start(context.Context, uint32) error
// Stop stops the engine
Stop(context.Context) error
// HealthCheck performs a health check
HealthCheck(context.Context) (interface{}, error)
// IsBootstrapped returns whether the chain is bootstrapped
IsBootstrapped() bool
}
Engine defines the chain consensus engine
type Transitive ¶
type Transitive struct {
// contains filtered or unexported fields
}
Transitive implements transitive chain consensus
func (*Transitive) GetBlock ¶
func (t *Transitive) GetBlock(ctx context.Context, nodeID ids.NodeID, requestID uint32, blockID ids.ID) error
GetBlock gets a block by ID
func (*Transitive) HealthCheck ¶
func (t *Transitive) HealthCheck(ctx context.Context) (interface{}, error)
HealthCheck performs a health check
func (*Transitive) IsBootstrapped ¶
func (t *Transitive) IsBootstrapped() bool
IsBootstrapped returns whether the chain is bootstrapped
Directories
¶
| Path | Synopsis |
|---|---|
|
blockmock
Package blockmock is a generated GoMock package.
|
Package blockmock is a generated GoMock package. |
|
blocktest
Package blocktest provides test utilities for blocks
|
Package blocktest provides test utilities for blocks |
|
Package chainmock provides mock implementations for testing
|
Package chainmock provides mock implementations for testing |
|
Package chaintest provides test utilities for chains
|
Package chaintest provides test utilities for chains |
Click to show internal directories.
Click to hide internal directories.