How qdrvm/kagome works
KAGOME is a Polkadot Host node. Its principal workflow is to start from chain configuration, connect to peers, synchronize and import blocks, execute runtime logic against state, and participate in consensus; JSON-RPC exposes node and chain data to clients. The README also documents parachain processing, keystore, offchain workers, telemetry, and metrics. Several runtime and orchestration links are inferred from the documented product workflow rather than sampled call sites, so those edges are dashed and uncited.
Main entry points: kagome_application_impl.cpp Application setup · peer_manager_impl.cpp Peer networking · timeline_impl.cpp Chain synchronization · trie_storage_provider_impl.cpp Runtime execution
Components 23
Node lifecycle
- Application setup
core/application/impl/kagome_application_impl.cpp - Chain configuration
core/application/impl/app_configuration_impl.cpp
Networking and sync
- Peer networking
core/network/impl/peer_manager_impl.cpp - Chain synchronization
core/consensus/timeline/impl/timeline_impl.cpp - Authority discovery
core/authority_discovery/query/query_impl.cpp
Chain processing
- Block storage
core/blockchain/impl/block_storage_impl.cpp - Block tree
core/blockchain/impl/block_tree_impl.cpp - Block execution
core/consensus/timeline/impl/block_executor_impl.cpp - BABE production
core/consensus/babe/impl/babe.cpp - GRANDPA finality
core/consensus/grandpa/impl/grandpa_impl.cpp - Parachain processing
core/dispute_coordinator/impl/dispute_coordinator_impl.cpp
Runtime and storage
- Runtime execution
core/runtime/common/trie_storage_provider_impl.cpp - Runtime host API
core/host_api/impl/storage_extension.cpp - Trie state
core/storage/trie/impl/trie_storage_impl.cpp
APIs and operations
- WebSocket transport
core/api/transport/impl/ws/ws_session.cpp - JSON-RPC services
core/api/service/impl/api_service_impl.cpp - Keystore
core/crypto/key_store/key_file_storage.cpp - Offchain workers
core/offchain/impl/offchain_persistent_storage.cpp - Telemetry
core/telemetry/impl/service_impl.cpp - Prometheus metrics
core/metrics/impl/prometheus/handler_impl.cpp
Other components
- Node operator
- RPC client
- Polkadot peers
Connections 24
- Node operator → Application setup: starts node
- Application setup → Chain configuration: loads settings
- Application setup → Peer networking: starts services
- Peer networking → Polkadot peers: exchanges blocks
- Peer networking → Chain synchronization: supplies chain data
- Chain synchronization → Block storage: stores blocks
- Block storage → Block tree: tracks chain
- Chain synchronization → Block execution: imports blocks
- Block execution → Runtime execution: executes runtime
- Runtime execution → Runtime host API: invokes host functions
- Runtime host API → Trie state: accesses state
core/host_api/impl/storage_extension.cpp - Runtime execution → Trie state: manages state batches
core/runtime/common/trie_storage_provider_impl.cpp - Application setup → BABE production: enables consensus
- Application setup → GRANDPA finality: enables finality
- Application setup → Parachain processing: enables parachain processing
- Application setup → Authority discovery: starts discovery
- RPC client → WebSocket transport: sends requests
- WebSocket transport → JSON-RPC services: dispatches RPC
- JSON-RPC services → Block storage: queries chain
- JSON-RPC services → Trie state: queries state
- Application setup → Keystore: uses keys
- Application setup → Offchain workers: runs workers
- Application setup → Telemetry: reports node status
- Application setup → Prometheus metrics: exposes metrics