l2geth: gaslimit encoding state polling#927
Conversation
|
Codecov Report
@@ Coverage Diff @@
## feat/gaslimit-encoding #927 +/- ##
=======================================================
Coverage 82.21% 82.21%
=======================================================
Files 48 48
Lines 1895 1895
Branches 303 303
=======================================================
Hits 1558 1558
Misses 337 337 Continue to review full report at Codecov.
|
gakonst
left a comment
There was a problem hiding this comment.
This change LGTM. Basically updating the RollupGPO price with whatever's in the state once every polling interval. Would we not also need to store the data price somewhere?
|
I don't think we need to store the data price in the L2 state since we can just poll it from L1. There aren't PGAs that users can participate in by upping their fee so its in their best interest to just use whatever is returned. This is under the assumption that replicas will be able to estimate L1 gas prices the same as the sequencer, but this may not be the case depending on the version of the L1 node software used, see https://eth-gas.chainsafe.io/ how different nodes can have a different view of the network |
* l2geth: updated calculate rollup fee * l2geth: implement the gasprice serialization * lint: fix * rollup-test: fix * l2geth: gaslimit encoding state polling (#927) * l2geth: rollup gas price oracle state polling * l2geth: read l2 gasprice from the tip * l2geth: add config options for L2 gas price * l2geth: comment to remove code in future * l2geth: handle 0 and 1 fees * l2geth: enable 0 and 1 fee tests * feat: gaslimit encoding end to end (#932) * core-utils: add fees package * integration-tests: refactor for new fees * l2geth: end to end fee spec * l2geth: use new env var * deps: regenerate * lint: fix * l2geth: fee verification * tests: update gas prices * tests: update gas prices * tests: cleanup * l2geth: small cleanup * l2geth: fix max * feat: fix fee calculations with bigints * tests: fix * tests: lint * core-utils: rename fees to L2GasLimit * l2geth: fix comment * l2geth: fix name of env var * l2geth: delete extra print statement * l2geth: fix logline * tests: fix typo * l2geth: improve readability * chore: add changeset * l2geth: fix compiler error * feat: clean up and fix fees * lint: fix * core-utils: refactor api to be more friendly * lint: fix * comments: fix * refactor: clean up style and common language Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
Description
This adds in L2 state polling in the
sequenceandverifyloops to pull out the L2 gas price that is set inside of theOVM_GasPriceOraclebeing worked on here: #912This is fully backwards compatible with the config option
EnableL2GasPollingas it defaults to false. The config optionGasPriceOracleAddresswill set the address that it reads from, this should default to the0x42..address that the contract lives at. Having this address be configurable will let us deploy it to L2 and then update the network with the correct address configured and have it start working. Note that infrastructure providers will also need to reconfigure with the address that the contract ends up being deployed to.Additional context
This is opened up as a PR to #906 to prevent it from growing too large without review
This still needs config parsing and to pass through the config options to the
rollup.Config