-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix TotalIssuance on migration and TotalStake check #1166
Merged
Merged
Conversation
This file contains 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
6e74ccc
to
9637986
Compare
ales-otf
commented
Jan 23, 2025
d15288b
to
4163b91
Compare
2bc042e
to
bf9ab94
Compare
bf9ab94
to
d39a6ea
Compare
sam0x17
approved these changes
Jan 30, 2025
JohnReedV
approved these changes
Jan 30, 2025
This was referenced Feb 3, 2025
Merged
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
Fixes the issue we have with try-runtime.
It splits the state checker into two parts:
TotalIssuance
TotalStake
First, there is a bug in "migrate rao". It was increasing the currency issuance, because it returned a part of lock to coldkey. But
TotalIssuance
storage hadn't been updated. We haveframe_config::Config::SingleBlockMigrations
, whereTotalIssuance
is recalculated, but it happens before pallet's migrations are triggered. Probably, we should refactor migrations to useframe_config::Config::SingleBlockMigrations
instead to prevent such issues in the future.Another issue was related to removing of
Stake
storage. Because of that, it's not possible to sum all the stakes to checkTotalStake
. From the chat:Related Issue(s)
Type of Change
Checklist
cargo fmt
andcargo clippy
to ensure my code is formatted and linted correctlyScreenshots (if applicable)
Please include any relevant screenshots or GIFs that demonstrate the changes made.
Additional Notes
Please provide any additional information or context that may be helpful for reviewers.