fix: Arb gas estimate brotli compression calldata byte estimate and estimateGasUsed adding arb L2 gas cost #468
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 kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Bug fixes
What is the current behavior? (You can also link to an open issue here)
There are 3 bugs:
estimatedGasUsed
does not add the Arbitrum L1 calldata posting fee in terms of the L2 gas price.There are 3 fixes:
estimatedGasUsed
calculation, add back the Arbitrum L2->L1 gas cost in terms of L2 Arb gas price.copy fix: arbitrum network cost estimate #466 (comment) shows the updated
estimatedGasUsed
under two CLIs. With all 3 fixes, I'm able to replicate the same gas estimate under that historical block:Also if I run the same CLI from the main branch (with getGasData refactoring, because I'm requesting historical block number), then I can see main
estimatedGasUsed
is still way off, if I don't request simulate: