Cronos zkEVM Docs
  • Getting Started
    • πŸš€Getting started
    • Network status
    • πŸ—οΈArchitecture
    • πŸͺ™About zkCRO, vETH, vUSD
      • zkCRO
      • vETH
        • ybETH & vETH
      • vUSD
        • ybUSD & vUSD
    • πŸ“ƒzkEVM Litepaper v1.0
    • πŸ—ΊοΈCronos roadmap
  • For Users
    • πŸ’³Crypto.com Card Top Up
    • πŸ”₯Crypto Wallets
      • 🦁Crypto.com Onchain Wallet configuration
      • 🐰Rabby Configuration
      • 🦊MetaMask Configuration
      • 🦁Brave Wallet Configuration
      • 🧠Holdstation Smart Wallet
      • Zerion
    • πŸŒ‰Cronos zkEVM Bridge
    • πŸŒ‰Independent bridges
    • πŸ‘‘Pioneer Program
    • πŸ‘‘Yield rewards
    • πŸ“³Dapps
    • πŸ’‘FAQs
  • For Developers
    • πŸ”—Resources for Developers
    • πŸ’»Develop Smart Contracts and Dapps
      • Contract Deployment and Verification
      • Contract Verification Guide for the Cronos zkEVM Explorer
    • πŸ”§Developer Tools
      • Cronos zkEVM Developer Portal and APIs
      • Band Protocol (Oracle)
      • Covalent (Analytics)
      • Cronos Safe (Multi-sig)
      • Crypto.com AI Agent SDK (AI)
      • Debank (Analytics)
      • Dextools (Analytics)
      • deBridge (Bridge)
      • Eliza (AI)
      • Getblock (Node infra)
      • Goldsky (Subgraph hosting)
      • Google Bigquery (Analytics)
      • NFTs2Me (No code)
      • Pyth (Oracle)
      • Secret Network (Computing)
      • Sentio (Analytics)
      • Subquery (Analytics)
      • Thirdweb (App development)
      • txSync (Paymaster)
      • VIA Labs (Bridge)
      • XY Finance (Bridge)
      • Zyfi (Paymaster)
    • πŸ“’Contract Addresses
    • πŸ—³οΈAccount abstraction
    • πŸŒ‰Using zkCRO, vETH and vUSD
      • zkCRO
      • vETH
      • vUSD
      • Yield rewards
    • πŸŽ›οΈJSON-RPC API Overview
      • ZKs specific JSON-RPC API
      • Ethereum JSON-RPC API
  • FOR NODE HOSTS
    • ⛓️Running nodes
      • Cronos zkEVM Mainnet
      • Cronos zkEVM Sepolia Testnet
  • Resources
    • πŸ“šMedia/Brand Kit
Powered by GitBook
On this page
  • Prepare your machine
  • Step 1: Download the DB Dump
  • 1.1 - Download the pgdump
  • 1.2 - Extract the data from dump
  • Step 2: Docker Preparations
  • 2.1 - Pull Docker Image
  • 2.2 - Create Docker Compose Configuration
  • Step 3: Database Restoration
  • 3.1 - Start PostgreSQL Container:
  • 3.2 - Restore Database from Dump
  • Step 4: Run everything
  1. FOR NODE HOSTS
  2. Running nodes

Cronos zkEVM Sepolia Testnet

This guide covers running a node for Cronos zkEVM testnet (Chain ID: 240) with external-node v24.23.0 on docker.

PreviousCronos zkEVM MainnetNextMedia/Brand Kit

Last updated 2 months ago

Pre-requisites

  • and

Prepare your machine

This configuration is approximate and should be considered as minimal requirements:

Full Node - is configured to build and store the last 7 days of data for Cronos zkEVM Sepolia Testnet by default. Check for details on the pruning setting.

  • 4-core of CPU

  • 16GB of RAM

  • 100G of SSD storage

Archive Node - is configured to build an archive of all historical data of Cronos zkEVM Sepolia Testnet;

  • 4-core of CPU

  • 32GB of RAM

  • 500G of SSD storage

Step 1: Download the DB Dump

1.1 - Download the pgdump

Create a new folder and download the dump file into it by:

wget https://storage.googleapis.com/cronos-zkevm-testnet-en-pgdump/external_node.tar.gz

1.2 - Extract the data from dump

After extracting the file, locate the dump folder and the pg_restore.list file. Put both to the main directory, instead of default under β€œexternal_node”.

Step 2: Docker Preparations

2.1 - Pull Docker Image

docker pull http://ghcr.io/cronos-labs/external-node:v26.2.1-20250213

2.2 - Create Docker Compose Configuration

Inside that directory, create and edit docker-compose.yml :

nano docker-compose.yml

Add the following configuration to docker-compose.yml:

services: 
  cronoszk:
    image: "ghcr.io/cronos-labs/external-node:testnet-v24.23.0"
    network_mode: host
    restart: unless-stopped
    stop_grace_period: "120s"
    user: 0:0  
    volumes:
        - "${PWD}:/db" # Path to the rocksdb you unzipped
    environment:
      DATABASE_POOL_SIZE: 10
      DATABASE_URL: "postgresql://zksync:password@localhost:5432/mydb"
      EN_ETH_CLIENT_URL: "https://ethereum-sepolia-rpc.publicnode.com"
      EN_HEALTHCHECK_PORT: 3081
      EN_HTTP_PORT: 3060
      EN_L1_BATCH_COMMIT_DATA_GENERATOR_MODE: "Validium"
      EN_L1_CHAIN_ID: 11155111
      EN_L2_CHAIN_ID: 240
      EN_MAIN_NODE_URL: "https://seed.testnet.zkevm.cronos.org/"    
      EN_MERKLE_TREE_PATH: "./db/ext-node/lightweight"
      EN_PROMETHEUS_PORT: 3312
      EN_PRUNING_ENABLED: "true" #Note: Default value is false, i.e. no purning
      EN_REQ_ENTITIES_LIMIT: 1000
      EN_SNAPSHOTS_RECOVERY_ENABLED: "true"
      EN_SNAPSHOTS_OBJECT_STORE_BUCKET_BASE_URL: "cronos-zkevm-testnet-en-snapshot"
      EN_SNAPSHOTS_OBJECT_STORE_MODE: "GCSAnonymousReadOnly"
      EN_STATE_CACHE_PATH: "./db/ext-node/state_keeper"
      EN_WS_PORT: 3061
      RUST_LOG: "warn,zksync=info,zksync_core::metadata_calculator=debug,zksync_state=debug,zksync_utils=debug,zksync_web3_decl::client=error"
  postgres:
    image: postgres:16
    restart: unless-stopped
    stop_grace_period: "120s"
    network_mode: host
    environment:
      POSTGRES_DB: mydb
      POSTGRES_USER: zksync
      POSTGRES_PASSWORD: password
    ulimits:
      nofile: 60000
      nproc: 60000
      memlock: -1
    volumes:
      - "${PWD}/pgsql_data:/var/lib/postgresql/data/"
      - "${PWD}:/dump" # This is the location of where the dump is.
services: 
  cronoszk:
    image: "ghcr.io/cronos-labs/external-node:testnet-v24.23.0"
    network_mode: host
    restart: unless-stopped
    stop_grace_period: "120s"
    user: 0:0  
    volumes:
        - "${PWD}:/db" # Path to the rocksdb you unzipped
    environment:
      DATABASE_POOL_SIZE: 10
      DATABASE_URL: "postgresql://zksync:password@localhost:5432/mydb"
      EN_ETH_CLIENT_URL: "https://ethereum-sepolia-rpc.publicnode.com"
      EN_HEALTHCHECK_PORT: 3081
      EN_HTTP_PORT: 3060
      EN_L1_BATCH_COMMIT_DATA_GENERATOR_MODE: "Validium"
      EN_L1_CHAIN_ID: 11155111
      EN_L2_CHAIN_ID: 282
      EN_MAIN_NODE_URL: "https://seed.testnet.zkevm.cronos.org/"    
      EN_MERKLE_TREE_PATH: "./db/ext-node/lightweight"
      EN_PROMETHEUS_PORT: 3312
      EN_PRUNING_ENABLED: "false" #Note: Default value is false, i.e. no purning
      EN_REQ_ENTITIES_LIMIT: 1000
      EN_SNAPSHOTS_RECOVERY_ENABLED: "false"
      EN_SNAPSHOTS_OBJECT_STORE_BUCKET_BASE_URL: "cronos-zkevm-testnet-en-snapshot"
      EN_SNAPSHOTS_OBJECT_STORE_MODE: "GCSAnonymousReadOnly"
      EN_STATE_CACHE_PATH: "./db/ext-node/state_keeper"
      EN_WS_PORT: 3061
      RUST_LOG: "warn,zksync=info,zksync_core::metadata_calculator=debug,zksync_state=debug,zksync_utils=debug,zksync_web3_decl::client=error"
  postgres:
    image: postgres:16
    restart: unless-stopped
    stop_grace_period: "120s"
    network_mode: host
    environment:
      POSTGRES_DB: mydb
      POSTGRES_USER: zksync
      POSTGRES_PASSWORD: password
    ulimits:
      nofile: 60000
      nproc: 60000
      memlock: -1
    volumes:
      - "${PWD}/pgsql_data:/var/lib/postgresql/data/"
      - "${PWD}:/dump" # This is the location of where the dump is.

Important

Make sure you have the correct vars, volume attachment under the correct path.

Note

  • EN_PRUNING_ENABLED: Determines whether the node is set to pruning mode. When enabled, the node retains only recent chain data and discards older data to conserve storage space.

  • EN_SNAPSHOTS_RECOVERY_ENABLED, EN_SNAPSHOTS_OBJECT_STORE_BUCKET_BASE_URL, and EN_SNAPSHOTS_OBJECT_STORE_MODE: Enable snapshots recovery (similar to state-sync) and allows the node to recover from the latest batch without containing the full historical data.

  • Add debug to namespaces: Enables debug tracing and saves debug data.EN_API_NAMESPACES:Defines the enabled API namespaces, including eth, net, web3, zks, pubsub, and debug.

Step 3: Database Restoration

3.1 - Start PostgreSQL Container:

docker compose up -d postgres

Please note postgres was named in docker-compose.

When container is running, list containers to find the container ID:

docker ps

Below is the example output:

CONTAINER ID   IMAGE         COMMAND                  CREATED          STATUS          PORTS     NAMES
e0955341a0dd   postgres:16   "docker-entrypoint.s…"   5 hours ago      Up 4 hours              zkevmtest-postgres-1

3.2 - Restore Database from Dump

Run the following and docker retrieve and manipulate the data from data dump:

docker exec -it <container_ID> pg_restore -x -O -j2 -L <pg_restore.list_location>  -d <database_name> -U <username>  <path_to_dump_you_attached_in_volumes_docker_compose>

Example:

docker exec -it ad4c924d075a pg_restore -x -O -j2 -L /dump/pg_restore.list  -d mydb -U zksync  /dump/dump

NOTE

The username and database names were defined in thedocker-compose; in this example, they are zksync and mydb, respectively.

During the process, on the docker side, you should see:

Depending on the specs, the process might take several hours.

Step 4: Run everything

Once the pg restore completed, start the cronoszk node service:

docker compose up -d 

Example output should be like:

[+] Running 2/2
 βœ” Container zkevmtest-cronoszk-1  Started    0.1s 
 βœ” Container zkevmtest-postgres-1  Started    0.1s 

You should see in the Docker logs that the node is fetching block data from the RPCs.

For example:

Once the node is synchronized, you may use EN_HTTP_PORT: 3060 as defined for ETH-JSON RPC calls.

Under the same directory, pull docker image from:

Read more on Snapshots Recovery .

⛓️
Docker
Docker-compose
here
Github Container Registry
here