- 11 Nov, 2021 40 commits
-
-
Mark Tyneway authored
The `gas-oracle` will now periodically ping L1 asking for the latest header and will update the `l1BaseFee` value in the `OVM_GasPriceOracle` oracle predeploy when the base fee changes more than a configurable amount. This is very similar to the way that the `gas-oracle` sets the L2 gas price based on the amount of gas that has been used in an amount of time. Note that this is a breaking change when it comes to config. Some config options are renamed and some config options are added. `--ethereum-http-url` now corresponds to the L1 URL and `--layer-two-http-url` corresponds to the L2 URL. Previously, only an L2 URL was provided and it was called `--ethereum-http-url`. Now there are flags for `--l1-chain-id` and `--l2-chain-id` when previously `--chain-id` corresponded to the L2 chain id. There are also now flags for turning on and off functionality. `--enable-l1-base-fee` and `--enable-l2-gas-price` are used to turn on updating of the corresponding values. They are on by default. The `--l1-base-fee-significant-factor` is expected to be a decimal and determines how much the base fee on L1 must change before the `gas-oracle` will consider updating the base fee by sending a transaction to the `OVM_GasPriceOracle`.
-
Mark Tyneway authored
Add a setter for L1 base fee. The trusted oracle can update it over time. Eventually this will become trustless, but this is a quick and easy approach for now. Also add a setter/getter for the per batch overhead and the scalar. Also emit events for when the values are updated. This will make it much easier to track historical gas prices over time. Add tests for new functionality. L2 geth will consume the new value in the `OVM_GasPriceOracle` Add getters that make it easy for users to know the L1 costs. - `getL1Fee` returns the L1 fee given the current L1 base fee known by the L2 node - `getL1GasUsed` counts the bytes and creates a sum for the gas cost of submitting the data to L1
-
elenadimitrova authored
-
elenadimitrova authored
-
elenadimitrova authored
-
elenadimitrova authored
-
elenadimitrova authored
-
elenadimitrova authored
-
elenadimitrova authored
-
elenadimitrova authored
-
elenadimitrova authored
-
elenadimitrova authored
-
elenadimitrova authored
-
elenadimitrova authored
-
elenadimitrova authored
-
elenadimitrova authored
-
elenadimitrova authored
-
elenadimitrova authored
-
elenadimitrova authored
-
elenadimitrova authored
-
elenadimitrova authored
-
elenadimitrova authored
-
elenadimitrova authored
-
elenadimitrova authored
-
elenadimitrova authored
-
elenadimitrova authored
-
elenadimitrova authored
-
Kelvin Fichter authored
-
Kelvin Fichter authored
-
Maurelian authored
It is generated by yarn build, and listed in the .gitignore file in this package, presumably it was added by mistake
-
Maurelian authored
-
Maurelian authored
-
Maurelian authored
-
Maurelian authored
-
Kelvin Fichter authored
-
Kelvin Fichter authored
-
Kelvin Fichter authored
-
elenadimitrova authored
-
elenadimitrova authored
-
elenadimitrova authored
-