iguazu-consensus

module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: Apache-2.0

README

iguazu-consensus

Apache 2.0 Go library with the Iguazu consensus logic (DAG consensus, prevote, spine, block voting, deposits, withdrawals, fork choice scoring).

Part of the Iguazu protocol separation effort: extracts the Iguazu-specific consensus code out of the Prysm-based coordinator (GPL-3.0) into a clean, reusable Apache 2.0 module. The library has no Prysm/coordinator imports and operates on abstract interfaces (iface.BeaconState, iface.ExecutionEngine, iface.ForkChoice, ...), so it can be consumed both in-process by the coordinator and by the iguazu-coordinator sidecar.

Scope

  • DAG consensus processing
  • Deposit, voluntary exit, withdrawal processing
  • Spine data and block voting (including SSZ roots)
  • Prevote pool, aggregation, validation
  • Fork choice scoring (optimistic spines)
  • Consensus and prevote helpers
  • Shared types and interfaces (depends on iguazu-types)

Contributing

Iguazu is an LF Decentralized Trust project. See CONTRIBUTING.md for how to contribute, MAINTAINERS.md for the maintainers, SECURITY.md for reporting vulnerabilities and CODE_OF_CONDUCT.md for the Code of Conduct.

License

Apache License 2.0 — see LICENSE.

  • iguazu-types — shared types and interfaces
  • iguazu-engine / gwat — execution layer
  • iguazu-coordinator — Apache 2.0 sidecar for asynchronous Iguazu components
  • coordinator — Prysm fork (GPL-3.0) that imports this library

See plugin_plan/ in the parent workspace for the full separation plan.

Directories

Path Synopsis
Package blockvoting computes the SSZ HashTreeRoot of BlockVoting and CommitteeVote values, and provides the small set of helpers (aggregate, sort, copy, count) that the Iguazu block proposer and the state transition need when working with collections of block-votes.
Package blockvoting computes the SSZ HashTreeRoot of BlockVoting and CommitteeVote values, and provides the small set of helpers (aggregate, sort, copy, count) that the Iguazu block proposer and the state transition need when working with collections of block-votes.
Package dag implements the per-block DAG-consensus processing logic for the Iguazu beacon chain.
Package dag implements the per-block DAG-consensus processing logic for the Iguazu beacon chain.
Package forkchoice implements the Iguazu-specific fork-choice scoring logic.
Package forkchoice implements the Iguazu-specific fork-choice scoring logic.
Package helpers provides consensus-layer utility functions used by the DAG-consensus and withdrawal processors — and by the prevote P2P routing layer — without importing Prysm or coordinator internals.
Package helpers provides consensus-layer utility functions used by the DAG-consensus and withdrawal processors — and by the prevote P2P routing layer — without importing Prysm or coordinator internals.
Package prevote implements the Iguazu prevote pool: an in-memory cache of attestor prevote messages keyed by slot, with a separate "seen-bits" index that survives eviction for an epoch-long TTL.
Package prevote implements the Iguazu prevote pool: an in-memory cache of attestor prevote messages keyed by slot, with a separate "seen-bits" index that survives eviction for an epoch-long TTL.
Package spine computes the SSZ HashTreeRoot of SpineData — the Iguazu-specific field that threads DAG finalization hashes through the beacon block.
Package spine computes the SSZ HashTreeRoot of SpineData — the Iguazu-specific field that threads DAG finalization hashes through the beacon block.
Package ssz provides the subset of the Simple Serialize Merkleization primitives that Iguazu consensus objects require: BitwiseMerkleize, MixInLength, PackByChunk and a precomputed zero-hash table.
Package ssz provides the subset of the Simple Serialize Merkleization primitives that Iguazu consensus objects require: BitwiseMerkleize, MixInLength, PackByChunk and a precomputed zero-hash table.
Package withdrawal implements the per-block withdrawal processing logic for the Iguazu beacon chain.
Package withdrawal implements the per-block withdrawal processing logic for the Iguazu beacon chain.

Jump to

Keyboard shortcuts

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