feat(round): sign reads of the submission feed - #233
Merged
Merged
Conversation
Pairs with the backend closing its read endpoints. The feed carries every miner's PoC bytes, so the backend now gates it behind the same hotkey that posts the results back, and the client signs the fetch. The read signature binds the path, the round AND a timestamp. The timestamp is the part that matters: without it a captured header is a permanent credential, because a GET replays verbatim for anyone who observed it once. Only the submission feed is signed. The clock, the limits, the task handles and the aggregate results stay public — a miner is entitled to know the schedule it is racing, the budget it is held to, how many tasks it is scored out of, and what everyone scored. Signing those would imply a gate that is not there. `read_message` is duplicated from the backend on purpose, as the write messages already are: the two repos cannot import each other on the payout path, so the agreement is pinned as a byte literal in tests on both sides. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Member
Author
Self-review before merge (owner-directed; posted for post-merge audit)All seven checks pass. What I checked: the read message binds path, round AND timestamp — the timestamp being the part that separates a signature from a bearer token, since a GET replays verbatim for anyone who observed it. Only the submission feed is signed; a test asserts public reads send no headers, because signing them would imply a gate that is not there. Unsigned stays a working dry-run mode and sends nothing rather than fabricating a signature. The client/backend agreement is pinned as a byte literal in tests on both sides, as the write messages already are. Pairs with cathedral-cybergym-backend#35, which is the half that actually refuses. |
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.
Validator half of F1 from the v2 audit. Pairs with the backend PR closing its read endpoints.
/v2/submissionscarries every miner's PoC bytes. It is now validator-signed, and this client signs the fetch with the same hotkey that posts the results back.The timestamp is the load-bearing part
Path, round, and moment. Without the timestamp a captured header is a permanent credential — a GET replays verbatim for anyone who observed it once, which is the difference between a signature and a bearer token.
What stays public
The clock, the run limits, the task handles and the aggregate results. A miner is entitled to know the schedule it is racing, the budget it is held to, how many tasks it is scored out of, and what everyone scored. Signing those would imply a gate that is not there — a test asserts public reads send no headers.
Unsigned remains a working dry-run mode: the client sends no headers rather than fabricating a signature.
read_messageis duplicated from the backend deliberately, as the write messages already are — the repos cannot import each other on the payout path, so the agreement is pinned as a byte literal in tests on both sides.119 v2 tests pass; ruff clean.