Package com.privatechain.consensus
package com.privatechain.consensus
Built-in
ConsensusEngine implementations for the
private-blockchain library.
Four production-ready engines are provided, covering the most common use cases for permission blockchain networks:
com.privatechain.consensus.pow— SHA-256 Proof of Work with configurable difficulty and automatic recalibration.com.privatechain.consensus.poa— Proof of Authority; only nodes whose addresses are in a configured signer set may produce blocks (AC-02).com.privatechain.consensus.pbft— Practical Byzantine Fault Tolerance; two-phase (prepare → commit) protocol tolerating up tofByzantine nodes where total validators ≥ 3f+1 (NFR-REL-03).com.privatechain.consensus.roundrobin— deterministic slot-based block production for local development and testing (FR-CONS-05).
ConsensusSupport provides shared block-assembly
utilities used by all four engines and by custom engine implementations.
Any class that implements ConsensusEngine can be
injected via BlockchainConfig.builder()
(FR-CONS-06). The built-in engines serve as reference implementations.
- Since:
- 1.0.0
-
Classes