-
Notifications
You must be signed in to change notification settings - Fork 487
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 bug estimate used gas and estimation for WeightV2 #1101
Fix bug estimate used gas and estimation for WeightV2 #1101
Conversation
Just tested this one and it indeed fixes #1100, thanks! Let me try to add a test to it so we avoid missing that in the future. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Just a grumble.
Hey @tgmichel I'm have hard time adding a test for this one =/ What I've done so far was to add this one to the
I left the
As If so I'll move the test to somewhere else, maybe adding it to |
@arturgontijo thank you, I thought you already had a working test sorry :| IMO if we want to verify that configured block gas limit works as expected with WeightV2 we need to test two type of transactions: ref time heavy, and proof size heavy, so in either case we make sure we account the right |
@tgmichel no man, still studying the whole code base. Regarding the TS test, I see that we have a TODO that could be exactly what we need: Do you mind writing the test(s) for it? I think you would do way way faster than me, avoiding this being blocked. =) |
Tests pass locally but fail on github machine, caused by the 10 seconds is not enough in our case, where we need to process 75M gas worth of transactions in the CI. Deadline is reached while applying the transaction pool iterator, and an arbitrary amount of transactions are included instead reaching the configured limit. |
Does heavier transactions help here? Something like this:
|
When can we merge this? I hope it can be included in the polkadot-v0.9.43 branch. :) |
There are issues with tests which need to be fixed first. |
I will work on fixing the tests today |
@sorpaas we should cherry-pick this PR to polkadot-v0.9.43 branch. |
also to polkadot-v0.9.42 branch: |
* Fix estimate used gas and estimation for WeightV2 * fmt * suggestion * add ts tests * try to fix ts tests with bigger txns
* Fix estimate used gas and estimation for WeightV2 * fmt * suggestion * add ts tests * try to fix ts tests with bigger txns
Solves #1100
Some changes that we included on Moonbeam were missing upstream:
PostDispatchInfo
included the legacy/standard used gas but the block includes the effective gas data. This is an issue when producing blocks, as we hint the block builder way more available resources left than actually are.call
runtime api).