feat: Burn alpha upload payment#427
Open
jmnmv12 wants to merge 14 commits into
Open
Conversation
jmnmv12
commented
Jul 8, 2026
jmnmv12
commented
Jul 8, 2026
jmnmv12
commented
Jul 8, 2026
… amount_alpha_rao is filled
camfairchild
requested changes
Jul 9, 2026
| if event.get("extrinsic_idx") != extrinsic_index: | ||
| continue | ||
| inner = event.get("event", {}) | ||
| if inner.get("module_id") == "SubtensorModule" and inner.get("event_id") == "AlphaBurned": |
Contributor
There was a problem hiding this comment.
Just incase we should only exit if we find one AND the netuid matches. Unlikely but possible
Comment on lines
+237
to
+238
| "\n[yellow]Burn extrinsic submitted. Burns are irreversible; if the upload fails, " | ||
| "use this info with `ridges resume-upload` to retry[/yellow]" |
Contributor
There was a problem hiding this comment.
Add something like
"This fee is not refundable"
| # Keep the 1.4x buffer. Burned alpha is destroyed (not reclaimable), so the buffer now | ||
| # absorbs alpha-price movement between quote and burn and keeps prod uploads meaningfully | ||
| # more expensive than local testing to discourage variance farming. | ||
| amount_alpha_rao = int(eval_cost_alpha * 1e9 * 1.4) |
Contributor
There was a problem hiding this comment.
40% is a lot, maybe 10%?
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
This PR updates the payment on the agent upload process to require a burn of SN62 Alpha, using the
burnAlphaoraddStakeBurnfunctions, instead of a TAO transfer to the subnet owner's wallet. The subnet price is retrieved from the chain and together with the existingget_tao_pricemethod, the amount of Alpha to burn is calculated.The "preflight check"
/agent/checkwas updated to verify the miner's staked alpha balance instead of a TAO wallet balance. The agent upload endpoint was updated to use theAlphaBurnevent as the main source of truth, validating that the burned amount, netuid and burner coldkey match the expected values.The
upload_payment_quotesandevaluation_paymentstables were updated to store the amount of alpha rao and theamount_raoandsender_addressfields are now optional, making sure past records can still exist.The miner CLI was updated to execute a
burn_alphaoperation instead of the previoustransfer_keep_aliveoperation.The tests were also updated and new ones were added to validate this change of behaviour.