Skip to main content

HieraChain - The Hierarchical Blockchain Enterprise Ledger

Python Versions License License PyPI version

English | Tiếng Việt

Overview

HieraChain is an enterprise ledger built on hierarchical blockchain technology, designed specifically for business applications without any cryptocurrency concepts. Rather than being a general-purpose blockchain platform focused on digital currencies, HieraChain provides a secure, hierarchical ledger structure for managing business operations and processes.

This ledger implements a multi-layer hierarchical architecture where Main Chains supervise Sub-Chains, enabling scalable and secure business process management. All operations within the system are referred to as "events" rather than "transactions," emphasizing its focus on business applications.

Key Features

  • Hierarchical Structure: Multi-layer architecture with Main Chains (supervisors) and Sub-Chains (domain experts).

  • Consensus Mechanisms: Supports Proof of Authority (PoA), Proof of Federation (PoF), and Byzantine Fault Tolerant (BFT) consensus.

  • High Performance: Columnar storage with Apache Arrow, hybrid caching, and parallel event processing.

  • Reliability & Recovery: Durable transaction journaling, automated failure recovery, and state rollback capabilities.

  • Comprehensive Security Architecture: An omnipresent, enterprise-grade security philosophy extending across the entire system lifecycle (not just a single module), built on 6 core pillars:

    • Authorization (ABAC Policy Engine & MSP)
    • Lockdown & Logging (Quorum-based Voting & Tamper-evident Logs)
    • Fault-tolerance (BFT & Federation)
    • Risk Analyzer (Real-time Z-score activity monitoring)
    • Encryption (AES-256-GCM for storage, Ed25519 for signatures)
    • Decentralized Zero-Knowledge Proofs (ZK Verifier for trustless chain anchoring)

Documentation

Comprehensive documentation is available at our official website docs.hierachain.org:

Quick Start

Installation

Via PIP (recommended)

pip install HieraChain

From source (for development)

Traditional pip method:

git clone https://github.com/VanDung-dev/HieraChain.git
cd HieraChain
python -m venv venv
source venv/bin/activate  # Linux/macOS (or venv\Scripts\activate on Windows)

# Install dependencies and project in dev mode
pip install -e .[dev]

Modern fast method with uv (recommended):

git clone https://github.com/VanDung-dev/HieraChain.git
cd HieraChain

# Install uv if not installed
curl -LsSf https://astral.sh/uv/install.sh | sh

# Auto create venv + install ALL dependencies in one command
uv sync

source .venv/bin/activate

Basic Usage

from hierachain.hierarchical import HierarchyManager

manager = HierarchyManager()
manager.create_sub_chain("supply_chain")

# Add an event
manager.add_event("supply_chain", {
    "entity_id": "PROD-001",
    "event": "production_complete",
    "timestamp": 1703088000.0,
    "details": {"quantity": 100}
})

# Submit proof to main chain
manager.submit_proof("supply_chain")

API Server:

python -m hierachain

API available at http://localhost:2661/docs

Technical Specifications

Metric Value
Test Cases >700
Python Support 3.10, 3.11, 3.12, 3.13
Consensus Types PoA, PoF, BFT
Signature Algorithm Ed25519
Encryption AES-256-GCM

License

This project is dual licensed under either the Apache-2.0 License or the MIT License. You may choose either license.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hierachain-0.0.6.tar.gz (384.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hierachain-0.0.6-py3-none-any.whl (461.9 kB view details)

Uploaded Python 3

File details

Details for the file hierachain-0.0.6.tar.gz.

File metadata

  • Download URL: hierachain-0.0.6.tar.gz
  • Upload date:
  • Size: 384.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for hierachain-0.0.6.tar.gz
Algorithm Hash digest
SHA256 adfe4a2cf788906ea5cdefb5cc9cf05acb0418647c9407c62843e2f8e29e3e3b
MD5 4f52fd0f8ed218015708a516d839a9d6
BLAKE2b-256 6fc3c1369adc4ebdbc62e64260a6091f26a1149a289baf4fcaa2cc6914bdbd7d

See more details on using hashes here.

File details

Details for the file hierachain-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: hierachain-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 461.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for hierachain-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 0c1d5c053480042fc31fc194879a159b33fe0ad44dd4cf1d3f79e64096d7f2e5
MD5 90c42e717ae07af1fa9b31ba5c2629df
BLAKE2b-256 c9b599127f8a9677accc111157314f3f8ddc59fb1f255bbc1b7a81dd63fb82f3

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.0

2 files

0.1.0

2 files

This release

0.0.6 This release

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page