Environments: Devnet & Testnet

The vlayer network consists of several types of nodes: provers, indexers, notaries, and proxies. These nodes are essential for executing vlayer smart contract features, including Time Travel, Teleport, and proofs for Email and Web.

Currently, two environments are supported:

  • testnet: public environment supporting multiple L1 and L2 testnets.
  • devnet: local environment that runs with Docker Compose, providing all necessary services for development.

The production network release is scheduled for Q1 2025.

Testnet

By default, vlayer CLI, SDK, and example apps use the testnet environment, with no additional configuration required.

The Test Prover operates in FAKE mode and works with the following testnets:

chaintime travelteleportemail/web
sepolia🚧
optimismSepolia
baseSepolia🚧
polygonAmoy
arbitrumSepolia
lineaSepolia
worldchainSepolia
zksyncSepoliaTestnet

✅ Supported, 🚧 In progress

Public Testnet Services

ServiceEndpointDescription
Proverhttps://test-prover.vlayer.xyzzkEVM prover for vlayer contracts
Indexerhttps://test-chainservice.vlayer.xyzStorage proof indexer
Notaryhttps://test-notary.vlayer.xyzTLS Notary server
WebSocket Proxyhttps://test-wsproxy.vlayer.xyzProxying websocket connections for TLS Notary

Devnet

Devnet allows you to run the full stack locally, including anvil and all required vlayer nodes.

Starting Devnet

Prerequisites

From the vlayer Project

Navigate to the vlayer project directory and start services in the background:

cd ${project}/vlayer
bun run devnet

Outside of the vlayer project

Download and run vlayer Docker Compose to start services:

docker compose -f <(curl -L https://install.vlayer.xyz/devnet) up -d

Available Services

ServiceEndpointDescription
Anvil-Ahttp://127.0.0.1:8545Local devnet
Anvil-Bhttp://127.0.0.1:8546Secondary devnet (for time travel/teleport testing)
Anvil-Chttp://127.0.0.1:8547Tertiary devnet (for time travel/teleport testing)
Proverhttp://127.0.0.1:3000zkEVM prover for vlayer contracts
Indexerhttp://127.0.0.1:3001Storage proof indexer
Notaryhttp://127.0.0.1:7047TLS Notary server
WebSocket Proxyhttp://127.0.0.1:55688Proxying websocket connections

Stopping Devnet

To stop all running services:

docker compose down

Clearing Cache

Cached proofs for time travel and teleport are stored in ./chain_db and can be deleted manually:

rm -rf ./chain_db

Prover Modes

The prover server supports two proving modes:

  • FAKE: Designed for development and testing purposes, this mode executes code and verifies its correctness without performing actual proving. While the Verifier contract can confirm computations in this mode, it is vulnerable to exploitation by a malicious Prover.
  • GROTH16: Intended for production and final testing, this mode performs real proving.

FAKE Mode

Testnet and devnet provers run in FAKE mode by default.

Note: FAKE mode is limited to dev and test chains to prevent accidental errors.

GROTH16 Mode

GROTH16 mode is slower than FAKE mode and requires significant computational resources.

To speed up proof generation, vlayer supports the use of infrastructure like Bonsai (and eventually Boundless) to offload heavy computations to high-performance machines.

To run a prover node in production mode, download and modify docker-compose.devnet.yaml:

# rest of the config
vlayer:
    # existing vlayer config
    environment:
      # other env variables...
      BONSAI_API_URL: https://api.bonsai.xyz
      BONSAI_API_KEY: api_key_goes_here
    command: "serve --proof groth16 ...other_args"

You can request a BONSAI_API_KEY here.

Note: Protocols should be designed with proving execution times in mind, as generating a proof may take several minutes.