Automatic L1 gas pricing#585
Conversation
Codecov Report
@@ Coverage Diff @@
## redo-devnet-reinit-1 #585 +/- ##
========================================================
- Coverage 51.92% 51.92% -0.01%
========================================================
Files 223 224 +1
Lines 26073 26432 +359
Branches 486 488 +2
========================================================
+ Hits 13538 13724 +186
- Misses 11154 11258 +104
- Partials 1381 1450 +69 |
rachel-bousfield
left a comment
There was a problem hiding this comment.
A few things to fix / consider. I'm making a PR to touch up some of the math
Implement new batch fetching scheme for automatic L1 gas pricing
arbos/tx_processor.go
Outdated
| } else { | ||
| posterCost, calldataUnits, _ = p.state.L1PricingState().PosterDataCost(p.msg, p.evm.Context.Coinbase) | ||
| if calldataUnits > 0 { | ||
| if err := p.state.L1PricingState().AddToUnitsSinceUpdate(calldataUnits); err != nil { |
There was a problem hiding this comment.
We should think about what we want the behavior for eth_calls to be. If we don't want them to include the poster data cost, as this PR changes it to, we need to update the geth code to increase the gas limit for calls by the data cost.
We should also consider having a variable for the poster that we assign to to deduplicate this code.
There was a problem hiding this comment.
Refactored to deduplicate code. eth_call behavior issue is still open for discussion.
There was a problem hiding this comment.
I believe in classic we include the poster data cost in eth_call
It keeps values consistent with the return of estimateGas
Also makes the call execution closer to what would be in an actual tx
…tro into automatic-l1-gas-pricing
Currently pulls in OffchainLabs/go-ethereum#107