{"id":34637119,"url":"https://github.com/dfeen87/ailee-protocol-core-for-bitcoin","last_synced_at":"2026-04-06T00:12:06.749Z","repository":{"id":328052549,"uuid":"1112431576","full_name":"dfeen87/AILEE-Protocol-Core-For-Bitcoin","owner":"dfeen87","description":"AILEE‑Core is a production‑ready Bitcoin Layer‑2 framework delivering high throughput, verifiable recovery, and energy telemetry. Hardened AI orchestration ensures resilient scaling and adaptive trust across global networks.","archived":false,"fork":false,"pushed_at":"2026-01-30T22:32:18.000Z","size":672,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-31T14:35:22.834Z","etag":null,"topics":["ailee","ambient","architecture","bitcoin","blockchain","decentralized","defi","encryption","ethereum","gold","internet","open-source","plug-and-play","production-ready","software"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dfeen87.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"docs/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"dfeen87"}},"created_at":"2025-12-08T16:04:47.000Z","updated_at":"2026-01-30T22:30:37.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/dfeen87/AILEE-Protocol-Core-For-Bitcoin","commit_stats":null,"previous_names":["dfeen87/ailee-protocol-core-for-bitcoin"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/dfeen87/AILEE-Protocol-Core-For-Bitcoin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfeen87%2FAILEE-Protocol-Core-For-Bitcoin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfeen87%2FAILEE-Protocol-Core-For-Bitcoin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfeen87%2FAILEE-Protocol-Core-For-Bitcoin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfeen87%2FAILEE-Protocol-Core-For-Bitcoin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dfeen87","download_url":"https://codeload.github.com/dfeen87/AILEE-Protocol-Core-For-Bitcoin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfeen87%2FAILEE-Protocol-Core-For-Bitcoin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29211545,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T22:58:45.823Z","status":"ssl_error","status_checked_at":"2026-02-07T22:58:45.272Z","response_time":63,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ailee","ambient","architecture","bitcoin","blockchain","decentralized","defi","encryption","ethereum","gold","internet","open-source","plug-and-play","production-ready","software"],"created_at":"2025-12-24T17:03:52.323Z","updated_at":"2026-04-06T00:12:06.742Z","avatar_url":"https://github.com/dfeen87.png","language":"C++","funding_links":["https://github.com/sponsors/dfeen87"],"categories":[],"sub_categories":[],"readme":"# AILEE Protocol Core for Bitcoin: **Ambient AI + Bitcoin Layer-2 Orchestration Framework**\n\n*Building Intelligent, Verifiable, and Sustainable Bitcoin Infrastructure*\n\n[![C++ Standard](https://img.shields.io/badge/C%2B%2B-17-blue.svg)](https://isocpp.org/)\n[![CMake](https://img.shields.io/badge/CMake-3.10+-blue.svg)](https://cmake.org/)\n[![FastAPI](https://img.shields.io/badge/FastAPI-Python-green.svg)](https://fastapi.tiangolo.com/)\n[![Bitcoin](https://img.shields.io/badge/Bitcoin-Layer--2-orange.svg)](https://bitcoin.org/)\n[![Status](https://img.shields.io/badge/Status-Research%20%2F%20Pre--Production-yellow.svg)](https://github.com/dfeen87/AILEE-Protocol-Core-For-Bitcoin)\n\n**[Documentation](docs/)** | **[Quick Start](#-quick-start)** | **[API Reference](API_QUICKSTART.md)** | **[Architecture](docs/ARCHITECTURE_CONCEPTUAL.md)** | **[Contributing](docs/CONTRIBUTING.md)**\n\n---\n\n## 📖 Table of Contents\n\n- [Overview](#-overview)\n- [Key Features](#-key-features)\n- [Testing \u0026 Validation](#-testing--validation)\n- [Quick Start](#-quick-start)\n- [Architecture](#-architecture)\n- [Security Model](#-security-model)\n- [Technology Stack](#-technology-stack)\n- [Documentation](#-documentation)\n- [Contributing](#-contributing)\n- [License](#-license)\n\n---\n\n## 🎯 Overview\n\n**AILEE-Core** is a Bitcoin Layer-2 orchestration and verification framework. It leverages ambient AI for intelligent task scheduling and a recovery-first design to extend Bitcoin's capabilities without modifying its consensus rules.\n\n\u003e ⚠️ **Important**: This repository is a **research and pre-production framework** and is **NOT ready for mainnet deployment**. The codebase contains multiple components that are mocked or stubbed (ZK proofs, full ECDSA signature verification, federated networking). Do not use this software to manage real funds or production assets. Please review `AUDIT_REPORT.md` for a full list of known limitations. Third-party auditing and professional oversight are strictly required prior to any production use.\n\n\u003e **Note**: Certain cryptographic primitives (like ZK proofs) are currently implemented as mocks to facilitate development and testing. These must be replaced with real circuits (e.g., libsnark, Halo2) and thoroughly audited before any mainnet deployment.\n\n### Why AILEE?\n\n1.  **Reorg Awareness**: Built-in reorg detection logs L1 reorganizations to protect L2 state.\n2.  **Orchestration Framework**: Ambient AI optimizes task distribution across a decentralized mesh.\n3.  **Verifiable (in progress)**: Zero-Knowledge (ZK) proof scaffolding and deterministic state commitments allow for trust-minimized verification once real circuits are integrated.\n4.  **Bitcoin-Native**: Respects Bitcoin as the ultimate settlement layer.\n\n---\n\n## ✨ Key Features\n\n### 🛡️ Reorg Detection\n- **RocksDB-Backed Persistence**: Tracks Bitcoin block history and reorg events with high performance.\n- **Deep Reorg Detection**: Detects deep blockchain reorganizations (\u003e6 blocks) and logs warnings.\n- **State Safety**: Logs reorg events to allow operators to verify L2 state against the new L1 chain.\n- **Integration**: Wired to the Bitcoin ZMQ listener for real-time block tracking.\n\n### 🧠 Ambient AI Orchestration\n- **Intelligent Task Scheduling**: Weighted, round-robin, least-loaded, and latency-aware strategies.\n- **Reputation-Based Assignment**: Node scoring with capacity, cost, and energy considerations.\n- **Byzantine Detection**: Outlier-based heuristics for anomaly detection.\n- **Deterministic Verification**: Hash-based commitments with integrity checks.\n\n### ⛓️ Bitcoin Layer-2 Infrastructure\n- **SPV Verification**: Trust-minimized Bitcoin event verification.\n- **Deterministic Anchoring**: OP_RETURN and Taproot commitment construction.\n- **Federated Bridge**: Multisig quorum-based peg-in/peg-out lifecycle.\n- **Offline Verifier**: `ailee_l2_verify` tool for third-party audits.\n\n### 🌐 Web \u0026 API Integration\n- **REST API**: FastAPI-based production server with OpenAPI docs.\n- **Web Dashboard**: Real-time monitoring interface.\n- **Health Checks**: Built-in monitoring and observability.\n\n---\n\n## 🧪 Testing \u0026 Validation\n\n**Confidence requires verification.** While AILEE-Core is built with powerful and secure primitives, the responsibility of operating financial infrastructure demands rigorous and continuous testing.\n\nWe stress the importance of the following validation steps before any mainnet deployment:\n\n1.  **Unit \u0026 Integration Testing**: Run the full test suite (`ctest`) to verify all components, including the new Reorg Detector and Adapter Registry.\n2.  **Adversarial Simulation**: Use the `PerformanceSimulator` to stress-test the network under high load and simulated attacks.\n3.  **Reorg Simulation**: Test the node's behavior against a simulated Bitcoin regtest network where you intentionally invalidate blocks to trigger the Reorg Detector.\n4.  **Audit**: While the architecture is sound, third-party cryptographic audits are recommended for the federation multisig setup.\n\n\u003e **\"Trust, but verify.\"** - The core philosophy of Bitcoin and AILEE.\n\n---\n\n## 🚀 Quick Start\n\n### Prerequisites\n\n```bash\n# Ubuntu/Debian\nsudo apt-get update\nsudo apt-get install -y build-essential cmake libssl-dev libcurl4-openssl-dev \\\n    libzmq3-dev libcppzmq-dev libjsoncpp-dev libyaml-cpp-dev librocksdb-dev\n\n# macOS\nbrew install cmake openssl curl zeromq cppzmq jsoncpp yaml-cpp rocksdb\n```\n\n### Option 1: Build C++ Core Node\n\n```bash\n# Clone the repository\ngit clone https://github.com/dfeen87/AILEE-Protocol-Core-For-Bitcoin.git\ncd AILEE-Protocol-Core-For-Bitcoin\n\n# Build the project\nmkdir build \u0026\u0026 cd build\ncmake .. -DBUILD_TESTS=ON\nmake -j$(nproc)\n\n# Run the main node\n./ailee_node\n\n# Check logs to verify Reorg Detector initialization\ntail -f logs/ailee.log\n```\n\n### Option 2: Run Tests\n\n```bash\ncd build\nctest --verbose\n```\n\n---\n\n## 🏗️ Architecture\n\n\u003cdiv align=\"center\"\u003e\n\n```\n┌─────────────────────────────────────────────────────────────────┐\n│                      AILEE LAYER-2 NODE                         │\n├─────────────────────────────────────────────────────────────────┤\n│  ┌──────────────┐  ┌──────────────┐  ┌────────────────────┐  │\n│  │ Orchestration│  │  Reorg       │  │  Federated         │  │\n│  │ \u0026 Scheduling │  │  Detector    │  │  Learning          │  │\n│  └──────────────┘  └──────────────┘  └────────────────────┘  │\n│                                                                 │\n│  ┌──────────────────────────────────────────────────────────┐  │\n│  │            Ambient AI Telemetry \u0026 Byzantine Detection    │  │\n│  └──────────────────────────────────────────────────────────┘  │\n│                                                                 │\n│  ┌──────────────────────────────────────────────────────────┐  │\n│  │              L2 State \u0026 Ledger Management                │  │\n│  │        (Deterministic Snapshots + Verification)          │  │\n│  └──────────────────────────────────────────────────────────┘  │\n│                                                                 │\n│  ┌──────────────────────────────────────────────────────────┐  │\n│  │           Bitcoin Anchoring \u0026 Bridge Logic               │  │\n│  │  • SPV Peg-In  • Federated Peg-Out  • Commitments       │  │\n│  └──────────────────────────────────────────────────────────┘  │\n│                                                                 │\n│  ┌──────────────────────────────────────────────────────────┐  │\n│  │        Multi-Chain Adapters (Bitcoin, ETH, SOL...)      │  │\n│  └──────────────────────────────────────────────────────────┘  │\n└─────────────────────────────────────────────────────────────────┘\n                              ↕\n          ┌───────────────────────────────────────┐\n          │     BITCOIN MAINNET (L1)              │\n          │  • Anchor Commitments                 │\n          │  • Peg-In Verification (SPV)          │\n          │  • Peg-Out Settlement (Multisig)      │\n          └───────────────────────────────────────┘\n```\n\n\u003c/div\u003e\n\n---\n\n## 🔐 Security Model\n\n### ✅ Explicit Federated Model\n\n**Peg-Ins (Bitcoin → L2)**\n- SPV proofs with Bitcoin headers + Merkle paths\n- Trust-minimized verification of L1 events\n\n**Peg-Outs (L2 → Bitcoin)**\n- Federated multisig quorum (sidechain-style custody)\n- Explicit signer thresholds and fee logic\n\n**Reorg Safety**\n- **Automated Detection**: The `ReorgDetector` monitors L1 block headers.\n- **Safety Halt**: Block production pauses if a deep reorg is detected.\n- **State Recovery**: L2 state can be rolled back to the last finalized anchor.\n\n---\n\n## ⚠️ What This Is NOT\n\nAILEE-Core is **NOT**:\n- ❌ A replacement for Bitcoin\n- ❌ A consensus-changing protocol\n- ❌ A trustless rollup (it is a federated sidechain)\n\n---\n\n## 🛠️ Technology Stack\n\n### Core Infrastructure (C++)\n- **Language**: C++17\n- **Build System**: CMake 3.10+\n- **Persistence**: RocksDB (State \u0026 Reorg History)\n- **Bitcoin Integration**: JSON-RPC client + ZMQ listener\n- **Cryptography**: OpenSSL (SHA256, signature verification)\n- **Networking**: libcurl, ZeroMQ, cppzmq\n- **JSON Parsing**: nlohmann/json, JsonCpp\n- **Configuration**: yaml-cpp, TOML++\n\n### REST API (Python)\n- **Framework**: FastAPI (async, production-ready)\n- **Server**: Uvicorn (ASGI server)\n\n---\n\n## 🌍 Community \u0026 Support\n\n### Get Help\n- **GitHub Issues**: Bug reports and feature requests\n- **Discussions**: Questions and community support\n- **Documentation**: Comprehensive guides in `docs/`\n\n### Citation\n\nIf you use or build upon this work in academic research, please cite:\n\n```bibtex\n@software{ailee_core,\n  author = {Feeney, Don Michael},\n  title = {AILEE-Core: Bitcoin-Anchored Layer-2 Orchestration Framework},\n  year = {2025},\n  publisher = {GitHub},\n  url = {https://github.com/dfeen87/AILEE-Protocol-Core-For-Bitcoin},\n  license = {MIT}\n}\n```\n---\n\n## Acknowledgments\n\nThis project was developed with a combination of original ideas, hands‑on coding, and support from advanced AI systems. I would like to acknowledge **Microsoft Copilot**, **Google Jules**, **Anthropic Claude**, and **OpenAI ChatGPT** for their meaningful assistance in refining concepts, improving clarity, and strengthening the overall quality of this work.\n\n---\n\n## 📄 License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfeen87%2Failee-protocol-core-for-bitcoin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdfeen87%2Failee-protocol-core-for-bitcoin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfeen87%2Failee-protocol-core-for-bitcoin/lists"}