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

Stop Balances pallet erroneously double incrementing and decrementing consumers #1976

Merged
merged 3 commits into from
Oct 30, 2023

Conversation

liamaharon
Copy link
Contributor

@liamaharon liamaharon commented Oct 23, 2023

Closes #1970

Follow up issue to tackle, once the erroneous double incrementing/decrementing has stopped: #2037

@liamaharon liamaharon added the T1-FRAME This PR/Issue is related to core FRAME, the framework. label Oct 23, 2023
@liamaharon liamaharon requested review from bkchr and a team October 23, 2023 06:36
@liamaharon liamaharon changed the title Fix Balances pallet incorrectly double incrementing and decrementing consumers Fix Balances pallet erroneously double incrementing and decrementing consumers Oct 23, 2023
@kianenigma
Copy link
Contributor

Perhaps we could write a script that scrapes extrinsics for for accounts that had their consumers erroneously incremented and generates a migration to decrement them?

First glance, this will be a race that you're alway behind, as more accounts can get their consumers incremented by mistake in the timespan while we wait for the migration to execute.

@bkchr
Copy link
Member

bkchr commented Oct 25, 2023

We should first deploy the fix and then let the fix come in a later runtime upgrade.

@liamaharon
Copy link
Contributor Author

liamaharon commented Oct 26, 2023

We should first deploy the fix and then let the fix come in a later runtime upgrade.

I agree, created a seperate issue for the fix #2037.

So, this PR is ready for review and we should not unnecessarily delay merging it to reduce the total number of broken consumers.

@liamaharon liamaharon changed the title Fix Balances pallet erroneously double incrementing and decrementing consumers Stop Balances pallet erroneously double incrementing and decrementing consumers Oct 26, 2023
@liamaharon liamaharon merged commit 0aeab38 into master Oct 30, 2023
114 checks passed
@liamaharon liamaharon deleted the liam-fix-double-consumer-inc-dec branch October 30, 2023 08:48
girazoki pushed a commit to moondance-labs/polkadot-sdk that referenced this pull request Dec 1, 2023
…ng consumers (paritytech#1976)

Closes paritytech#1970

Follow up issue to tackle, once the erroneous double
incrementing/decrementing has stopped:
paritytech#2037
@ggwpez
Copy link
Member

ggwpez commented Mar 18, 2024

What to do with chains that got fucked by this before the fix applied?
eg https://substrate.stackexchange.com/questions/11166

@liamaharon
Copy link
Contributor Author

What to do with chains that got fucked by this before the fix applied? eg https://substrate.stackexchange.com/questions/11166

Need to retroactively fix it #2037

@ggwpez
Copy link
Member

ggwpez commented Mar 21, 2024

Screenshot 2024-03-21 at 18 44 24

Prepared this to see what needs fixing. Note that #1976 is not yet on Polkadot master, as it is on 1.4 - not 1.3.

bgallois pushed a commit to duniter/duniter-polkadot-sdk that referenced this pull request Mar 25, 2024
…ng consumers (paritytech#1976)

Closes paritytech#1970

Follow up issue to tackle, once the erroneous double
incrementing/decrementing has stopped:
paritytech#2037
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T1-FRAME This PR/Issue is related to core FRAME, the framework.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix consumer handling in pallet balances update_locks
6 participants