Default subnet emission off on registration#2787
Conversation
New subnets registered via do_register_network now start with SubnetEmissionEnabled set to false so emission must be explicitly enabled, rather than relying on the storage default of true. Update the two coinbase tests that registered a dynamic network and expected emission to be on by enabling it explicitly. Co-authored-by: Cursor <cursoragent@cursor.com>
🚨🚨🚨 HOTFIX DETECTED 🚨🚨🚨It looks like you are trying to merge a hotfix PR into If you are trying to merge a hotfix PR, please complete the following essential steps:
If you do not complete these steps, your hotfix may be inadvertently removed in the future when branches are promoted to |
🛡️ AI Review — Skeptic (security review)VERDICT: SAFE BASELINE scrutiny: established write-permission contributor; no Gittensor allowlist hit; main-targeting PR has hotfix label/rationale and includes one maintainer spec-bump commit. Reviewed the trusted instructions, prior Skeptic comment, prefetched PR metadata, author signals, changed-file list, and full diff. The PR does not modify FindingsNo findings. ConclusionNo malicious behavior or security vulnerability found in the changed lines. The new default-off emission flag is deterministic, introduces no panic/arithmetic/origin surface, and leaves the existing root-only admin toggle path unchanged. 🔍 AI Review — Auditor (domain review)VERDICT: 👍 Author is not in the trusted Gittensor allowlists but has write permission and substantial prior subtensor history; PR is labeled hotfix to main. Reviewed the pre-fetched PR metadata, body, prior Auditor sticky, author context, overlapping PR list, and the three-file diff. The implementation matches the PR body: public dynamic subnet registration now explicitly overrides No duplicate open PR appears to be a better candidate. The overlapping PRs are broader propagation, transfer-flag, governance, or unrelated subnet/economic changes rather than this default-off registration hotfix. No auto-fixes were applied. The PR already bumps FindingsNo findings. ConclusionThe change is narrow, covered by adjusted coinbase expectations, and does not introduce a new extrinsic, migration, panic source, origin change, or arithmetic path. I found no domain blockers in the changed lines. |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
Summary
do_register_networknow start withSubnetEmissionEnabledset tofalse, so pool-side emission must be explicitly enabled instead of relying on theDefaultTruestorage value.init_new_network(e.g. theadd_networktest helper) are unaffected, as that path still sets emission totrue.test_coinbase_tao_issuance_base,test_coinbase_v3_liquidity_update) to enable emission explicitly.Test plan
cargo test -p pallet-subtensor --lib(previously 2 failures, now green)cargo test -p pallet-admin-utils -p subtensor-chain-extensions -p subtensor-transaction-fee --libMade with Cursor