feat(independent): gate one verified miner axon announcement - #150
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 51934fa6d4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| mev_protection=False, | ||
| period=ANNOUNCEMENT_PERIOD_BLOCKS, | ||
| raise_error=True, |
There was a problem hiding this comment.
Pass only supported arguments to
serve_axon
With the repository-pinned Bittensor 10.5.0 runtime, Subtensor.serve_axon accepts netuid, axon, the two wait flags, and an optional certificate; it does not accept mev_protection, period, or raise_error. The real live call therefore raises TypeError before submitting anything, but the broad exception handler treats that as an uncertain submission and leaves a permanent no-retry journal, so the intended announcement cannot succeed. The injected **kwargs test double does not exercise this SDK contract.
Useful? React with 👍 / 👎.
Exact-head repair outcomeCommit: Outcome targetAn incompatible local Bittensor Finding dispositions
Verification
Local environment boundaryA broad macOS run reached Next gateKeep this PR draft and stacked on #148. Require exact-head GitHub CI plus review, then merge after #148 and before #149. No wallet access, signing, axon announcement, deploy, or CyberGym change occurred. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a063388b0f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| state = state_loader(subtensor) | ||
| if not _same_endpoint(state, ip=ip, port=port): |
There was a problem hiding this comment.
Bind finalized readback to the reviewed UID
If the miner is deregistered and re-registered at a different UID between preview and readback, this check accepts the new row whenever its endpoint matches, because finalized_miner_state() pins the hotkey/coldkey but _finalized_readback() never compares state.uid with the preview or journal UID. Submission and recovery can consequently record finalized_proven/finalized_recovered with a readback for a different UID than the journal identity; pass the reviewed UID into this function and reject any mismatch (and enforce the same check in the already-announced shortcut).
Useful? React with 👍 / 👎.
Port only the already-registered Cathedral miner announcement path onto the PR148 base, without rent, registration, server startup, or weight composition. Default to an owner-only QVL and canonical-SAT preview. Require its reviewed digest, the pinned miner and Cathedral coldkey, the canonical runtime root, fresh attested-SPKI evidence, and an explicit exclusive-announcer assertion before the sole serve_axon call. Persist the signed-intent boundary and exact finalized readback so an uncertain outcome is fenced as AMBIGUOUS_DO_NOT_RETRY and can be reconciled without resubmission.
Bind the exact Bittensor serve_axon keyword contract before the durable no-retry journal exists. This turns a provable local SDK signature mismatch into a safe pre-submission refusal while preserving ambiguity fencing for every exception after the call begins. Add regressions for incompatible callables and the installed Bittensor contract.
a063388 to
b045ce3
Compare
|
@codex review Refreshed-main merge gateExact head: Outcome targetAn incompatible local Bittensor Rebase proofThe two reviewed commits were replayed without conflict. Their stable patch IDs are unchanged:
Local verification on the rebased head
Merge gateKeep draft until exact-head GitHub CI, this exact-head Codex review, and the scoped Claude Fable review complete. No wallet access, signing, axon announcement, broadcast, deployment, or CyberGym change occurred. |
|
PM after #148 merge. Base is now Pin the published GHCR index digest next (same pin PolarIS #1163 must use): #149 waits. CyberGym #146/#147 stay held. Did not ping Astro. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b045ce35b3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| receipt = _receipt_fields(response) | ||
| if getattr(response, "success", None) is not True: |
There was a problem hiding this comment.
Treat response parsing failures as ambiguous
If serve_axon returns a malformed or partially populated SDK response—for example, a receipt with an invalid hash/block number or a property that raises—_receipt_fields(response) throws after the call may already have signed or broadcast. Because this statement is outside the post-call exception handling, the CLI reports REFUSED_NO_CHAIN_WRITE rather than AMBIGUOUS_DO_NOT_RETRY, even though the no-retry journal already exists and the chain outcome is unknown. Route response inspection failures through the same ambiguous readback/persistence path as call exceptions.
Useful? React with 👍 / 👎.
Treat every response-inspection failure after serve_axon entry as ambiguous because the announcement may already be on chain. Preserve the durable no-retry journal, prove the exact Bittensor 10.5.0 response contract, and cover unreadable receipt and success properties.
|
@codex review Post-call ambiguity repairExact head: Outcome targetAfter Review dispositions
Verification
No wallet access, signing, axon announcement, broadcast, deployment, or CyberGym change occurred. |
Prove the locked Bittensor 10.5.0 serve_axon return annotation is ExtrinsicResponse and the response and receipt contracts expose every field consumed by the announcement fence.
|
@codex review Exact installed-SDK evidence gateExact head: The remaining Fable P2 test-evidence gap is closed against the locked runtime itself:
Focused axon suite remains No wallet access, signing, axon announcement, broadcast, deployment, or CyberGym change occurred. |
Final review dispositionExact head
Trust boundary: this is source and test proof only. No wallet access, signing, axon announcement, broadcast, deployment, or CyberGym change occurred. Live finalized chain state remains a later operator-gated proof. |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_94b79247-b17c-4d8c-aa38-d8620d25900d) |
|
PM note after merge: this is source/test proof only ( Next gates remain external: PolarIS #1163 digest pin + bounded TDX worker, finalized miner registration under Cathedral coldkey, no-write axon packet, then one announce. #149 UID30 100/0 stays draft until rebased onto this head and CI-green. Did not ping Astro. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8f6cdf65fd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| _write_exclusive_owner_only(target, payload) | ||
| _write_exclusive_owner_only(digest_path, (digest + "\n").encode("ascii")) |
There was a problem hiding this comment.
Make preview and digest creation recoverable
If the detached-digest path already exists, or its creation fails after the JSON write (for example due to quota exhaustion), this second call raises but leaves the newly created preview behind. A retry with the same --output then fails on the first exclusive write, so a transient failure or stale .sha256 file permanently strands that output path without a complete review packet. Check both destinations before writing or remove the newly created preview when detached-digest creation fails.
Useful? React with 👍 / 👎.
Outcome target
Make one already-registered Cathedral miner eligible to appear as a serving SN39 axon without joining rent, registration, server startup, or weight submission.
The default operation creates an immutable no-chain-write review packet for the exact pinned miner at one globally routable IPv4 address on HTTPS port 8081. The live operation remains behind the reviewed SHA256, explicit confirmation, an all-other-announcers-stopped assertion, fresh TDX/QVL and canonical SAT evidence, and a durable no-retry journal. Success means the endpoint is present in a finalized SN39 readback. Any uncertain result becomes
AMBIGUOUS_DO_NOT_RETRY.This PR is stacked on #148 and must not merge first.
Exact launch invariant
5CJTD6znKPfsQFjPQtTvRiHHcLtpXJr7P16dF4VuEtx9qn7G.5G6mgvL59o6AM8rFRYbbUpbzjjGwcVLUidpQ1vsz5UkZyw2o.5FF6FtDUhn7XdPYmEdH5XjLAmLfmwLTCNVBgcrj3A4sstwaw.8081, HTTPS.SubtensorModule.serve_axonattempt with finalization requested.[65535], 100% verified miner and 0% burn.Acceptance targets
35bb55f89f411d5dcf5f72be90488e999ee68c41dfc0429a0dcb8cc2b448b6bb.serve_axon.Trust boundaries
The IP-literal
HttpsEvidenceTransportobserves the self-signed leaf SPKI. Authentication comes from fresh TDX REPORT_DATA/QVL binding that SPKI, followed by canonical SAT over the same SPKI. The ordinary CA and hostname-validated miner client remains incompatible.QVL PASS verifies the quote and requested REPORT_DATA under the pinned verifier. It does not prove the OCI image digest. Image provenance and the immutable digest remain separate evidence.
The local process lock is enforced. A remote duplicate announcer is not detectable through local
flock. The all-other-hosts-stopped assertion remains an operator responsibility and is recorded in the journal.Verification
36 passedintests/thin/test_miner_axon_announce.py.640 passed.cathedral-independent-miner-announceentry point.git diff --checkpassed.Deployment target
Rollback and failure behavior
announce. Use read-onlyrecoverwith the same preview and digest.Known risks
serve_axonfee. Registration and total spend remain separately bounded by the approved$20cap.Next gate
Present one no-write packet containing the reviewed image digest and provenance, Polaris receipt and projected total cost, finalized registration UID and ownership, public TCP 8081 evidence, fresh QVL and same-SPKI SAT proof, owner-only preview plus detached digest, and confirmation all other announcers are stopped. Only that packet clears one
serve_axonattempt. Finalized axon readback then clears the separate UID30 weight preview. It does not authorize weight submission by itself.Note
High Risk
Live
announcesubmits a single finalizedserve_axonextrinsic for a pinned hotkey; ambiguous post-submit failures require manual recovery and block automatic retries, so operational mistakes can strand announcement state on mainnet.Overview
Adds a digest-authorized SN39 miner axon announcement path for one pinned Cathedral miner on Finney netuid 39, deliberately excluding rent, registration, server startup, and weights.
previewbuilds an immutable owner-only JSON review packet (plus detached SHA256) from finalized metagraph state, global IPv4 HTTPS:8081, and fresh TDX/QVL + canonical SAT evidence bound to the observed TLS SPKI—without signing or submitting anything.announceloads an exact reviewed digest, re-checks registration/coldkey/axon drift, recollects matching endpoint proof, then allows at most oneserve_axonbehind file locks and a durable ambiguity journal withretry_allowed: false. Uncertain SDK outcomes surface asAMBIGUOUS_DO_NOT_RETRY;recoverread-only reconciles from finalized chain readback without resubmitting.Registers console entry
cathedral-independent-miner-announceand a large pytest suite covering preview validation, no-retry semantics, and Bittensor 10.5serve_axoncontract binding.Reviewed by Cursor Bugbot for commit 8f6cdf6. Bugbot is set up for automated code reviews on this repo. Configure here.