Skip to content

Fix/root reserves migration#1966

Merged
sam0x17 merged 11 commits intodevnet-readyfrom
fix/root-reserves-migration
Aug 21, 2025
Merged

Fix/root reserves migration#1966
sam0x17 merged 11 commits intodevnet-readyfrom
fix/root-reserves-migration

Conversation

@gztensor
Copy link
Contributor

@gztensor gztensor commented Aug 21, 2025

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)

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Other (please describe):

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have run cargo fmt and cargo clippy to ensure my code is formatted and linted correctly
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@gztensor gztensor marked this pull request as ready for review August 21, 2025 16:20
@github-actions github-actions bot added the hotfix This PR needs to be merged very quickly and will likely skip testing on devnet and testnet label Aug 21, 2025
@gztensor gztensor changed the base branch from main to devnet-ready August 21, 2025 16:20
@gztensor gztensor removed the hotfix This PR needs to be merged very quickly and will likely skip testing on devnet and testnet label Aug 21, 2025
@opentensor opentensor deleted a comment from github-actions bot Aug 21, 2025
@gztensor gztensor added the skip-cargo-audit This PR fails cargo audit but needs to be merged anyway label Aug 21, 2025
sam0x17
sam0x17 previously approved these changes Aug 21, 2025
Copy link
Contributor

@camfairchild camfairchild left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to add to the hook

@sam0x17 sam0x17 merged commit 6bd03ae into devnet-ready Aug 21, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-cargo-audit This PR fails cargo audit but needs to be merged anyway

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SubnetTAO and SubnetAlphaIn remain stale on root since Uniswap V3

3 participants