Skip to content
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

Patch patch for staking migration consistency fix #757

Merged
merged 2 commits into from
Aug 30, 2021

Conversation

4meta5
Copy link
Contributor

@4meta5 4meta5 commented Aug 30, 2021

extends #748 to fix incorrect total_backing and total_counted calculations which left out the self.bond

@4meta5 4meta5 added A0-pleasereview Pull request needs code review. B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes D1-runtime-migration PR introduces code that might require downstream chains to run a runtime upgrade. labels Aug 30, 2021
@4meta5
Copy link
Contributor Author

4meta5 commented Aug 30, 2021

If you're wondering, why not just add {total_counted, total_backing} += state.bond to the first migration, it's because that migration has already been executed on some networks. Right @crystalin ?

If it hadn't, then we could just change the old migration with the fix.

@crystalin
Copy link
Collaborator

I think you could considered it wasn't run on any network, I'm going to remove the tag/runtime soon and will reset the storage

@crystalin crystalin added A8-mergeoncegreen Pull request is reviewed well. and removed A0-pleasereview Pull request needs code review. labels Aug 30, 2021
@crystalin
Copy link
Collaborator

Tested, merging

@crystalin crystalin merged commit 5ed3471 into master Aug 30, 2021
@crystalin crystalin deleted the amar-patch-patch-staking-bond-less-bug branch August 30, 2021 17:15
crystalin pushed a commit that referenced this pull request Aug 30, 2021
* remember collator self bond when calculating totals

* move into existing migration instead of making new one
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A8-mergeoncegreen Pull request is reviewed well. B7-runtimenoteworthy Changes should be noted in any runtime-upgrade release notes D1-runtime-migration PR introduces code that might require downstream chains to run a runtime upgrade.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants