Skip to content

This project aims to export data from ZKSync Era to AvailDA.

Notifications You must be signed in to change notification settings

lambdaclass/zk-avail-da

Repository files navigation

ZKSync Era Integration with Avail DA

Introduction

This project aims to export data from ZKSync Era to AvailDA.

🚀 Project Structure

This project contains different subprojects:

  • validium: A Deno script to submit pubdata from ZKSync Era to Turing Avail DA and verify it (using Sepolia).
  • avail-da: Docker containers to run an Avail DA node locally.
  • da-sender: A Rust script to submit pubdata from ZKSync Era to the local Avail DA node.
  • da-getter: A Rust script to retrieve data from the local Avail DA node.
  • tools/web_scraper: Python script to automate claiming AVAIL tokens from the AVAIL Faucet website.

🛠 Requirements

To run this project, you need to have installed:

👨‍💻 Usage

The usage of this project is divided into two main scenarios:

  • Using the Avail DA Turing Testnet
  • Running Avail DA locally.

Each scenario provides different ways to interact with the data availability layer, either through a public testnet or a local setup.

Testnet

Sending and Verifying Pubdata Using Avail DA Turing Testnet

To run the Deno script that retrieves pubdata from ZKSync Era, sends it and verifies it using Turing Avail DA use the following command:

make validium

Local

Running Avail DA Locally

To set up and run Avail DA locally, execute the following command:

make avail-da

This command builds and starts the Docker containers necessary for running Avail DA on your local machine.

Sending Pubdata to the Local Avail DA Node

With the da-sender script, after following the steps, you can send pubdata from ZKSync Era to the local Avail DA by running this command:

make send-data

This command uses the da-sender script to submit the pubdata to your locally running Avail DA node.

🕸️ Web Scraper

To set up the web scraper, navigate to the tools/web_scraper directory and run:

make web-scraper

This command will create a virtual environment, install dependencies, and run the web scraper.

🧞 Commands

All commands are run from the root of the project, from a terminal:

Command Action
make avail-da Builds and starts the Avail DA services locally using Docker
make clean Stops and removes Docker containers and networks created by the project
make build Builds the Docker images for Avail DA
make avail-da-full Builds and runs the full Avail DA node with multiple exposed ports
make avail-da-testnet Builds and runs the Avail DA node for the testnet environment
make send-data Compiles and runs the da-sender Rust script to submit pubdata
make send-custom-data Compiles and runs the da-sender Rust script with custom pubdata submission
make get-data Compiles and runs the da-getter Rust script to retrieve data
make format Formats the code in da-sender, da-getter, and validium directories
make validium Runs the Deno script that retrieves pubdata from ZKSync Era, sends it and verifies it to Avail
make validium-test Runs Deno tests
make web-scraper Sets up the web scraper virtual environment, installs dependencies, and runs the scraper
make web-scraper-install Installs dependencies for the web scraper
make web-scraper-run Runs the web scraper to claim AVAIL tokens from the AVAIL Faucet website
make web-scraper-venv Sets up the virtual environment for the web scraper
make web-scraper-clean Cleans up the web scraper virtual environment and removes generated files
make web-scraper-clean-logs Cleans up the logs generated by the web scraper

About

This project aims to export data from ZKSync Era to AvailDA.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published