Repository navigation
v0.0.1.dev1
Pre-releaseHieraChain Consensus v0.0.1.dev1 - Initial Development Release
Pre-release Warning: This is a development preview and is not intended for production use. APIs may change without notice.
What's New
This is the first public development release of hierachain-consensus, the official Core Consensus implementation of the HieraChain ecosystem. This high-performance Rust-based library is the recommended choice for production deployments, offering superior performance over the pure Python implementation included in HieraChain.
Core Features
Consensus Mechanisms
- Proof of Federation (PoF): Round-robin rotating leader consensus for consortium blockchains
- Byzantine Fault Tolerance (BFT): 3-phase commit protocol (pre-prepare, prepare, commit)
- Proof of Authority (PoA): Authority-based consensus for trusted networks
- Ordering Service: Multi-node ordering service with leader election and event queuing
Block Management
- Efficient block creation with Merkle tree verification
- Blockchain validation and integrity checks
- Apache Arrow integration for zero-copy data transfer between Rust and Python
Cryptographic Security
- Ed25519 key pair generation and management
- Digital signature creation and verification
- Secure message signing for consensus protocols
Error Mitigation
- Error classification and priority management
- Consensus validation with configurable thresholds
- Recovery mechanisms and audit journaling
Technical Highlights
- Rust Implementation: High-performance, memory-safe core
- Python Bindings: Seamless integration using PyO3
- Arrow Integration: Zero-copy interoperability with PyArrow
- Async Runtime: Tokio-based asynchronous operations
- FFI Support: C-compatible exports for external integration (
cdylib+staticlib)
Related Projects
HieraChain Consensus is the official Core Consensus of the HieraChain ecosystem. There are two related projects:
1. HieraChain - Python Framework
The main hierarchical blockchain framework written in Python. It provides:
- Complete hierarchical blockchain implementation
- Main Chain and Sub Chain management
- Smart contract support
- REST API and CLI interfaces
- Includes pure Python consensus (functional but less optimized)
- Integration with
hierachain-consensusfor high-performance operations
2. HieraChain-Engine - Go Implementation
The Go-based blockchain engine that provides:
- Alternative high-performance implementation
- Native blockchain node operations
- Network layer and P2P communication
- Can integrate with
hierachain-consensusvia FFI (C-compatible exports)
3. This Repository: HieraChain-Consensus (Rust) - Official Core Consensus
This Rust crate is the official and optimized Core Consensus of HieraChain:
- High-performance consensus algorithms (PoF, BFT, PoA)
- Cryptographic operations (Ed25519)
- Block and Merkle tree operations
- Python bindings via PyO3 (for HieraChain integration)
- C-compatible FFI exports (for HieraChain-Engine integration)
Why Rust over Python? While HieraChain's Python implementation includes consensus algorithms, this Rust implementation offers 10-100x better performance for consensus-critical operations, memory safety guarantees, and seamless integration via PyO3 bindings. For production deployments, this is the recommended choice.
Known Limitations
- Not production-ready
- Documentation still in progress
- Some FFI functions are placeholder implementations
Dependencies
| Crate | Version | Purpose |
|---|---|---|
pyo3 |
0.26.0 | Python bindings |
arrow |
57.0.0 | Apache Arrow integration |
tokio |
1.0.0 | Async runtime for BFT |
ed25519-dalek |
2.0.0 | Ed25519 signatures |
serde / serde_json |
1.0.0 | Serialization |
sha2 |
0.10.0 | SHA-256 hashing |
Links
Documentation
Ecosystem
- HieraChain - Python Framework (Main Project)
- HieraChain-Engine - Go Implementation
Full Changelog: https://github.com/VanDung-dev/HieraChain-Consensus/commits/v0.0.1.dev1