Test the compute-honesty spot-check (challenge.py); defer endpoint bindings#43
Merged
Conversation
shard/challenge.py is the primitive that actually catches a node getting paid without running its block's real matmuls — the gap the receipt hash-chain can't close (a chain proves byte-continuity, never out == block(in)). A verifier draws a seeded input both sides derive identically, the suspect and a trusted replica run the same block, and outputs are compared by cosine + relative norm with a tolerance (honest heterogeneous hardware drifts a few ULPs -> cosine ~1; garbage/wrong/skipped block -> cosine ~0). It had ZERO tests. 13 CPU tests (pure discriminators direct; challenge_block with synthetic blocks, block_forward stubbed): derive_challenge deterministic + seed-varying; sketch deterministic; compare passes identical + ULP drift, fails garbage / scaled-magnitude (rel-norm guard) / partial-direction, works on sketches; challenge_block passes an honest recompute and fails a lazy-constant / wrong block, feeding both sides the same seeded input. Test-only. Suite 189 green.
…al lever Worked the endpoint-binding trust model and decided against building it. Under the coordinator-trusted model a tok_in_root/tok_out_root is theater: the tail root is a tautology (the coordinator already observes+uses the reply tokens), and the head root only proves a node saw the tokens it was handed — the coordinator can already bit-exactly recompute the head's in_root from embedding(token_ids) (a gather, hardware-independent). Neither proves compute. Compute honesty is challenge.py's redundant-recompute spot-check (now tested), and a (prompt, answer) receipt-of-service belongs in the c0mpute layer, not the engine's activation chain. Record the decision + revisit condition.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two things:
1. Adversarial tests for
shard/challenge.py(had zero) — the layer-block spot-check that catches a node getting paid without running its block's real matmuls (the gap the receipt hash-chain can't close). 13 CPU tests:comparepasses identical + honest ULP drift, fails garbage / wrong-magnitude (rel-norm guard) / partial-direction;challenge_blockpasses an honest recompute and fails a lazy-constant / wrong block, with both sides fed the same seeded input;derive_challenge/sketchdeterminism.2. Decision: defer receipt endpoint bindings. Under coordinator-trusted-challenge a
tok_in_root/tok_out_rootis security theater — the tail root is a tautology (the coordinator already observes the reply tokens), the head root only proves a node saw the tokens (and the coordinator can already bit-exactly recompute the head'sin_rootfromembedding(token_ids)). Neither proves compute — that'schallenge.py's job. A (prompt, answer) receipt-of-service belongs in the c0mpute layer. Recorded in the living state with the revisit condition.Test + doc only, no production change. Suite 189 green.