How carbon-twelve-c12/supernova works
Project type and purpose
• From the file tree and README, we see a multi-crate Rust workspace implementing a production-grade Proof-of-Work blockchain called “Supernova.”
• It includes:
• A core blockchain library (btclib) with consensus, cryptography (quantum-resistant), environmental tracking, P2P, mempool, mining, storage, state management, testing.
• A node binary (node/) exposing JSON-RPC, REST and static UI, with middleware and metrics.
• A CLI client (cli/) for admin, wallet, mining commands.
• A wallet application (wallet/) with TUI support.
• A miner service (miner/) for coordinating mining work.
• Testnet orchestrations, Docker/Kubernetes deployment, Helm charts, scripts, docs.
• Purpose: Provide a scalable, carbon-negative, quantum-resistant blockchain platform with on-chain environmental accounting, Lightning layer, wallets, a node API, and production deployments.
File structure
• Top-level crates: btclib (core library), node (RPC server + fullnode logic), cli (user CLI), wallet (wallet UI & network), miner (mining coordinator), quantum_validation, testnet, supernova (main binary wrapper).
• Deployment: deployment/, kubernetes/, helm/, Dockerfiles, scripts/ for spinning up testnets, CI/CD workflows in .github/workflows.
• Config files: config/, config.toml, node.example.toml show the node’s runtime settings.
• Documentation under docs/ and btclib/src/docs for architectural and integration guides.
• Pattern: modular Rust crates, separation of concerns (consensus, networking, P2P, crypto, environmental layer). Micro-service style for each binary.
README for additional insights
• It calls out core innovations: post-quantum crypto, quantum Lightning, carbon-negative PoW, environmental treasury.
Elements
• Clear labels: name each crate/process/module.
• Data flow: e.g., P2P → consensus → storage → API → CLI.
• Control flow: e.g., user invokes CLI → RPC call to Node → Node uses btclib.
• API/RPC components in another (e.g., green).
• UI/CLI in a third (e.g., orange).
• Deployment infra and monitoring in a fourth (e.g., grey).