1. 05 May, 2022 1 commit
  2. 24 Mar, 2022 1 commit
    • Mark Tyneway's avatar
      gas-oracle: allow configurable base fee poll interval · c535b3a5
      Mark Tyneway authored
      This commit adds a new config option that can be
      configured via argv with `--l1-base-fee-epoch-length-seconds`
      or an env var `GAS_PRICE_ORACLE_L1_BASE_FEE_EPOCH_LENGTH_SECONDS`.
      It defaults to 15 seconds. Ideally the implementation uses a
      duration flag instead of a uint64 flag, but that would be a
      breaking change for the config and this service will be
      deprecated in the future with the release of bedrock.
      
      By setting this value to a larger number, we are able to update
      the L1 base fee that is held in the L2 state less often.
      This will save the sequencer money, because it needs to
      front the costs of submitting these transactions.
      c535b3a5
  3. 01 Dec, 2021 1 commit
    • Mark Tyneway's avatar
      gas-oracle: fix type usage · ab2378e3
      Mark Tyneway authored
      Convert the average block gas limit to a `uint64` in the
      codebase instead of it being used as a `float64`.
      ab2378e3
  4. 11 Nov, 2021 1 commit
    • Mark Tyneway's avatar
      gas-oracle: update to set L1 base fee · d89b5005
      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`.
      d89b5005
  5. 08 Jul, 2021 1 commit
    • Mark Tyneway's avatar
      gas-oracle: implement and test · ce3c353b
      Mark Tyneway authored
      This commit adds the `gas-oracle` which is an offchain entity
      that sends transactions to L2 to update the gas price. It must
      be configured with a private key as the `OVM_GasPriceOracle`
      is owned.
      
      The `gas-oracle` is added to the changesets setup.
      
      Tests are included as well as CI. Dockerizing will happen
      in a follow up PR.
      ce3c353b