XI. Component Description
The Mova node system is composed of multiple functional modules working together. This section describes the layered structure of the core components responsible for transaction synchronization and event processing. These include:
- Interactive module components
- Internal components of the module
11.1 Components of the Interactive Module
The interactive module is responsible for data synchronization between nodes and message flow between modules. Components include:
- protocol.NetService: Handles network request interactions with other nodes and supports sending and receiving messages.
- msgbus.MessageBus: The internal message bus of the node, enabling message passing between modules.
- protocol.BlockchainStore: Provides read access to on-chain data, such as querying events at a specific height.
- protocol.LedgerCache: Retrieves the local nodeβs latest cached ledger state.
- protocol.BlockVerifier: Performs validity and legality verification for received events.
- protocol.BlockCommitter: Writes verified events into the blockchain ledger.
11.2 Components of This Module
These are the core internal components of the transaction synchronization module, primarily responsible for event requesting, scheduling, and processing:
- BlockSyncServer: The master controller of the sync module, providing external service interfaces. Depends on both the interactive module and internal logic components.
- Routine: A task scheduler container providing coroutine hosting. Each service runs as an independent task and supports priority queue scheduling to ensure correct event processing order.
- Scheduler: The event scheduler. Continuously maintains node height status, known event status, and a queue of missing events to request. When receiving new node state, it triggers the event-request process and selects target nodes to request missing events from.
Processor: The event processor. Receives events from the Scheduler and processes, validates, and commits them in sequence. If an expected event has not yet arrived, it will temporarily skip processing until full data is available. After processing, it returns results to the Scheduler.