Run a validator


The specular-validator is a modular op-stack challenge agent written in Golang for dispute games, including but not limited to attestation games, fault games, and validity games. To learn more about dispute games, visit the fault proof specs.

Quickstart

To build the specular-validator, run make (which executes the make build Makefile target). To view a list of available commands and options, run ./bin/specular-validator --help.

Usage

specular-validator is configurable via command line flags and environment variables. The help menu shows the available config options and can be accessed by running ./specular-validator --help.

Running with Cannon on Local Devnet

To run specular-validator against the local devnet, first clean and run the devnet from the root of the repository.

make devnet-clean
make devnet-up

Then build the specular-validator with make specular-validator.

Run the specular-validator with:

DISPUTE_GAME_FACTORY=$(jq -r .DisputeGameFactoryProxy .devnet/addresses.json)
./specular-validator/bin/specular-validator \
  --trace-type cannon \
  --l1-eth-rpc http://localhost:8545 \
  --rollup-rpc http://localhost:9546 \
  --game-factory-address $DISPUTE_GAME_FACTORY \
  --datadir temp/verifier-data \
  --cannon-rollup-config .devnet/rollup.json  \
  --cannon-l2-genesis .devnet/genesis-l2.json \
  --cannon-bin ./cannon/bin/cannon \
  --cannon-server ./op-program/bin/op-program \
  --cannon-prestate ./op-program/bin/prestate.json \
  --l2-eth-rpc http://localhost:9545 \
  --mnemonic "test test test test test test test test test test test junk" \
  --hd-path "m/44'/60'/0'/0/8" \
  --num-confirmations 1

The mnemonic and hd-path above are for a prefunded address on the devnet. The verifier will monitor dispute games and respond to any invalid claims by posting the correct trace as the counter-claim. The commands below can then be used to create and interact with games.

Last updated