How Does Arcology work

The Workflow

Arcology's concurrency architecture is designed to efficiently and execute smart contracts through parallel processing and conflict management. The system components work together to achieve this goal by leveraging advanced concurrency control mechanisms and innovative design principles. Here's a step-by-step overview of the workflow:

  1. Transaction Input: Transactions from the transaction pool are fed into the execution process.

  2. Scheduling: The scheduler performs static analysis on the incoming transactions to understand their characteristics, such as dependencies, conflict history, resource requirements, and priorities. Based on this analysis, it groups transactions into generations. Transactions within the same generation are executed in parallel. Different generations are executed sequentially.

  3. Parallel Execution: Multiple Execution Units (EUs) operate concurrently to process transactions. Ultimately, each EU produces a record of the accesses made during its execution.

  4. Read/Write Sets: Each EVM instance maintains an RW Set that contains the data read from and written to the state database by the transactions it processes. This is essential for tracking the changes made by each instance and for detecting conflicts.

  5. Conflict Detection: After all executions in a single generation are completed, the conflict detector examines the RW sets to identify instances where multiple transactions have accessed the same shared resources concurrently, potentially resulting in conflicts. If two or more transactions attempt to modify the same data concurrently, a conflict is detected.

  6. Conflict Resolution and Storage Commitment: Once the conflict detector has verified that there are no conflicts or has resolved any that were found, the clear state changes are then committed to the state database.

  7. Feedback Loop: Information about conflicts is fed back into the scheduler to improve future transaction grouping and scheduling decisions.

                                          +-----+
                                          | Txs | 
                                          +-----+
                                             |
                                             v
                                        +---------+
                                        |Scheduler|
                                        +---------+
                                        /    |    \
                                       /     |     \
                                      v      v      v
                    +---------+ +---------+ +---------+ +---------+
                    |EU Inst. | |EU  Inst.| |EU  Inst.| |EU  Inst.|
                    +---------+ +---------+ +---------+ +---------+
                         |            |            |            |
                         v            v            v            v
                    +---------+ +---------+ +---------+ +---------+
                    | RW Set  | | RW Set  | | RW Set  | | RW Set  |
                    +---------+ +---------+ +---------+ +---------+
                         |            |            |            |
                         +------------+------------+------------+
                                             |
                                             v
                                         +--------+
                                         |State DB|
                                         +--------+
                                             |
                                             v
                                     +-----------------+
                                     |Conflict Detector|
                                     +-----------------+
                                             |
                                             v
                                    +-------------------+    Conflict History
                                    |Clear Transitions  | ------------------->
                                    +-------------------+    Back to Scheduler
                                             |
                                             v
                                      Commit to StateDB

Last updated