Walk miners through a 0.5 TAO burn on a second push - #450
Merged
Merged
Conversation
If gascli d push hits a used free slot, the CLI offers to burn SN34 alpha from this wallet, then retries the upload with the on-chain receipt so miners do not have to paste a transaction hash. Co-authored-by: Cursor <cursoragent@cursor.com>
A first push never mentions burning. A later push always walks through the 0.5 TAO SN34 alpha burn; declining or running non-interactively stops the upload. Co-authored-by: Cursor <cursoragent@cursor.com>
A second push still burns existing SN34 alpha when there is enough. Otherwise it spends 0.5 TAO in one add_stake_burn instead of staking and burning in two steps. Co-authored-by: Cursor <cursoragent@cursor.com>
A crash after the extrinsic lands should not charge a second 0.5 TAO when the same receipt can still claim unused credit. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
There are 4 total unresolved issues (including 2 from previous reviews).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e5c0770. Configure here.
Allow the interactive prints, burn when staked alpha already covers the 0.5 TAO fee, keep the receipt until confirm, and start a new burn when a saved hash is already used. Co-authored-by: Cursor <cursoragent@cursor.com>
…ation Distinguish duplicate uploads from other 409 conflicts
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.

Summary
gascli d pushstill does a normal upload first. If this hotkey already used its free slot and has no unused burn credit, the CLI explains the 0.5 TAO SN34 alpha fee, asks to continue, unlocks the coldkey, burns, and retries the upload with the burn receipt. Miners do not paste a hash.burn_alpha. Short α and ≥0.5 free TAO uses oneadd_stake_burn. Recycle does not count. There is no--yes/--no-burn; a second counted model requires the burn.Depends on the upload API in BitMind-AI/bmcore#392 accepting
burn_tx_hash/burn_blockand auto-attaching unused credit.Test plan
pytest tests/test_resubmit_burn.py tests/test_miner_upload_streaming.py tests/test_push_model_retries.pygascli d pushon a fresh registration still succeeds without a burngascli d pushon the same hotkey prompts, burns, retries (needs bmcore refactor cache modules #392 deployed)nstops without sending a burnNote
Medium Risk
Introduces on-chain burns and coldkey-signed extrinsics tied to upload authorization; behavior depends on the upload API accepting burn proof (bmcore #392).
Overview
Enables second and later model pushes on the same hotkey after the free submission slot is used, by having
gascli d pushburn 0.5 TAO of SN34 alpha and attach proof to the upload API.Adds
gas/protocol/resubmit_burn.pyfor an interactive flow: explain the fee, confirm in a TTY, then eitherburn_alphafrom staked α oradd_stake_burnwhen stake is short. Burn receipts (tx_hash+ block) are saved underGAS_HOMEand reused if upload or exam fails; the receipt is cleared only after a successful confirm.upload_single_modalitynow sends optionalburn_tx_hash/burn_blockon presign, retries with a saved or fresh burn on 403 submission-limit responses, and narrows “already uploaded” handling so only the explicit duplicate-hash 409 skips upload (other 409s fail closed).push_modelpasses aresubmitcallback into uploads. Docs inDiscriminative-Mining.mddescribe the paid resubmit path. Covered bytests/test_resubmit_burn.py.Reviewed by Cursor Bugbot for commit 6a00b35. Bugbot is set up for automated code reviews on this repo. Configure here.