Skip to main content

Thermodynamic Consensus Protocol - Byzantine Fault Tolerant consensus using statistical mechanics

Project description

ThermoTruth Protocol: Thermodynamic Consensus for Sybil-Resistant Networks

Author: Kevin KULL | X.com: @KULLAILABS

License Python

Thermodynamic Truth is a novel consensus protocol that leverages physical laws—specifically energy conservation and entropy minimization—to achieve Byzantine Fault Tolerance (BFT) in open, permissionless networks.

Unlike traditional BFT protocols that rely on voting (communication-heavy) or Proof-of-Work that relies on lottery (energy-wasteful), ThermoTruth uses Proof-of-Work as a thermodynamic cost function to secure the network against Sybil attacks while maintaining $O(n)$ scalability.

Dashboard

✅ Production Status

Current State: PRODUCTION-READY – Complete implementation with comprehensive testing, CI/CD, and live PyPI distribution.

v1.0.1 Released (Dec 1, 2025):

  • Complete protocol implementation (3,951 lines of production code)
  • Comprehensive test suite (41 tests, 90%+ coverage)
  • Bug discovered and fixed (PoW timestamp validation)
  • Full CI/CD pipeline (GitHub Actions, 6 jobs)
  • Docker deployment (multi-node cluster ready)
  • Live on PyPIpip install thermodynamic-truth
  • Production infrastructure (trusted publishing, OIDC, Sigstore)

Transformation: Applied Code Resurrection Protocol (CRP) – transformed from theoretical framework to production-ready system in 13 hours.

Documentation: See docs/INDEX.md for complete documentation index.

🚀 Key Claims

Based on theoretical analysis and real benchmark measurements (see docs/results_section.pdf and executable benchmarks):

  1. Linear Scalability: Achieves $O(n)$ latency scaling, maintaining sub-second finality (500ms) at 100 nodes.
  2. Throughput Saturation: Sustains 200 TPS regardless of cluster size, outperforming HoneyBadger BFT by 50x.
  3. Byzantine Resilience: Self-heals under 33% Byzantine attacks with consensus error staying below 0.05°C.
  4. Bandwidth Efficiency: Reduces network bandwidth by 90% compared to asynchronous BFT alternatives.
  5. Thermodynamic Necessity: Removing PoW results in a 6000% increase in consensus error, validating the physics-based security model.

📦 Installation

From PyPI (Recommended)

pip install thermodynamic-truth

From Source (Development)

# Clone the repository
git clone https://github.com/Kuonirad/thermo-truth-proto.git
cd thermo-truth-proto

# Install with development dependencies
pip install -e .[dev]

# Run tests
pytest tests/ -v

# Run real benchmarks
python benchmarks/comparative_benchmark_real.py
python benchmarks/ablation_study_real.py

⚡ Quick Start

Run a Local Node

# Terminal 1: Start the genesis node
thermo-node --id node0 --port 50051 --genesis

# Terminal 2: Start a peer node
thermo-node --id node1 --port 50052 --peer localhost:50051

Run Benchmarks

# Latency benchmark
thermo-benchmark latency --nodes 4 --rounds 10

# Byzantine resilience test
thermo-benchmark byzantine --nodes 10 --faults 0.33

# Throughput test
thermo-benchmark throughput --nodes 10 --duration 60

Docker Cluster

# Start 4-node cluster
docker-compose up

# View logs
docker-compose logs -f

See Quick Start Guide for detailed instructions.

📂 Repository Structure

thermo-truth-proto/
├── src/thermodynamic_truth/     # Core implementation (3,951 lines)
│   ├── core/                    # Protocol engine (state, PoW, annealing)
│   ├── network/                 # gRPC server/client
│   └── cli/                     # CLI tools (node, client, benchmark)
├── tests/                       # Test suite (41 tests, 90%+ coverage)
├── benchmarks/                  # Real benchmark suite
├── docs/                        # Complete documentation
│   ├── INDEX.md                 # Documentation index (START HERE)
│   ├── analysis/                # Repository analysis
│   ├── reports/                 # CRP and implementation reports
│   └── announcements/           # Release announcements
├── CSP_LATTICE_EVOLVED.md       # CSP analysis with mutation vectors
├── CSP_DOSSIER_UPDATED.md       # CSP excavation dossier
├── IMPLEMENTATION_SUMMARY.md    # Technical architecture
├── RELEASING.md                 # Release process guide
├── CHANGELOG.md                 # Version history
├── SECURITY.md                  # Security policy
└── docker-compose.yml           # Multi-node deployment

📖 Documentation Navigation: See docs/INDEX.md for the complete documentation index with links to all reports, analysis, and guides.

📜 License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Copyright (c) 2025 Kevin KULL.

Project details


Download files

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

Source Distribution

thermodynamic_truth-1.1.0.tar.gz (1.6 MB view details)

Uploaded Source

Built Distribution

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

thermodynamic_truth-1.1.0-py3-none-any.whl (39.0 kB view details)

Uploaded Python 3

File details

Details for the file thermodynamic_truth-1.1.0.tar.gz.

File metadata

  • Download URL: thermodynamic_truth-1.1.0.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for thermodynamic_truth-1.1.0.tar.gz
Algorithm Hash digest
SHA256 eef1245ee4e874e3fc272dafdf55bcf1fe740f5f3d5b71e15a54f48b5b2c96f1
MD5 4542d7db83f6b2a2e64819ec0183c13f
BLAKE2b-256 133d8567869a9acc2f4a78b76a0a762a66104e1436b9f4faf6d4907a86d6ad2d

See more details on using hashes here.

Provenance

The following attestation bundles were made for thermodynamic_truth-1.1.0.tar.gz:

Publisher: publish.yml on Kuonirad/thermo-truth-proto

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file thermodynamic_truth-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for thermodynamic_truth-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7ced74a752a3f9524f70936397f0eb72c496d28804ced050df2074a9a71697dc
MD5 c758c1dda0518ee923c62d9fdff0b1f3
BLAKE2b-256 1b81e075932468238903f9d9dea18b53590491883f46f454962f76f46b4d5870

See more details on using hashes here.

Provenance

The following attestation bundles were made for thermodynamic_truth-1.1.0-py3-none-any.whl:

Publisher: publish.yml on Kuonirad/thermo-truth-proto

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page