Specular
Github ->Twitter ->Discord ->
  • Introduction
    • Overview
    • Intents
    • Quickstart
  • The protocol
    • Intent Lifecycle
    • Design Principles
    • Participants
  • Builders
    • Applications
    • Solvers
    • Run a validator
  • Reference
    • SDK
      • Application guide
  • Resources
    • Join us
    • Blog
    • Explore intents
    • FAQs
Powered by GitBook
On this page
  • Quickstart
  • Usage
  1. Builders

Run a validator

PreviousSolversNextSDK

Last updated 10 months ago


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 .

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.

fault proof specs