How fuellabs/fuel-core works
Fuel Core is a blockchain node and GraphQL client. The principal user workflow is to launch a node, submit transactions through GraphQL, execute them, produce and import blocks, and persist chain state. The repository also contains networking, relaying, gas-price, compression, and a separate chaos-testing harness. The README documents the GraphQL endpoint, execution, and persistence; several service-to-service links below are dashed because their wiring was not shown in the sampled source.
Main entry points: service.rs Node Service · main.rs Chaos Harness · api_service.rs GraphQL Service · storage.rs Chain Database
Components 26
Node Runtime
- Node CLI
bin/fuel-core/src/main.rs - Run Configuration
bin/fuel-core/src/cli/run.rs - Node Service
crates/fuel-core/src/service.rs - Genesis Setup
crates/fuel-core/src/service/genesis.rs
Transaction Lifecycle
- Transaction Executor
crates/services/executor/src/executor.rs - Transaction Pool
crates/services/txpool_v2 - Block Production
crates/services/consensus_module/poa/src/service.rs - Block Import
crates/services/importer/src/importer.rs
GraphQL Interface
- GraphQL Service
crates/fuel-core/src/graphql_api/api_service.rs - GraphQL Schema
crates/fuel-core/src/schema.rs - GraphQL Queries
crates/fuel-core/src/query.rs - Rust Client
crates/client/src/client.rs
Chain State
- Chain Database
crates/fuel-core/src/database/storage.rs - Structured Storage
crates/storage/src/structured_storage.rs - GraphQL Storage
crates/fuel-core/src/graphql_api/storage.rs
Node Services
- Peer Networking
crates/services/p2p/src/service.rs - DA Relayer Storage
crates/services/relayer/src/storage.rs - Gas Price Service
crates/services/gas_price_service/src/lib.rs - Block Compression
crates/services/compression/src/service.rs
Chaos Testing
- Chaos Harness
bin/chaos-test/src/main.rs - Test Cluster
bin/chaos-test/src/cluster.rs - Fault Scheduler
bin/chaos-test/src/fault.rs - Invariant Checks
bin/chaos-test/src/invariants.rs - Fault Proxy
bin/chaos-test/src/proxy.rs - Redis Server
bin/chaos-test/src/redis_server.rs
Other components
- Node Operator
Connections 25
- Node Operator → Node CLI: launches
README.md - Node CLI → Run Configuration: dispatches
- Run Configuration → Node Service: starts
- Node Service → Genesis Setup: initializes
- Node Operator → Rust Client: submits transactions
README.md - Rust Client → GraphQL Service: sends GraphQL
README.md - GraphQL Service → GraphQL Schema: serves
- GraphQL Schema → GraphQL Queries: routes queries
- GraphQL Service → Transaction Executor: executes mutations
README.md - Transaction Executor → Transaction Pool: submits transactions
- Transaction Pool → Block Production: provides transactions
- Block Production → Block Import: produces blocks
- Block Import → Chain Database: persists blocks
README.md - Chain Database → Structured Storage: uses
crates/fuel-core/src/database/storage.rs - GraphQL Queries → GraphQL Storage: reads chain data
- GraphQL Storage → Chain Database: reads state
- Node Service → Peer Networking: starts
- Node Service → DA Relayer Storage: starts
- Node Service → Gas Price Service: starts
- Node Service → Block Compression: starts
- Chaos Harness → Test Cluster: creates
bin/chaos-test/src/main.rs - Chaos Harness → Fault Scheduler: runs
bin/chaos-test/src/main.rs - Chaos Harness → Invariant Checks: runs
bin/chaos-test/src/main.rs - Chaos Harness → Fault Proxy: configures
bin/chaos-test/src/main.rs - Fault Proxy → Redis Server: uses
bin/chaos-test/src/proxy.rs