ZK Acceleration
Last updated
Last updated
Now we will apply zk technology to the P-G mechanism.
In the previous design of the P-G mechanism, the overall computational load of the Guard Node actually increased due to the addition of two merkle proof verifications. However, because it achieved parallel computing, we can use low-frequency, multi-core CPU servers to run the Guard Node instead of the high-frequency CPUs used by current Ethereum clients.
With zk technology, we can reduce the overall workload of the Guard Node by increasing the workload of the Pioneer Node.
If technically feasible, we hope that the Pioneer Node can incorporate the entire block processing process into the zkevm circuit. We can describe it as follows:
Input: $mpt_0, {tx_1, tx_2, ..., tx_t}$
Output: $mpt_t$
Execution: Execute $t$ transactions (including native transactions and EVM execution) based on $mpt_0$, and finally obtain $mpt_t$.
For this, the Pioneer Node can generate a proof.
Then, after obtaining the latest block, $mpt_t$, and the proof, the Guard Node can perform zk verification on the proof within a fixed time to complete the verification of the entire circuit, ensuring that $mpt_t$ is the latest world state.
Of course, $mpt_t$ is very large, so we can transmit only the incremental information, $m_t$, such that $mpt_0 + m_t = mpt_t$.
However, it is evident that currently, achieving a fully equivalent zkevm circuit for the EVM is still challenging. However, we can incorporate some of the work into the circuit.
Using the notation from above, the main work of the Pioneer Node is:
In the work of the Guard Node, in addition to transaction processing (EVM execution), it also needs to verify the merkle proofs of transaction inputs and outputs. This part of the work is relatively simple and time-consuming, so we can incorporate it into the zk circuit to be completed by the Pioneer Node:
Output: 0/1
Execution: Verify merkle proof ${r_i, mf_{i+1}, al\text{-}in_{i+1}}$ and merkle proof ${r_{i+1}, mf_{i+1}, al\text{-}out_{i+1}}$, output 1 if both are correct, otherwise output 0.
After receiving the proof of this part of the circuit, the Guard Node can complete the input-output merkle proof verification for all transactions within a fixed time, further saving time.
Input: