4.9 KiB
ZKSync Era-based Validium Deployment
This repository documents the deployment of a ZKSync Era-based Validium proof-of-concept (PoC) showcased by Nomos during IFT All-Hands 2025 in Split.
It uses a forked version of the ZKSync Era framework. You can find the repository here:
👉 logos-co/zksync-era
What is ZKSync Era?
ZKSync Era is a zero-knowledge rollup framework that enables scalable and secure L2 chains.
For detailed documentation, including architecture and components of the framework, visit:
📚 ZKSync Era Documentation
Deploy a ZKSync Era Validium with Nomos DA
This guide walks you through setting up a GPU-proved Validium L2 chain using Nomos DA and the forked ZKSync Era framework.
If you need to modify any parameters, refer to the official ZKSync documentation to understand their implications.
Machine Setup
-
Follow the official setup guide to install dependencies:
ZKSync Era Dev Setup Guide -
Clone this repo:
git clone https://github.com/logos-co/nomos-example-validium --recurse-submodules cd zksync-era -
Install the forked
zkstackCLI:cargo install --path ./zkstack_cli/crates/zkstack --locked zkstack --force
Ecosystem Creation
Create a new ecosystem using the zkstack CLI:
zkstack ecosystem create \
--ecosystem-name <ecosystem_name> \
--l1-network localhost \
--link-to-code <path_to_forked_repo> \
--chain-name <chain_name> \
--chain-id <l2_chain_id> \
--prover-mode gpu \
--wallet-creation localhost \
--l1-batch-commit-data-generator-mode validium \
--evm-emulator true \
--start-containers true \
--update-submodules true \
--verbose
- Choose
Ethas the base currency when prompted. - Replace placeholders with your chosen values.
ℹ️ For testing without a real GPU prover, use
--prover-mode no-proofs.
Ecosystem Initialization
-
Navigate into your ecosystem folder:
cd <ecosystem_name> -
Initialize the ecosystem:
zkstack ecosystem init \ --deploy-erc20 false \ --deploy-ecosystem true \ --l1-rpc-url http://127.0.0.1:8545 \ --deploy-paymaster true \ --server-db-url postgres://postgres:notsecurepassword@localhost:5432 \ --server-db-name <db_name> \ --observability false \ --update-submodules true \ --verbose -
When prompted, choose
"Nomos"as the DA provider and enter:-
Nomos DA disperal endpoint URL
-
Username/password for HTTP basic auth according to the node configuration
-
A 64-character hex App ID (without the
0x), e.g.:00ea21912cdcbdd9189d49d07b61543ffdf7064355640eb6cc6fc6d902056d1b
-
Running the Sequencer
Start the L2 sequencer:
zkstack server --verbose
- The default RPC endpoint is:
http://localhost:3050 - Connect with any EVM-compatible wallet (e.g. Metamask, Rabby)
- Use the
chain_idyou configured earlier
Optional: also connect to the local L1 node at http://localhost:8545.
Running the Prover
If your use case requires generating ZK proofs:
-
Initialize the prover:
zkstack prover init \ --bellman-cuda true \ --bellman-cuda-dir <bellman_cuda_dir> \ --setup-compressor-key true \ --setup-keys true \ --setup-database true \ --prover-db-url postgres://postgres:notsecurepassword@localhost:5432 \ --prover-db-name <prover_db_name> \ --dont-drop false \ --use-default false \ --verbose -
Replace placeholders with your paths and database names.
This process can take time as it downloads all required proving and compression keys.
- Start prover binaries as explained in the ZKSync Era Prover Docs.
As things stand, proving time takes anywhere between 10 minutes to 1 hour, while proof compression typically takes less than one minute. Keep that in mind when trying the whole end-to-end flow.
Example Applications
Once the L2 is running, you can deploy EVM applications on it.
To bridge ETH from the local L1 to the L2, use the ZKSync Era Portal:
zkstack portal --verbose
Use the portal UI to bridge from an L1 account. For a local setup, you can use:
- Address:
0x36615Cf349d7F6344891B1e7CA7C72883F5dc049 - Private key:
0x7726827caac94a7f9e1b160f7ea819f172f7b6f9d2a97f992c38edeab82d4110
More dev accounts can be found in the ZKSync Era L1 Accounts.