Run with Docker

Mainnet Archive Validator

This docker-compose file is used to run a Sova Mainnet validator. Ensure to create an env file with the necessary parameters prior to running.

# NOTE: To use a local Bitcoin node, change `--rpc-connection-type` in sova-reth
# and `BITCOIN_RPC_CONNECTION_TYPE` env in sentinel to "bitcoincore" not "external".
#
# NOTE: Ensure there is a jwt token created and the directory is correct in the
# sova-reth and op-node services.

services:
  # Core Sova components
  # Reth docs for OP chains: https://reth.rs/run/optimism.html?highlight=sequencer#running-op-reth
  sova-reth:
    container_name: reth
    image: ghcr.io/sovanetwork/sova-reth:v0.4.1
    environment:
      ADD_TO_ADDRESS_DERIVATION_CACHE: false
    command: >
      node
      --chain sova
      --btc-network mainnet
      --btc-network-url ${BITCOIN_NETWORK_URL}
      --btc-rpc-username ""
      --btc-rpc-password ""
      --rpc-connection-type external
      --network-utxos-url ""
      --sentinel-url http://sentinel-server:50051
      --sentinel-confirmation-threshold 6
      --http
      --http.addr 0.0.0.0
      --http.port 8545
      --ws
      --ws.addr 0.0.0.0
      --ws.port 8546
      --http.api all
      --authrpc.addr 0.0.0.0
      --authrpc.port 8551
      --authrpc.jwtsecret=/config/mainnet/jwt.txt
      --port=30303
      --discovery.port=30303
      --rollup.sequencer-http https://rpc.sova.io
      --rollup.disable-tx-pool-gossip
      --metrics=0.0.0.0:6060
      --datadir /var/lib/sova
      --bootnodes=${SOVA_RETH_BOOTNODE_URL}
    ports:
      - "8545:8545"
      - "8546:8546"
      - "30303:30303"
      - "30303:30303/udp"
      - "6060:6060"
      - "8552:8552"
    networks:
      - sova_validator_network
    volumes:
      - ./fresh-data:/var/lib/sova
      - ../config:/config
    depends_on:
      sentinel-server:
        condition: service_started
    healthcheck:
      start_interval: 5s
      start_period: 120s
      test: |
        curl -f -X POST -H "Content-Type: application/json" \
        --data '{"jsonrpc":"2.0","method":"net_version","params":[],"id":1}' \
        http://localhost:8545 || exit 1
      interval: 30s
      timeout: 10s
      retries: 3
      
  sentinel-server:
    container_name: sentinel
    image: ghcr.io/sovanetwork/sova-sentinel:v0.1.5
    environment:
      - SOVA_SENTINEL_HOST=0.0.0.0
      - SOVA_SENTINEL_PORT=50051
      - SOVA_SENTINEL_DB_PATH=/app/data/slot_locks.db
      - BITCOIN_RPC_URL=${BITCOIN_NETWORK_URL}
      - BITCOIN_RPC_USER=
      - BITCOIN_RPC_PASS=
      - BITCOIN_RPC_CONNECTION_TYPE=external
      - BITCOIN_CONFIRMATION_THRESHOLD=6
      - BITCOIN_REVERT_THRESHOLD=18
      - BITCOIN_RPC_MAX_RETRIES=5
      - RUST_LOG=info
    ports:
      - "50051:50051"
    networks:
      - sova_validator_network
    volumes:
      - validator-sentinel-data:/app/data
    restart: always

  op-node:
    container_name: op-node
    image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:v1.13.4
    command: >
      op-node
      --l2=http://sova-reth:8551
      --l2.enginekind=reth
      --l2.jwt-secret=/config/jwt.txt
      --verifier.l1-confs=4
      --rollup.config=/config/mainnet/rollup.json
      --rpc.addr=0.0.0.0
      --rpc.port=9545
      --rpc.enable-admin
      --l1=${ALCHEMY_L1_RPC_URL}
      --l1.rpckind=alchemy
      --l1.beacon=${L1_BEACON_URL}
      --p2p.listen.ip=0.0.0.0
      --p2p.listen.tcp=9222
      --p2p.listen.udp=9222
      --p2p.scoring=light
      --p2p.ban.peers=true
      --p2p.nat=false
      --p2p.priv.path=/data/opnode_p2p_priv.txt
      --metrics.enabled
      --metrics.addr=0.0.0.0
      --metrics.port=7300
      --metrics.port=7300
      --syncmode=execution-layer
      --p2p.bootnodes=${OP_NODE_BOOTNODE_URL}
    volumes:
      - ../config:/config
      - validator-node-data:/data
    ports:
      - "9545:9545"
      - "9222:9222"
      - "9222:9222/udp"
      - "7300:7300"
    depends_on:
      sova-reth:
        condition: service_healthy
    healthcheck:
      start_interval: 5s
      start_period: 120s
      test: ["CMD", "curl", "-f", "http://localhost:9545"]
      interval: 30s
      timeout: 10s
      retries: 3
    networks:
      - sova_validator_network

networks:
  sova_validator_network:
    driver: bridge

volumes:
  validator-data:
    name: validator-data
  validator-node-data:
    name: validator-node-data
  validator-sentinel-data:
    name: validator-sentinel-data

Testnet Validators

The configuration changes needed to run a Testnet are:

sova-reth:

  • --chain sova-testnet

  • --btc-network regtest

  • --btc-network-url https://btc.testnet.sova.io

  • --btc-rpc-username user

  • --btc-rpc-password password

  • --rpc-connection-type bitcoincore

  • --rollup.sequencer-http https://rpc.testnet.sova.io

  • --bootnodes=${SOVA_RETH_BOOTNODE_URL}

sentinel:

- BITCOIN_RPC_URL=https://btc.testnet.sova.io
- BITCOIN_RPC_USER=user
- BITCOIN_RPC_PASS=password
- BITCOIN_RPC_CONNECTION_TYPE=bitcoincore

op-node:

  • --p2p.bootnodes=${OP_NODE_BOOTNODE_URL}

Last updated