This guide will help you set up and run the ZKSync adapter with Avail Nexus.
-
Clone the ZKSync repository:
git clone https://github.com/vibhurajeev/zksync-era.git cd zksync-era
-
Complete the development setup.
-
Install the zksync CLI for managing zksync services:
./bin/zkt
-
Initialize the zkStack ecosystem:
zksync_inception ecosystem init
-
Start the ZKSync server to run the chain:
zksync_inception server
-
Make sure the Nexus server is running. You can specify which ZKVM (
sp1
orrisc0
) to use. If no ZKVM is specified, it will default tosp1
:- To run with the default
sp1
ZKVM:nexus_cli nexus --dev
- To explicitly run with
sp1
:nexus_cli nexus --dev sp1
- To run with the
risc0
ZKVM:nexus_cli nexus --dev risc0
- To run with the default
- Make sure the ZKSync server is running as per the previous steps.
- Run the ZKSync adapter with the same ZKVM (
sp1
orrisc0
) as the Nexus server. The ZKVM for the adapter must match the one used by the Nexus server:- To run with default ports and ZKVM:
nexus_cli zksync --dev
- To run with the default
sp1
ZKVM:nexus_cli zksync --app-id 100 --url http://127.0.0.1:3030 --dev sp1
- To run with the
risc0
ZKVM:nexus_cli zksync --app-id 100 --url http://127.0.0.1:3030 --dev risc0
- To run with default ports and ZKVM:
For mock proofs, the --dev
flag is used; for real proofs, it must be omitted.
The ZKVM used by the ZKSync adapter must match the ZKVM used by the Nexus server for compatibility.