ZKParallel
  • What is ZKParallel?
  • Background
    • Introduction
    • The World State in Ethereum
    • Ethereum Client Performance
    • zkEVM
    • Attempts at Other Projects
  • Technical Details
    • Overview of EVM transaction processing
    • Asymmetric Node Structure
    • Pioneer Node
    • Guard Node
    • ZK Acceleration
Powered by GitBook
On this page
  1. Technical Details

Guard Node

PreviousPioneer NodeNextZK Acceleration

Last updated 1 year ago

The Guard Node is primarily responsible for the validation work and is generally assumed to be behind in the network sequence. On one hand, it can synchronize the latest blocks from regular clients. On the other hand, after the Pioneer Node finishes processing a block, it transfers the block and additional data to the Guard Node.

When the Guard Node receives the block and {{ri−1,mfi,al-ini,txi,al-outi,ri},i=1,...,t}\{\{r_{i-1}, mf_i, al\text{-}in_i, tx_i, al\text{-}out_i, r_i\}, i=1,...,t\}{{ri−1​,mfi​,al-ini​,txi​,al-outi​,ri​},i=1,...,t}, it can perform the following tasks in parallel:

  1. Check if $r_{i-1}$ is the root after the previous transaction and if $r_i$ is the root at the start of the next transaction.

  2. Verify $mf_i$ and $al\text{-}in_i$ using $r_{i-1}$ as the root.

  3. Execute $al\text{-}in_i$ and $tx_i$ to obtain $al\text{-}g_i$ and verify $al\text{-}g_i = al\text{-}out_i$.

  4. Verify $mf_i$ and $al\text{-}out_i$ using $r_i$ as the root.

In step 3, during transaction processing, except for $tx_t$, the gas used is recorded and summed up to obtain the total gas used for the entire block. This value is compared to the used gas quantity processed in $tx_t$ according to the rules.

Finally, the Guard Node updates $al\text{-}out_i$ to the MPT in order and obtains an MPT with a root of $r_t$. This allows the Guard Node to provide services externally.

When the Guard Node does not receive all the additional data, it can parallelize the processing of consecutive transactions that have received the additional data within the transaction sequence. It obtains an intermediate state MPT and then executes the transactions without additional data in a sequential manner.