Merged
Conversation
…or/subtensor into fix/fix/root-reserves-migration
sam0x17
previously approved these changes
Aug 21, 2025
camfairchild
approved these changes
Aug 21, 2025
camfairchild
suggested changes
Aug 21, 2025
Contributor
camfairchild
left a comment
There was a problem hiding this comment.
Need to add to the hook
sam0x17
approved these changes
Aug 21, 2025
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.
Description
This PR comes in addition to #1947 to fix discrepancy in SubnetTAO, SubnetAlphaIn, SubnetAlphaOut, SubnetVolume, and TotalStake.
We were not updating counters between blocks 5947548 (when swap v3 started) and 6262252 (when we did not update them last time) inclusively. So, the diffs that we use in this PR are fixed numbers that bring the counters to the correct values.
Block 5947548 (hash 0xbd9bc4f0b9dab298458436e3ad9c27a9495c98760450f6fd089123660c05e6c0) matches the runtime version 290, the last before swap v3.
Block 6262252 (hash 0xc70940ffc593f0108e75a95b70b381173ab63944327159c6aec546bd73448e04) matches the runtime version 301, the last version where the fix was not yet applied.
Block 6262253 (hash 0x9d51d28a3dc1277927ee779963e5560ef7e2df39cbf483c118514fd58aaaf81a) is when upgrade to runtime version 302 happened in the beginning of the block, so any root staking operation that happened in the same block would update counters correctly.
Related Issue(s)
SubnetTAOandSubnetAlphaInremain stale on root since Uniswap V3 #1911Type of Change
Checklist
cargo fmtandcargo clippyto ensure my code is formatted and linted correctly