chain

package
v1.22.45 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2025 License: BSD-3-Clause Imports: 3 Imported by: 11

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

Jump to

Keyboard shortcuts

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