Component Relationships
BLVM implements a 6-tier layered architecture where each tier builds upon the previous one.
Dependency Graph
graph LR
subgraph "Consensus Stack"
C[blvm-consensus
No dependencies] P[blvm-protocol
Depends on consensus] N[blvm-node
Depends on protocol + consensus] C --> P P --> N C --> N end subgraph "Governance Stack" S[blvm-sdk
No dependencies] G[blvm-commons
Depends on SDK] S --> G end style C fill:#bbf,stroke:#333,stroke-width:2px style P fill:#bfb,stroke:#333,stroke-width:2px style N fill:#fbf,stroke:#333,stroke-width:2px style S fill:#ffb,stroke:#333,stroke-width:2px style G fill:#fbb,stroke:#333,stroke-width:2px
No dependencies] P[blvm-protocol
Depends on consensus] N[blvm-node
Depends on protocol + consensus] C --> P P --> N C --> N end subgraph "Governance Stack" S[blvm-sdk
No dependencies] G[blvm-commons
Depends on SDK] S --> G end style C fill:#bbf,stroke:#333,stroke-width:2px style P fill:#bfb,stroke:#333,stroke-width:2px style N fill:#fbf,stroke:#333,stroke-width:2px style S fill:#ffb,stroke:#333,stroke-width:2px style G fill:#fbb,stroke:#333,stroke-width:2px
Layer Descriptions
Tier 1: Orange Paper (blvm-spec)
- Purpose: Mathematical foundation - timeless consensus rules
- Type: Documentation and specification
- Governance: Layer 1 (Constitutional - 6-of-7 maintainers, 180 days, see Layer-Tier Model)
Tier 2: Consensus Layer (blvm-consensus)
- Purpose: Pure mathematical implementation of Orange Paper functions
- Type: Rust library (pure functions, no side effects)
- Dependencies: None (foundation layer)
- Governance: Layer 2 (Constitutional - 6-of-7 maintainers, 180 days, see Layer-Tier Model)
- Key Functions: CheckTransaction, ConnectBlock, EvalScript, VerifyScript
Tier 3: Protocol Layer (blvm-protocol)
- Purpose: Protocol abstraction layer for multiple Bitcoin variants
- Type: Rust library
- Dependencies: blvm-consensus (exact version)
- Governance: Layer 3 (Implementation - 4-of-5 maintainers, 90 days, see Layer-Tier Model)
- Supports: mainnet, testnet, regtest, and additional protocol variants
Tier 4: Node Implementation (blvm-node)
- Purpose: Minimal, production-ready Bitcoin implementation
- Type: Rust binaries (full node)
- Dependencies: blvm-protocol, blvm-consensus (exact versions)
- Governance: Layer 4 (Application - 3-of-5 maintainers, 60 days, see Layer-Tier Model)
- Components: Block validation, storage, P2P networking, RPC, mining
Tier 5: Developer SDK (blvm-sdk)
- Purpose: Developer toolkit and governance cryptographic primitives
- Type: Rust library and CLI tools
- Dependencies: Standalone (no consensus dependencies)
- Governance: Layer 5 (Extension - 2-of-3 maintainers, 14 days, see Layer-Tier Model)
- Components: Key generation, signing, verification, multisig operations
Tier 6: Governance Infrastructure (blvm-commons)
- Purpose: Cryptographic governance enforcement
- Type: Rust service (GitHub App)
- Dependencies: blvm-sdk
- Governance: Layer 5 (Extension - 2-of-3 maintainers, 14 days)
- Components: GitHub integration, signature verification, status checks
Data Flow
flowchart LR
OP[Orange Paper
Mathematical Specs] CONS[blvm-consensus
Pure Functions] PROTO[blvm-protocol
Protocol Abstraction] NODE[blvm-node
Full Node] SDK[blvm-sdk
Governance Primitives] COMMONS[blvm-commons
Enforcement] OP -->|implements| CONS CONS -->|wraps| PROTO PROTO -->|uses| NODE SDK -->|provides| COMMONS NODE -->|validates via| PROTO PROTO -->|validates via| CONS style OP fill:#f9f,stroke:#333,stroke-width:3px style CONS fill:#bbf,stroke:#333,stroke-width:2px style PROTO fill:#bfb,stroke:#333,stroke-width:2px style NODE fill:#fbf,stroke:#333,stroke-width:2px style SDK fill:#ffb,stroke:#333,stroke-width:2px style COMMONS fill:#fbb,stroke:#333,stroke-width:2px
Mathematical Specs] CONS[blvm-consensus
Pure Functions] PROTO[blvm-protocol
Protocol Abstraction] NODE[blvm-node
Full Node] SDK[blvm-sdk
Governance Primitives] COMMONS[blvm-commons
Enforcement] OP -->|implements| CONS CONS -->|wraps| PROTO PROTO -->|uses| NODE SDK -->|provides| COMMONS NODE -->|validates via| PROTO PROTO -->|validates via| CONS style OP fill:#f9f,stroke:#333,stroke-width:3px style CONS fill:#bbf,stroke:#333,stroke-width:2px style PROTO fill:#bfb,stroke:#333,stroke-width:2px style NODE fill:#fbf,stroke:#333,stroke-width:2px style SDK fill:#ffb,stroke:#333,stroke-width:2px style COMMONS fill:#fbb,stroke:#333,stroke-width:2px
Figure: End-to-end data flow through Reference Node, Consensus Proof, Protocol Engine, modules, and governance.
- Orange Paper provides mathematical consensus specifications
- blvm-consensus directly implements mathematical functions
- blvm-protocol wraps blvm-consensus with protocol-specific parameters
- blvm-node uses blvm-protocol and blvm-consensus for validation
- blvm-sdk provides governance primitives
- blvm-commons uses blvm-sdk for cryptographic operations
Cross-Layer Validation
- Dependencies between layers are strictly enforced
- Consensus rule modifications are prevented in application layers
- Equivalence proofs required between Orange Paper and blvm-consensus
- Version coordination ensures compatibility across layers
See Also
- System Overview - High-level architecture overview
- Design Philosophy - Core design principles
- Consensus Architecture - Consensus layer details
- Protocol Architecture - Protocol layer details
- Node Overview - Node implementation details