Validium in ZK Stack

Dive deeper into ZK Stack Validiums.

This section provides an in-depth exploration of validiums in ZK Stack. For more general overview of validiums, see here.

Understanding Validiums

There are 3 different types of validiums based on the level of data availability they provide:

  • Stage 0 - the simplest type of validium that only stores its pubdata in the database of the node(s) running the chain.
  • Stage 1 - a validium that only sends its pubdata to the DA layer, but doesn’t verify its inclusion onchain.
  • Stage 2 - a validium that sends its pubdata to the DA layer, and also verifies its inclusion on the L1, either by using verification bridges or ZK proofs directly.

There are multiple DA layers that ZK Stack will be integrated with, however the first on the list are: Avail, Celestia, and EigenDA.

Working with Validiums

Getting a bit deeper into the technicalities, the process of persisting the pubdata in the different DA layers is handled by two components: DA dispatcher and DA client:

  • DA client’s role is to abstract the access to the DA layer and generalize it to 3 functions: dispatch_blob, ensure_finality and get_inclusion_data. Clients are a part of the zksync-era repository, see the code here.
  • DA dispatcher is responsible for periodically fetching the pubdata from the database, and calling the DA client to dispatch a blob, check that it was finalized or get an inclusion proofs for it. It also handles retries in case the client function call failed with a retryable error.

The DA-related information is stored in the data_availability table in the database. A Validium’s new batches can’t be committed if their inclusion data in this table is NULL.

Configuration

The Validium chain is required to have the following configuration:

  1. Set a pubdata sending mode general.yaml
    • pubdata_sending_mode: CUSTOM
  2. Configure DA dispatcher (reference values below) general.yaml
    da_dispatcher:
      polling_interval_ms: 5000
      max_rows_to_dispatch: 100
      max_retries: 5
      use_dummy_inclusion_data: false
    
  3. Add DA client’s config and secrets, see FAQ for details.

All the configs can also be set using environment variables instead of .yaml files, but it is less preferred.

Deployed L1 DA Validators

Ethereum

MainnetSepolia
Rollup0x72213dfe8CA61B0A782970dCFebFb877778f91190xcc46b186bd4515fa996adf3c40344ed7d546a65b
NoDA0x907b30407249949521Bf0c89A43558dae200146A0xacaf20636f1b57aa55f9cb1ac07d1fd9d8a84f00
Avail0x8f50d93B9955B285f787043B30B5F51D09bE01200x73D59FE232fCe421d1365D6A5BEEc49aCDE3d0d9

ZKsync Gateway

MainnetSepolia
Rollup0x595b8C88B9e5f3a4c596C3e81BE6e11D53Bb92000x931661BAdBc221bd686446F17A0EA40aa5196779
NoDA0xC6f5162f09bd1f6C5e3aBB8F8589B7A8E73CCa5C0xae56AB13f57225CefAF4A6D921Ec3C7d606450ea
Avail0x0x23B5c45dfDcAe9EAD887d58201D5f7479f7d3214

FAQ


Made with ❤️ by the ZKsync Community