1. 11 Nov, 2021 40 commits
    • Mark Tyneway's avatar
      ops: use build arg to reference custom builder tag · ecba6577
      Mark Tyneway authored
      Previously, the `latest` tag would be implicitly
      always used for the `builder`. This introduces
      the ability to introduce a custom tag name when
      building images that bulid `FROM` the `builder`.
      ecba6577
    • kf's avatar
      adea1c40
    • kf's avatar
      fix: errors in mainnet trial deploy script · a38d2658
      kf authored
      a38d2658
    • Mark Tyneway's avatar
      batch-submitter: default tx batch validation to false · ac63235a
      Mark Tyneway authored
      Update the batch validation config parsing so
      that the tx batch validation is false by default.
      This means that to enable transaction batch validation,
      the env var `VALIDATE_TX_BATCH` must be explicitly set
      to `true`. If it is not set, then it will default to false.
      The logic is shown below for the implementation.
      
      ```js
      > '' ? '' === 'true' : false
      false
      > 'false' ? 'false' === 'true' : false
      false
      > 'true' ? 'true' === 'true' : false
      true
      ```
      ac63235a
    • kf's avatar
      feat: add mainnet trial genesis script · ee01bd8b
      kf authored
      ee01bd8b
    • Maurelian's avatar
      fix(contracts): Update mainnet-trial config · 4bcffc04
      Maurelian authored
      4bcffc04
    • Maurelian's avatar
      style(contracts): lint fix · 3fcde61e
      Maurelian authored
      3fcde61e
    • Maurelian's avatar
      refactor(contracts): Add mainnet-trial.sh · 71260e7a
      Maurelian authored
      71260e7a
    • Mark Tyneway's avatar
      contracts: add hardhat impersonate account step · 33abe73d
      Mark Tyneway authored
      It can be used with the command:
      
      ```
      $ npx hardhat deploy --tags hardhat --network fork --fork-network kovan
      ```
      
      A new parameter `--fork-network` is added which specifies the network
      that is being forked. We cannot use the actual network due to it
      checking the `.chainId` file in the `deployments/xxx/` directory
      and comparing that against the remote network.
      
      It is hidden behind the `hardhat` tag and only runs if the deploy config
      has the network set to `fork` with `--network fork`. It is up to the
      user to configure `hardhat node` with the correct fork url.
      
      This should be used with the env vars:
      ```
      CONTRACTS_TARGET_NETWORK=fork
      CONTRACTS_DEPLOYER_KEY=0x...
      CONTRACTS_RPC_URL=<url of forked network>
      ```
      
      This must run first and I didn't want to rename all of the files,
      so I named it with the prefix `0000`.
      33abe73d
    • Mark Tyneway's avatar
      contracts: autogen the deployments `README` · 03566e09
      Mark Tyneway authored
      03566e09
    • Kelvin Fichter's avatar
      feat: solidify deployment process · 483f561b
      Kelvin Fichter authored
      Various fixes to make the deployment process easier
      483f561b
    • Mark Tyneway's avatar
      batch-submitter: add `VALIDATE_TX_BATCH` config · bfeb7fba
      Mark Tyneway authored
      Add a new config option to the batch submitter that can enable
      or disable the transaction batch validation. This can be configured
      using `VALIDATE_TX_BATCH` or `BATCH_SUBMITTER_VALIDATE_TX_BATCH`
      or `--validate-tx-batch`. It defaults to true.
      bfeb7fba
    • Kelvin Fichter's avatar
      fix: minor OVM_ETH regenesis bugs · c38e4b57
      Kelvin Fichter authored
      c38e4b57
    • ben-chain's avatar
      chore: add changeset · f9ea95bd
      ben-chain authored
      f9ea95bd
    • ben-chain's avatar
    • Mark Tyneway's avatar
      kovan: deploy new L1StandardBridge · db9526c3
      Mark Tyneway authored
      Deploy a new L1StandardBridge that accounts for the storage
      slot offset. The diff is available in the patch included in this
      commit.
      db9526c3
    • Maurelian's avatar
      chore(contracts): remove hardfork setting · 71de86d6
      Maurelian authored
      Removes the 'hardfork' config setting, falling back to hardhat's default,
      which for our current hardhat version is 'london'
      
      fix(contracts): adjust fee math for london
      71de86d6
    • Mark Tyneway's avatar
      l2geth: remove dead code from RPC · da99cc43
      Mark Tyneway authored
      Removes the dead endpoint `debug_ingestTransactions`
      that is no longer needed. Also remove the dead
      struct field `txType` from the `RPCTransaction`.
      This field was not being set and would return an
      empty string when querying for a transaction via
      RPC.
      da99cc43
    • Mark Tyneway's avatar
      l2geth: fix various tests · 95c0463c
      Mark Tyneway authored
      The tests were not running in CI on the experimental
      branch which was an oversight and allowed for various
      tests to fail. Now that experimental has been renamed
      to regenesis/0.5.0, the tests are running in CI again.
      This commit fixes all tests that were broken while
      development happened on experimental.
      
      It removes a config option `--rollup.minl2gaslimit`
      that is no longer required post regenesis.
      
      It also adds the ability to populate a genesis account
      with value in the sync service tests.
      95c0463c
    • Mark Tyneway's avatar
      chore: add changeset · 4f805355
      Mark Tyneway authored
      4f805355
    • Mark Tyneway's avatar
      gas-oracle: fix linting errors · 806b08f8
      Mark Tyneway authored
      806b08f8
    • Mark Tyneway's avatar
      gas-oracle: bump go-ethereum dep to v1.10.10 · 8ed61314
      Mark Tyneway authored
      Bumps the go-ethereum dep to release v1.10.10
      which fixes a bug with the transact opts where
      it is mutated and can cause gas estimation errors.
      
      See https://github.com/ethereum/go-ethereum/pull/23719
      8ed61314
    • Mark Tyneway's avatar
      batch-submitter: handle error case explicitly · 71f8de9c
      Mark Tyneway authored
      It was possible to return from a function directly
      into destructuring an array when the return value
      was polymorphic in either being an array or undefined.
      The undefined case is handled explicitly now and an
      error is thrown with a useful error message instead of
      something that would require looking at the source code
      and knowing nodejs error types to find out what the
      problem was.
      71f8de9c
    • Mark Tyneway's avatar
      kovan regenesis: deploy contracts · a5807cde
      Mark Tyneway authored
      Includes artifacts and updated deploy scripts that were
      used to generate the initial state
      a5807cde
    • Maurelian's avatar
      a828c767
    • Mark Tyneway's avatar
      regenesis-script: replaceWETH helper · 910a752c
      Mark Tyneway authored
      Create a replaceWETH helper function that can be reused in the
      tests. WETH is an immutable in the uniswap contracts so a find
      and replace is used to replace the weth address with the L2 eth
      address on optimism.
      910a752c
    • Mark Tyneway's avatar
      l2geth: clean up mutex logic · 6bb040b7
      Mark Tyneway authored
      Reverts 341580e8f4e7c83d0382fc7d40281b5ac973e568 in favor of more simple
      logic. A longer term solution needs to be implemented for the race
      condition where the `gas-oracle` front runs a tx that has already passed
      gas validation at the policy layer.
      
      The `gas-oracle` tx can increase the L1 gas portion of the fee,
      causing the tx that already passed the policy check to fail during
      consensus execution. This should never happen.
      6bb040b7
    • Mark Tyneway's avatar
      l2geth: remove dead L1 gas price fetching code · c39165f8
      Mark Tyneway authored
      The new gas price scheme no longer fetches the L1 gas price from
      a remote L1 node. It now instead will use the L1 gas price
      that lives in the L2 state. The `gas-oracle` is responsible for
      updating the L1 gas price in the `OVM_GasPriceOracle` predeploy.
      c39165f8
    • Kelvin Fichter's avatar
      feat: add a readme to the surgery package · 0dff03cb
      Kelvin Fichter authored
      0dff03cb
    • Kelvin Fichter's avatar
      fix: move chai into deps for core-utils · 20c8969b
      Kelvin Fichter authored
      20c8969b
    • Kelvin Fichter's avatar
      e16d41c0
    • Kelvin Fichter's avatar
      fix: correctly export standards contracts · 6ee7423f
      Kelvin Fichter authored
      6ee7423f
    • Kelvin Fichter's avatar
      fix: genesis output format · f5115e27
      Kelvin Fichter authored
      f5115e27
    • Kelvin Fichter's avatar
      fix: parse correct end index · 6c69d92e
      Kelvin Fichter authored
      6c69d92e
    • smartcontracts's avatar
      feat: add surgery script base (#1507) · 97c73cca
      smartcontracts authored
      * feat: add surgery script base
      
      * test: add test setup for surgery handlers
      
      * feat: add handlers for uniswap contracts
      
      * asdf
      
      * feat: clean up main surgery script
      
      * surgery: add constants and solc download script
      
      * feat: download pool data for surgery script
      
      * feat: add handlers for remaining predeploys
      
      * feat: ingest configs
      
      * fix: bugs in the handling of weth and eth
      
      * fix: add handling for uni pools
      
      * feat: handle 1inch surgery steps
      
      * feat: correctly load and generate the genesis file
      
      * regenesis-surgery: implement recompilation
      
      Add recompilation that links libraries and includes
      immutables
      
      * workflows: update ci to use node v14
      
      * surgery: bugfixes and logging
      
      * surgery: update
      
      * surgery: more fixes
      
      * fmfix: surgery script cleanup
      
      * surgery: dockerize
      
      * more cleanup
      
      * surgery: fix tests
      
      * surgery: update .env.example
      
      * fix: ingest based on state dump output
      
      * fix merge conflicts
      
      * minor cleanup to getSolc function
      
      * feat: standardize dump output
      
      * fix: tests
      
      * minor bug fixes
      
      * final cleanup and optimizations
      
      * clean up compilation step
      
      * highly optimize surgery process
      
      * fix: remove unused deps
      
      * remove unit tests for now
      
      * final cleanup and tweaks
      
      * fix final bugs
      
      * more minor bugfixes
      
      * remove unnecessary giant json file
      
      * fix: handle multiple libraries
      
      * wip: start testing shell
      
      * wip: continue filling out shell
      
      * wip: minor tweaks to uniswap spec
      
      * wip: refactor data loading so it can be used in tests
      
      * surgery: initialize test infra
      
      * core-utils: add helpful functions
      
      * state-surgery: more test infra
      
      * core-utils: env var parsing
      
      * add Hop ETH addresses
      
      * linting and test cleanup
      
      * finalize eoa tests
      
      * clean up test process for eoas
      
      * add uniswap tests
      
      * feat: surgery prevent double withdraw
      
      * fix: pass thru no wipe before returning
      
      * fix: undo temp code removal
      
      * Update handlers.ts
      
      * fix: uniswap immutables bug
      
      * fix: make sure multicall is in the dump
      
      * fix: revert multicall address logic
      
      * state-surgery: basic tests for verified contracts
      
      * fix: add data and solc bin dirs to eslint ignore
      
      * lint: fix
      
      * various minor fixes
      
      * Update packages/regenesis-surgery/scripts/constants.ts
      Co-authored-by: default avatarben-chain <ben@pseudonym.party>
      
      * disable tests for CI
      
      * fix: remove message passer handling
      
      * fix: remove unused dependencies
      Co-authored-by: default avatarAnnie Ke <annieke8@gmail.com>
      Co-authored-by: default avatarMark Tyneway <mark.tyneway@gmail.com>
      Co-authored-by: default avatarben-chain <ben@pseudonym.party>
      97c73cca
    • Kelvin Fichter's avatar
      fix: remove hh deploy dependency tags · 5d7e9b4e
      Kelvin Fichter authored
      5d7e9b4e
    • Kelvin Fichter's avatar
      feat: update deployment for upgrades · e1d7d530
      Kelvin Fichter authored
      e1d7d530
    • Mark Tyneway's avatar
      gas-oracle: use configured gas-price · 1527cf6f
      Mark Tyneway authored
      Use the configured gas price when updating the L1 base fee.
      In production, this should be set to 0 and the sequencer
      will allow for transactions with 0 gas price when they are
      from the owner of the gas price oracle. This prevents the
      need to manage funds on L2 for the `gas-oracle`
      1527cf6f
    • Mark Tyneway's avatar
      l2geth: use minimal EIP 2929 · e11c3ea2
      Mark Tyneway authored
      Use a minimal version of EIP 2929 for state accessing
      opcodes. This does not pull in the access list logic
      but instead charges based on cold access assumptions
      at all times
      e11c3ea2
    • Mark Tyneway's avatar
      gas-oracle: bump go-ethereum to v1.10.9 · d7fa6809
      Mark Tyneway authored
      d7fa6809