-
Notifications
You must be signed in to change notification settings - Fork 767
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
StorageWeightReclaim: Fix issue when underestimating refund. #5273
Conversation
Ouch 🤦. Good find! @s0me0ne-unkn0wn can you throw your verification zombienet on this branch and see if it changes things? |
I am thinking about the impact this bug has. The |
From my pov, it doesn't improve the situation, probably even making it a bit worse. Runtime block weight info:
Registered by node: Something's wrong, although I haven't run with full logs yet, maybe it's something obvious. Will try later today. |
How is it worse? Looks unchanged to the results you posted in the past. The scenario here is only occuring if the |
Yes, you're right. I forgot that in the previous round of tests, the collator's PoV limit was raised to 6 Mb, so these numbers seemed a bit too low to me. And IIUC, this PR only changes how |
862860e
I propose to move PoV-reclaim to the next release. It can happen that the amount to reclaim is overestimated paritytech/polkadot-sdk#5229. Improvements (paritytech/polkadot-sdk#5281, paritytech/polkadot-sdk#5273) and a proper fix (paritytech/polkadot-sdk#5234) are in the works, but should be tested again. I expect the chances that the system-chains run into this scenario to be low, but it does not look like activity is so high that the inclusion of reclaim is urgent. --------- Co-authored-by: Bastian Köcher <[email protected]>
The code do reduce or increase the weight by comparing `benchmarked_weight` and `consumed_weight`. But `benchmarked_weight` is the pre dispatch weight. not the post dispatch weight that is actually written into the block weight by `CheckWeight`. So in case the consumed weight was: `pre dispatch weight > consumed weight > post dispatch weight` then the reclaim code was reducing the block weight instead of increasing it. Might explain this issue even better #5229 @skunert @s0me0ne-unkn0wn (cherry picked from commit 862860e)
The code do reduce or increase the weight by comparing `benchmarked_weight` and `consumed_weight`. But `benchmarked_weight` is the pre dispatch weight. not the post dispatch weight that is actually written into the block weight by `CheckWeight`. So in case the consumed weight was: `pre dispatch weight > consumed weight > post dispatch weight` then the reclaim code was reducing the block weight instead of increasing it. Might explain this issue even better #5229 @skunert @s0me0ne-unkn0wn (cherry picked from commit 862860e)
…ech#5273) The code do reduce or increase the weight by comparing `benchmarked_weight` and `consumed_weight`. But `benchmarked_weight` is the pre dispatch weight. not the post dispatch weight that is actually written into the block weight by `CheckWeight`. So in case the consumed weight was: `pre dispatch weight > consumed weight > post dispatch weight` then the reclaim code was reducing the block weight instead of increasing it. Might explain this issue even better paritytech#5229 @skunert @s0me0ne-unkn0wn
The code do reduce or increase the weight by comparing
benchmarked_weight
andconsumed_weight
.But
benchmarked_weight
is the pre dispatch weight. not the post dispatch weight that is actually written into the block weight byCheckWeight
.So in case the consumed weight was:
pre dispatch weight > consumed weight > post dispatch weight
then the reclaim code was reducing the block weight instead of increasing it.Might explain this issue even better #5229
@skunert
@s0me0ne-unkn0wn