Handle swap errors in chain buys#2753
Conversation
🛡️ AI Review — Skeptic (security review)VERDICT: SAFE BASELINE scrutiny: gztensor has repo write permission, established contribution history, no trusted Gittensor allowlist hit; branch fix/handle-chain-buy-swap-failures -> devnet-ready. Static review only. The diff does not modify FindingsNo findings. ConclusionNo malicious behavior or security vulnerability was found. The failed swap path uses fallible withdrawal and preserves issuance/accounting without adding panic, origin-bypass, dependency, or build-time execution surfaces. 🔍 AI Review — Auditor (domain review)VERDICT: 👍 Author is LIKELY Gittensor by recent Subtensor-heavy contribution history, has repo write permission, and is not in the trusted allowlists. PR body is substantive and matches the implementation. No duplicate-work blocker found; overlapping PRs touch nearby runtime or pallet files, but their scopes are adjacent accounting, root, governance, or cleanup work rather than a better candidate for this chain-buy swap-failure fix. Spec-version auto-fix was not needed: the PR already bumps Auto-fix applied locally because this is not a fork: Verification: FindingsNo findings. Prior-comment reconciliation
ConclusionThe failed dynamic chain-buy path now refunds the deposited subnet-account TAO back into remaining credit before the existing recycle path, with focused accounting coverage and the prior low-risk test issue fixed locally. I found no merge-blocking domain issues. 📜 Previous run (superseded)
|
|
🔄 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: 👍 |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
|
🔄 AI review updated — Skeptic: SAFE Auditor: 👍 |
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
🔄 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