To send pubdata from ZKSync Era to AvailDA, follow these steps:
- Ensure that AvailDA is running on your system.
make avail-da
- Clone ZKSync Era repository and switch to the
validium-demo-new-main
branch.
Navigate to the zksync-era
directory and run the following command:
zk && zk clean --all && zk env dev_validium && zk init --validium-mode && zk server
In another terminal, execute the following command to run the basic scenario of the demo:
cargo run --package validium_mode_example --bin validium_mode_example
Please be patient as it may take some time to retrieve the pubdata.
Once the pubdata retrieval process is complete, run the DA manager to retrieve the pubdata:
python da_manager_example/main.py
You should see a message confirming the retrieval of the pubdata, along with the batch number.
Starting from batch #1
Got batch #1 pubdata
You can see the retrieved data in da_manager_example/data/pubdata_storage.json
.
Now, going back to the root directory of this project, you can send the retrieved pubdata to your local AvailDA using the Light Node by executing the following command in the root directory:
make send-data
This command will trigger the sending of the pubdata to AvailDA. If the send is successful, you should receive information such as the block hash, block number, hash and index in AvailDA.