Rust validator for the VEA cross-chain messaging protocol. Monitors claims, challenges fraud, advances verification, relays L2→L1 messages, and withdraws deposits.
Supports routes:
- Arbitrum → Ethereum
- Arbitrum → Gnosis
docker build -t vea-validator .
docker run --rm --env-file .env -v $(pwd)/data:/app/data vea-validatorEnvironment variables (including PRIVATE_KEY) are passed at runtime via --env-file. They are NOT baked into the image. The -v flag persists sync state and scheduled tasks between runs.
If your .env file uses export prefixes (for compatibility with source), strip them with sed:
sed 's/^export //' .env | docker run --rm -v $(pwd)/data:/app/data --env-file /dev/stdin vea-validatorPrerequisites:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
curl -L https://foundry.paradigm.xyz | bash && foundryupFetch VEA contracts:
./scripts/fetch-vea-contracts.shStart the local devnet (L1 + L2 anvil chains with deployed contracts):
./scripts/full-devnet.shLeave it running. This will automatically create a .env.local for you to run the tests.
Run tests on a different terminal:
source .env.local && cargo testFunding requirements:
- Arbitrum Sepolia: ETH for gas
- Sepolia: ETH for gas + deposits
- Chiado: xDAI for gas + WXDAI for deposits
cp .env.example .env.testEdit .env.test and add your private key, then:
source .env.test && cargo runexport MAKE_CLAIMS=false # (default) Only monitor and challenge fraud
export MAKE_CLAIMS=true # Also claim epochs (locks deposit until verified)RPC URLs support comma-separated values for failover:
export ETHEREUM_RPC_URL=https://rpc1.example.com,https://rpc2.example.com,https://rpc3.example.comThe validator will automatically try the next RPC if one fails. All RPC calls have a 30s timeout to prevent hanging on unresponsive endpoints.
JSON structured logs to stdout. Control log level with RUST_LOG:
export RUST_LOG=info # default
export RUST_LOG=debug # verboseSee DESIGN_AND_RATIONALE.md for architecture details.