fix: use dedicated gas limit for each tx in inspect_batch #764
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What 💻
Use dedicated gas limit for each tx in inspect_batch.
Why ✋
After marking factory dependencies and obtaining the amount of pubdata to be published to the L1, the bootloader checks If there will be enough gas to pay for it. If there's not, it will
nearCallPanic()
.This combined with a very big
gasPerPubdata
default and the fact that we shared the gas limit among all batches made the script run revert on cases with large factory deps. We need to use a full gas-limit for each tx on the batch.Closes #650
Evidence 📷
Previously failing
can_deploy_factory_deps
tests now pass.Notes 📝
Something related to this problem is the very high
gasPerPubdata
that the local vm has by default and the fact that when forking an url, thefair_l2_gas_price
andl1_gas_price
values from the fork that would lead to real-worldgasPerPubdata
values are not copied correctly to the local environment. This is a problem to be addressed on a future PR.