succinctlabs / rsp

A minimal implementation of ZKPs of Ethereum block execution using Reth. Supports both Ethereum and OP Stack.
Apache License 2.0
40 stars 12 forks source link

perf: remove genesis state from chainspec #41

Closed xJonathanLEI closed 1 week ago

xJonathanLEI commented 1 week ago

RSP does not make use of the genesis state, which is parsed from JSON at runtime, costing a lot of zkVM cycles.

Switches to manually constructing ChainSpec instead.

For the block tested of 20600000, the cycle count drops from 417,218,608 to 343,651,666 by 73,566,942 cycles. The saving should be constant across all blocks as the same genesis JSON string is parsed regardless of block.