1. 10 May, 2024 13 commits
  2. 09 May, 2024 11 commits
    • Adrian Sutton's avatar
      op-dispute-mon: Fetch output root agreement in extract stage (#10464) · f2e06c31
      Adrian Sutton authored
      * op-dispute-mon: Enrich games in parallel
      
      Reports any failure to retrieve data in the failed metric since it results in the game being skipped.
      
      * op-dispute-mon: Make max concurrency configurable
      
      Simplify the code a bit.
      
      * op-dispute-mon: Add numbers to log
      
      * op-dispute-mon: Reduce default max concurrency
      
      * op-dispute-mon: Add metric for monitor duration
      
      * op-dispute-mon: Fetch output root agreement in extract stage
      
      Removes the last HTTP call from the transform stage and allows the calls to be done in parallel.
      f2e06c31
    • George C. Knee's avatar
      custom-gas-token: add e2e test (#10440) · 4854ed90
      George C. Knee authored
      * add tests for activating custom gas token and bridging tokens to l2
      
      * update test following concurrent change in SystemConfig ABI
      
      * update systemconfig bindings
      
      steps to reproduce:
      
      git checkout  v1.7.3 -- op-bindings
      
      remove WETH9 from artifacts.json
      
      cd op-bindings
      
      make bindgen-generate-local
      
      select this one file discard the others
      
      * use require.NoError instead of require.Nil
      
      * build: fix
      
      * refactor using setup + subtests
      
      * add assertions for WETH name and symbol getters
      
      * minor changes in response to review
      
      * devnet-allocs: use sender with known private key
      
      some e2e tests require the ability to transact as the system owner safe owner, so we can't use the foundry default sender (private key unknown)
      
      This uses the same address as "Deployer"
      
      * use deployer as Safe owner
      
      * WIP refactor test
      
      * add most of the remaining test assertions
      
      * rename file
      
      * flatten out subtests
      
      we want to specify a strict ordering of operations
      
      * complete checkWithdrawal step
      
      * reorder test steps
      
      * check both ETH and token balances on l1 during withdraw
      
      * simplify callViaSafe helper
      
      * factor out expectations
      
      * add some extra boilerplate to track TransactionDeposited event
      
      and GasPayingTokenSet event on L2
      
      * remove comments
      
      * remove wayward line
      
      * flatten out sub test
      
      * add comment to devnet forge script command
      
      * remove version check on systemConfig
      
      * update systemconfig bindings
      
      steps to reproduce:
      
      git checkout  v1.7.3 -- op-bindings
      
      remove WETH9 from artifacts.json
      
      cd op-bindings
      
      make bindgen-generate-local
      
      select this one file discard the others
      
      * skip TestCustomGasToken when UseFPAC is true
      
      * use differente helper to skip test
      
      * harmonize use of context.Background{}
      
      * tidy up and add comments
      
      * remove cfg.DeployConfig.FinalizationPeriodSeconds = 2
      
      * remove log lines
      
      * use decimal instead of hex
      
      ---------
      Co-authored-by: default avatarMark Tyneway <mark.tyneway@gmail.com>
      4854ed90
    • Adrian Sutton's avatar
    • Adrian Sutton's avatar
      op-dispute-mon: Enrich games in parallel (#10461) · 0ad08a37
      Adrian Sutton authored
      * op-dispute-mon: Enrich games in parallel
      
      Reports any failure to retrieve data in the failed metric since it results in the game being skipped.
      
      * op-dispute-mon: Make max concurrency configurable
      
      Simplify the code a bit.
      
      * op-dispute-mon: Add numbers to log
      
      * op-dispute-mon: Reduce default max concurrency
      
      * op-dispute-mon: Add metric for monitor duration
      0ad08a37
    • clabby's avatar
      feat(ctb): Expose `l2BlockNumberChallenger` (#10463) · 1c33c39a
      clabby authored
      ## Overview
      
      Exposes the `l2BlockNumberChallenger` in the fault dispute game.
      1c33c39a
    • Mark Tyneway's avatar
      contracts-bedrock: deprecate `finalizeDeposit` (#10459) · 251af5e4
      Mark Tyneway authored
      The [finalizeDeposit](https://github.com/ethereum-optimism/optimism/blob/b9eb669aa5dfc36204ce2167da2e5ab8bbde61de/packages/contracts-bedrock/src/L2/L2StandardBridge.sol#L147)
      function is left over from the legacy OVM style standard bridge.
      It is impossible to be called as the bridge has moved to the modern interface which is based on `finalizeBridgeETH` or `finalizeBridgeERC20`.
      
      Methods actually used in bridge:
      
      - [finalizeBridgeETH](https://github.com/ethereum-optimism/optimism/blob/b9eb669aa5dfc36204ce2167da2e5ab8bbde61de/packages/contracts-bedrock/src/universal/StandardBridge.sol#L333)
      - [finalizeBridgeERC20](https://github.com/ethereum-optimism/optimism/blob/b9eb669aa5dfc36204ce2167da2e5ab8bbde61de/packages/contracts-bedrock/src/universal/StandardBridge.sol#L379)
      
      Proof that finalizeDeposit is not used anywhere. Its defined in the L2StandardBridge and otherwise only in tests.
      
      ```
      git grep -rin finalizeDeposit
      snapshots/abi/L2StandardBridge.json:272:    "name": "finalizeDeposit",
      src/L2/L2StandardBridge.sol:147:    function finalizeDeposit(
      test/L2/L2StandardBridge.t.sol:523:    /// @dev Tests that `finalizeDeposit` succeeds. It should:
      test/L2/L2StandardBridge.t.sol:527:    function test_finalizeDeposit_depositingERC20_succeeds() external {
      test/L2/L2StandardBridge.t.sol:544:        l2StandardBridge.finalizeDeposit(address(L1Token), address(L2Token), alice, alice, 100, hex"");
      test/L2/L2StandardBridge.t.sol:547:    /// @dev Tests that `finalizeDeposit` succeeds when depositing ERC20 with custom gas token.
      test/L2/L2StandardBridge.t.sol:548:    function test_finalizeDeposit_depositingERC20_customGasToken_reverts() external {
      test/L2/L2StandardBridge.t.sol:559:        l2StandardBridge.finalizeDeposit(address(L1Token), address(L2Token), alice, alice, 100, hex"");
      test/L2/L2StandardBridge.t.sol:562:    /// @dev Tests that `finalizeDeposit` succeeds when depositing ETH.
      test/L2/L2StandardBridge.t.sol:563:    function test_finalizeDeposit_depositingETH_succeeds() external {
      test/L2/L2StandardBridge.t.sol:579:        l2StandardBridge.finalizeDeposit{ value: 100 }(
      test/L2/L2StandardBridge.t.sol:584:    /// @dev Tests that `finalizeDeposit` reverts when depositing ETH with custom gas token.
      test/L2/L2StandardBridge.t.sol:585:    function test_finalizeDeposit_depositingETH_customGasToken_reverts() external {
      test/L2/L2StandardBridge.t.sol:594:        l2StandardBridge.finalizeDeposit(address(0), Predeploys.LEGACY_ERC20_ETH, alice, alice, 100, hex"");
      test/L2/L2StandardBridge.t.sol:597:    /// @dev Tests that `finalizeDeposit` reverts if the amounts do not match.
      test/L2/L2StandardBridge.t.sol:610:    /// @dev Tests that `finalizeDeposit` reverts if the receipient is the other bridge.
      test/L2/L2StandardBridge.t.sol:623:    /// @dev Tests that `finalizeDeposit` reverts if the receipient is the messenger.
      ```
      
      There cannot be third party integrations since it is `onlyBridge`,
      meaning only the `L1StandardBridge` can call it.
      
      This commit removes the tests and the function from the
      `L2StandardBridge`. This is part of refactoring as we go,
      ensuring that the code stays clean. Tend the garden.
      251af5e4
    • clabby's avatar
      feat(ctb): Add new move type to FDG for OR counters (#10438) · 93e9d153
      clabby authored
      * feat(ctb): Add new move type to FDG for OR counters
      
      Adds a potential new move type to the `FaultDisputeGame` that allows for
      a participant to reveal the preimage of the claimed output root to
      display to the dispute game that the claimed L2 block number does not
      match up with the block number that the block header within the output
      root commits to.
      
      The root output can be challenged with the new special move type iff:
      1. The passed `OutputRootProof` hashes to equal the claimed output root.
      1. The passed Header RLP hashes to equal the block hash within the
      `OutputRootProof` above.
      1. The claimed block number in the dispute game does not equal the block
      number that the output root commits to.
      
      If there is a successful challenge with the new move type, that claim
      itself is inserted as a special case counter. In `resolveClaim`, the
      contract will always consider the creator of the L2 block challenge the
      winner of the bond. Notably, this only applies for the root claim
      subgame.
      
      * feat(ctb): Transition `RLPReader` to 4byte errors (#10439)
      
      * feat(ctb): Transition `RLPReader` to 4byte errors
      
      * semver
      
      * update summary
      
      * portal semver
      
      * extra checks
      93e9d153
    • refcell's avatar
      feat(op-dispute-mon): Contract Creation Failure Metric (#10447) · 84723638
      refcell authored
      * feat(op-dispute-mon): contract creation failure metric
      
      * fix(op-dispute-mon): log the game address for easier investigation
      84723638
    • refcell's avatar
    • refcell's avatar
      7e2bb8a9
    • clabby's avatar
      feat(ctb): Extra monitoring events in `OptimismPortal2` (#10423) · 671d08bb
      clabby authored
      Adds extra monitoring events into the `OptimismPortal2` for a dispute
      game being blacklisted and the resepected game type being set.
      671d08bb
  3. 08 May, 2024 9 commits
    • Mark Tyneway's avatar
      contracts-bedrock: fix deposit gas limit (#10449) · 80afbbdc
      Mark Tyneway authored
      * contracts-bedrock: fix deposit gas limit
      
      Ensures that the gas limit is high enough for the system
      deposit to go through. The previous gas limit was slightly
      too small. This ups it so that we are sure the system deposit
      goes through.
      
      * contracts-bedrock: fix test
      80afbbdc
    • Hteev Oli's avatar
      proxyd: remove unused error (#10444) · b9eb669a
      Hteev Oli authored
      b9eb669a
    • Diego's avatar
      add to L2Genesis Interop contracts (CrossL2Inbox, L2ToL2CrossDomainMessenger) (#10417) · bd35e43d
      Diego authored
      * bedrock-devnet: add useInterop flag
      
      * op-chain-ops: add useInterop flag
      
      * op-node: add useInterop flag to config
      
      * contracts-bedrock: add useInterop flag to Predeploy's getName
      
      * contracts-bedrock: add useInterop flag to L2Genesis
      
      * contracts-bedrock: add useInterop flag to Predeploy's test
      
      * contracts-bedrock: add useInterop flag to Setup
      
      * Revert "op-chain-ops: add useInterop flag"
      
      This reverts commit 83c63cc63bcccf15c8f2e7d7c4f74d0316abcdae.
      
      * Revert "op-node: add useInterop flag to config"
      
      This reverts commit c3617f9fd8ae4777cf4f13dd399167f0718cd9d1.
      
      * Revert "bedrock-devnet: add useInterop flag"
      
      This reverts commit 858257c8666af70586e6f40a510b2a0ff3056bcb.
      
      * contracts-bedrock: use L1Block in Predeploys for L1BlockInterop
      
      * contracts-bedrock: remove useInterop argument in Predeploys
      
      * op-chain-ops: fix TestConfigDataMarshalUnmarshal
      
      * contracts-bedrock: add CrossL2Inbox, L2ToL2CrossDomainMessenger to L2Genesis script
      
      * contracts-bedrock: add tests for interop branch of L2Genesis
      
      * Revert "op-chain-ops: fix TestConfigDataMarshalUnmarshal"
      
      This reverts commit fbc60c1fed796d03837dd674406b3aa63445deeb.
      bd35e43d
    • Adrian Sutton's avatar
      op-challenger: Integrate challenging L2 block numbers (#10446) · c41bb739
      Adrian Sutton authored
      * op-challenger: Make l2-eth-rpc required for all trace types.
      
      Add rollupEndpoint to NewConfig signature since it was already always required.
      
      * op-e2e: Remove rollup and l2-eth-rpc params from WithCannon and WithAlphabet
      
      * op-challenger: Integrate challenging L2 block numbers
      c41bb739
    • Adrian Sutton's avatar
      op-challenger: Make l2-eth-rpc and rollup-rpc required (#10445) · 97cc1f17
      Adrian Sutton authored
      * op-challenger: Make l2-eth-rpc required for all trace types.
      
      Add rollupEndpoint to NewConfig signature since it was already always required.
      
      * op-e2e: Remove rollup and l2-eth-rpc params from WithCannon and WithAlphabet
      97cc1f17
    • mbaxter's avatar
      Challenger: Pull large preimage proposals from tx logs (#10416) · 1cfd38b1
      mbaxter authored
      * challenger: Pull large preimages from tx logs
      
      * challenger: Add a few more fetcher unit tests
      
      * challenger: Implement review fixes related to slice handling, types
      
      * challenger: Clean up fetcher changes
      1cfd38b1
    • refcell's avatar
    • clabby's avatar
      chore(ctb): Update sepolia deploy config (#10418) · 89a3a5f3
      clabby authored
      89a3a5f3
    • Mark Tyneway's avatar
      cannon: remove final dep on bindings (#10408) · c0ab34f3
      Mark Tyneway authored
      * cannon: remove final dep on bindings
      
      Removes the last dependency that cannon has on `op-bindings/bindings`.
      This is done my creating reusable code for reading foundry artifacts
      from disk. This code should be reusable between any service that wants
      to read the foundry artifacts from disk. This includes roundtrip
      tests for JSON serialization of the foundry artifacts.
      
      * op-chain-ops: address semgrep
      
      https://github.com/golang/go/issues/22967
      c0ab34f3
  4. 07 May, 2024 7 commits
    • refcell's avatar
      fix(op-dispute-mon): Improve Resolution Status Granularity (#10419) · 57211c6d
      refcell authored
      * stash resolution status
      
      * fix(op-dispute-mon): resolution status metric
      
      * fix(op-dispute-mon): add logs for resolvable games
      57211c6d
    • Joshua Gutow's avatar
      op-node: Implement fjord RLP & Channel Bank Size limit Increases (#10357) · 4386680d
      Joshua Gutow authored
      * op-node: Increase MaxChannelBankSize with Fjord
      
      This also creates a ChainSpec object which is responsible for returning protocol
      parameters. We use a different object than the rollup.Config because the config
      is primarily a disk representation & does not concern itself with protocol constants.
      
      * op-node: Increase MaxRLPBytesPerChannel with Fjord
      4386680d
    • refcell's avatar
      fix(op-dispute-mon): Unresolved Claim Logging (#10394) · 1812f168
      refcell authored
      * fix(op-dispute-mon): unresolved claim logging
      
      * fix(op-dispute-mon): lints
      
      * fix(op-dispute-mon): unresolved claim logging
      
      * fix(op-dispute-mon): move resolution response buffer to a constant
      1812f168
    • Diego's avatar
      contracts-bedrock: add useInterop flag (#10433) · fc458665
      Diego authored
      * bedrock-devnet: add useInterop flag
      
      * op-chain-ops: add useInterop flag
      
      * op-node: add useInterop flag to config
      
      * contracts-bedrock: add useInterop flag to DeployConfig
      
      * contracts-bedrock: add useInterop flag to Predeploy's getName
      
      * contracts-bedrock: add useInterop flag to L2Genesis
      
      * contracts-bedrock: add useInterop flag to Predeploy's test
      
      * contracts-bedrock: add useInterop flag to CommonTest
      
      * contracts-bedrock: add useInterop flag to Setup
      
      * Revert "op-chain-ops: add useInterop flag"
      
      This reverts commit 83c63cc63bcccf15c8f2e7d7c4f74d0316abcdae.
      
      * Revert "op-node: add useInterop flag to config"
      
      This reverts commit c3617f9fd8ae4777cf4f13dd399167f0718cd9d1.
      
      * Revert "bedrock-devnet: add useInterop flag"
      
      This reverts commit 858257c8666af70586e6f40a510b2a0ff3056bcb.
      
      * contracts-bedrock: use L1Block in Predeploys for L1BlockInterop
      
      * contracts-bedrock: update gas-snapshot
      
      * op-chain-ops: add UseInterop flag to genesis DeployConfig
      
      * contracts-bedrock: remove useInterop argument in Predeploys
      
      * op-chain-ops: make UseInterop flag optional
      Co-Authored-By: default avatarprotolambda <proto@protolambda.com>
      
      ---------
      Co-authored-by: default avatarprotolambda <proto@protolambda.com>
      fc458665
    • zhiqiangxu's avatar
    • Raffaele's avatar
      Dispute game compatible wd mon (#10375) · 101ad1a0
      Raffaele authored
      * adding  fault-wd-mon
      
      * adding faultproof wd-mon
      
      * adding faultproof wd-mon
      
      * fixing docker file
      
      * fixing how we get disputegame given a withdrawal log
      
      * code review fix
      
      * fix type
      101ad1a0
    • refcell's avatar
      fix(op-dispute-mon): Claim ID and Clock Logging (#10415) · eba81875
      refcell authored
      * fix(op-dispute-mon): log the claim id to validate the claim during investigation
      
      * fix(op-dispute-mon): log the clock value as well
      eba81875