Skip to content
This repository was archived by the owner on Aug 3, 2026. It is now read-only.

op1 anti-gaming hardening + pre-crown re-derivation (netuid 40) - #89

Merged
bitzic merged 5 commits into
RalphLabsAI:mainfrom
karpabot:feat/timing-gate-off-protocol
Jul 1, 2026
Merged

op1 anti-gaming hardening + pre-crown re-derivation (netuid 40)#89
bitzic merged 5 commits into
RalphLabsAI:mainfrom
karpabot:feat/timing-gate-off-protocol

Conversation

@karpabot

@karpabot karpabot commented Jun 30, 2026

Copy link
Copy Markdown

op1/op-level anti-gaming hardening for the off-protocol-training class (netuid 40).

LIVE + deployed on the validator now:

  1. Timing gate (check_training_timing) - reject wall_clock_s > canonical-code age + slack.
  2. Require final_state.json + symmetric bundle_hash - close the delete-one-file gate bypass.
  3. Fraud-checkpoint blocklist (check_checkpoint_not_blocklisted + chain/fraud_checkpoints.json) - reject re-submission of a dethroned off-protocol checkpoint (identical model, new bundle hash).

Dormant / OFF by default (needs canonical data + calibration before enabling):
4. Pre-crown re-derivation (op_rederive_trajectory + compare_loss_trajectory) - re-run the first steps of the declared training on CANONICAL data and require the loss trajectory to reproduce. This is the only check off-protocol training cannot satisfy. Gated behind RALPH_REDERIVE=1; fail-open (skip) when disabled or when the validator has no materialized canonical data_manifest.json. Written but UNVALIDATED until a validator has canonical data to run it against.

Prereq for (4): materialize the canonical FineWeb data (data.prepare) on the validator, then calibrate the tolerance band on a known-honest bundle. Ideally the crown path invokes (4) only for a bundle that would beat the king (GPU-minutes).

All validator-only (no measured surface) -> no measurement cutover. Tests included for 1/3/4.

karpabot and others added 2 commits June 30, 2026 20:18
- reject if declared wall_clock_s > canonical code age + slack
- anchored to pinned RECIPE_DIR commit epoch (stable across validator deploys)
- pairs with MFU gate: too-long trips this, too-short trips MFU
- fail-open on missing wall_clock/epoch; RALPH_TIMING_GATE_OFF + RALPH_TIMING_SLACK_S knobs
- catches the off-protocol crowns (6.95h run attested to 2.8h-old canonical code)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- add final_state to the required-artifact loop (reject if missing)
- append final_state to bundle_hash UNCONDITIONALLY (match proof.runner)
- closes one-file bypass: deleting final_state.json made the validator compute
  a self-consistent 4-component hash and SKIP every anti-gaming gate
- verified live: no-final_state bundle -> "missing artifact final_state"

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@karpabot karpabot changed the title op1: timing-plausibility gate vs off-protocol training op1 anti-gaming hardening: timing gate + require final_state Jun 30, 2026
- reject any bundle whose (authenticated) checkpoint_sha256 is in
  chain/fraud_checkpoints.json
- stops re-submission of an identical off-protocol checkpoint under a new
  bundle hash + adjusted metadata (the timing gate weakens as the canonical
  code ages, so a waited-out resubmit otherwise re-crowns)
- fail-open on missing/malformed blocklist

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- compare_loss_trajectory (integrity.py): step-0 fingerprint + trajectory-band
  compare of declared vs re-derived training loss; the check off-protocol
  training cannot pass without actually running the canonical recipe
- op_rederive_trajectory (validator.py): apply patch -> run real train.py on
  CANONICAL data with the miner config+seed -> watch first few log points ->
  compare. Sandboxed subprocess (reuses op4 pattern). Wired into judge_submission
  between op3 and op4.
- RALPH_REDERIVE=1 to enable; fail-open (skip) when disabled or when canonical
  data_manifest.json is not materialized on the validator. UNVALIDATED until a
  validator has canonical data to run it against; calibrate the band before enabling.
- tests: timing gate, fraud blocklist, trajectory compare

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@karpabot karpabot changed the title op1 anti-gaming hardening: timing gate + require final_state op1 anti-gaming hardening + pre-crown re-derivation (netuid 40) Jul 1, 2026
@bitzic
bitzic merged commit bf94af8 into RalphLabsAI:main Jul 1, 2026
4 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants