Recreating L2 state from L1 pubdata
Last updated
Last updated
Note: Running the L1 pubdata tool will require approximately 500GB of memory and will take a few days to complete.
This tool is written in nightly Rust. You can install Rust by following the official instructions here, and then running the following command to switch to the nightly toolchain:
Clone the zksync-state-reconstruct tool:
To start reconstructing the state, run the following command with any valid HTTP/HTTPS Ethereum JSON-RPC endpoint, for example using https://eth.llamarpc.com
.
You can also use an Ethereum endpoint from Alchemy, Infura or any other endpoint provider:
Here's what a successful start of the tool will look like in your terminal:
Here's what the tool will look like as it's running:
Once the tool has finished syncing, you will only be warned if the published L2 state is not the same as the reconstructed L2 state. If the tool has finished syncing and you have not received any warnings, then the L2 state has been successfully reconstructed.