Validator Client

The standalone validator package is @botcoin/cortex. It installs as its own validator client and defaults to CPU replay.

npm install @botcoin/cortex

Required environment:

export BASE_RPC_URL=https://mainnet.base.org
export CORETEX_REGISTRY_ADDRESS=0x...
export BOTCOIN_MINING_CONTRACT_ADDRESS=0x...
export CORETEX_ARTIFACT_BASE_URL=https://.../coretex/launch/v16
export CORETEX_REGISTRY_DEPLOY_BLOCK=<deploy-block>

Setup hydrates and verifies the public artifact set:

npx coretex-validator-setup --registry-deploy-block "$CORETEX_REGISTRY_DEPLOY_BLOCK"

Setup fetches coretex-launch-v16-artifacts.json, verifies payload SHA-256 and byte sizes, materializes the production corpus, records the launch base corpus, and bootstraps a pinned CPU scorer venv unless the operator opts out.

Sync replays chain state and verifies scoring evidence:

npx coretex-validator-sync

The default sync path:

  1. Reads V4 currentEpoch() and registry pins at one confirmed block tag.
  2. Verifies bundle version, corpus root, frontier root, baseline hash, and hidden seed commitment.
  3. Replays CoreTexStateAdvanced logs from the deploy block or the prior cursor.
  4. Recomputes each substrate root from public compact patch bytes.
  5. Checks local live root equals CoreTexRegistry.liveStateRoot(epoch).
  6. Before reveal, exits 0 with awaiting_epoch_secret_reveal.
  7. After reveal, fetches eval reports and re-scores accepted advances on CPU.

Useful replay controls:

# Replay a bounded historical window from a known parent substrate.
npx coretex-validator-sync \
  --epoch <epoch> \
  --from-block <block-containing-advance> \
  --parent-state ./parent-state.bin

# Provide a known corpus file for a historical corpus root, as a manual shortcut.
npx coretex-validator-sync \
  --corpus-for-root 0x<corpusRoot>=./corpus-for-that-root.json

# Verify one post-reveal eval report by hash.
npx coretex-validator-sync verify-patch \
  --hash 0x<evalReportHash> \
  --epoch-secret 0x<revealedSecret> \
  --parent-state ./parent-state.bin

--skip-score-replay exits with code 3. It is useful for root and artifact checks, while a score attestation requires the pinned reranker path.