Handle swap errors in chain buys#2753
Conversation
hotkey-swap check `new_hotkey`
Use Fireactions runners for self-hosted CI jobs
🛡️ AI Review — Skeptic (security review)VERDICT: SAFE BASELINE scrutiny: gztensor has repo write permission, substantial prior subtensor activity, no trusted Gittensor allowlist hit; branch fix/handle-chain-buy-swap-failures -> devnet-ready. Static review only. The PR does not modify FindingsNo findings. ConclusionNo malicious behavior or security vulnerability was found. The failed swap path restores the deposited subnet-account TAO without adding panic, origin-bypass, dependency, or build-time execution surfaces. 🔍 AI Review — Auditor (domain review)VERDICT: 👍 Gittensor LIKELY by recent Subtensor-heavy contribution history; author has repo write permission and is not in the trusted gittensor allowlists. The Auditor proposed a replacement PR description, but the current body is non-trivial; not overwriting. Maintainers: ask the Auditor to regenerate if you want it. No duplicate-work blocker found. The overlapping PRs appear to be branch-lineage/workflow overlap or adjacent accounting work, not a better candidate for the chain-buy swap failure handled here. Spec-version auto-fix was not applied. This PR touches Static review found the failed chain-buy path withdraws the deposited subnet-account TAO back into the remaining credit when FindingsNo findings. ConclusionThe accounting change is focused and the added tests cover the failed-swap refund path and the dust/reaping issuance alignment path. No domain blocker found. |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
1 similar comment
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
Description
Chain buys may result in swap errors, in which case the TAO will be withdrawn from the subnet account and returned to the total imbalance.
Related Issue(s)
inject_and_maybe_swapsilently strands TAO whenswap_tao_for_alphafails #2661Type of Change
Checklist
./scripts/fix_rust.shto ensure my code is formatted and linted correctly