How hyle-org/hyle works
Main Components
a) Core Node Components:
• Consensus Module (/src/consensus)
• Data Availability Layer (/src/data_availability)
• Mempool (/src/mempool)
• Node State Management (/src/node_state)
• P2P Network Layer (/src/p2p)
• REST API Interface (/src/rest.rs)
• TCP Server (/src/tcp_server.rs)
b) Smart Contract Infrastructure:
• Contract SDK (/crates/contract-sdk)
• Contract Runner (/crates/bonsai-runner)
• Built-in Contracts (/crates/contracts/*)
c) Client Components:
• Client SDK (/crates/client-sdk)
• Transaction Builder
• REST/TCP Clients
d) Supporting Services:
• Indexer Service (/src/indexer)
• PostgreSQL Database
• Monitoring Stack (Prometheus & Grafana)
[External Clients/dApps Layer]
• ↕
[Client SDK Layer]
• ↕
[Node Interface Layer (REST/TCP)]
• ↕
[Core Node Layer]
• ↕
[Infrastructure Layer]
Specific Implementation Details
a) Node Architecture:
[P2P Network] ←→ [Consensus] ←→ [Node State]
• ↕ ↕ ↕
[Mempool] ←→ [Data Availability] ←→ [Contract Execution]
b) Smart Contract Flow:
[Contract SDK] → [Contract Runner] → [Node State]
• ↓
• [Data Availability]
c) Client Interaction Flow:
[Client SDK] → [Transaction Builder]
• ↓
[REST/TCP Client] → [Node Interface]
Additional Elements
• Configuration management (/src/utils/conf.rs)
• Cryptographic utilities (/src/utils/crypto.rs)
• Monitoring endpoints
• Database connections
Important Notes
• Distinction between single-node devnet and full consensus mode
• Modular nature of the system (using the crates structure)
• Integration points with external systems
• Monitoring and observability touchpoints