Fix bug estimate used gas and estimation for WeightV2#1101
Fix bug estimate used gas and estimation for WeightV2#1101sorpaas merged 5 commits intopolkadot-evm:masterfrom
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. |
|
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
* Fix estimate used gas and estimation for WeightV2 * fmt * suggestion * add ts tests * try to fix ts tests with bigger txns Co-authored-by: tgmichel <[email protected]>
* Fix estimate used gas and estimation for WeightV2 * fmt * suggestion * add ts tests * try to fix ts tests with bigger txns Co-authored-by: tgmichel <[email protected]>
Solves #1100
Some changes that we included on Moonbeam were missing upstream:
PostDispatchInfoincluded 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.callruntime api).