Modular Architecture
The architecture of Scalaris for parallel transaction execution involves several key components:
-
Transaction Initiation: Users initiate transactions directly or indirectly through the SDK.
-
Transaction Synchronization and Packaging: Transactions are synchronized between nodes, packaged into blocks by the Sealer (TxPool), and sent to the Consensus unit for consensus.
-
Transaction Validation and DAG Construction: Before consensus, PTE reads transactions from the block, constructs a transaction DAG based on dependencies, and prepares for parallel execution.
-
Parallel Execution and State Calculation: PTE uses multiple threads to execute the transaction DAG in parallel. After execution, the Joiner calculates the state root and receipt root based on state modifications, returning the results to the upper layer.
-
Block Verification and Storage: Once the block is verified and consensus is reached, it is written to the blockchain's underlying storage.