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:
chain | time travel | teleport | email/web |
---|---|---|---|
sepolia | 🚧 | ✅ | ✅ |
optimismSepolia | ✅ | ✅ | ✅ |
baseSepolia | 🚧 | ✅ | ✅ |
polygonAmoy | ✅ | ||
arbitrumSepolia | ✅ | ||
lineaSepolia | ✅ | ||
worldchainSepolia | ✅ | ||
zksyncSepoliaTestnet | ✅ |
✅ Supported, 🚧 In progress
Public Testnet Services
Service | Endpoint | Description |
---|---|---|
Prover | https://test-prover.vlayer.xyz | zkEVM prover for vlayer contracts |
Indexer | https://test-chainservice.vlayer.xyz | Storage proof indexer |
Notary | https://test-notary.vlayer.xyz | TLS Notary server |
WebSocket Proxy | https://test-wsproxy.vlayer.xyz | Proxying 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
Service | Endpoint | Description |
---|---|---|
Anvil-A | http://127.0.0.1:8545 | Local devnet |
Anvil-B | http://127.0.0.1:8546 | Secondary devnet (for time travel/teleport testing) |
Anvil-C | http://127.0.0.1:8547 | Tertiary devnet (for time travel/teleport testing) |
Prover | http://127.0.0.1:3000 | zkEVM prover for vlayer contracts |
Indexer | http://127.0.0.1:3001 | Storage proof indexer |
Notary | http://127.0.0.1:7047 | TLS Notary server |
WebSocket Proxy | http://127.0.0.1:55688 | Proxying 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.