1. 13 May, 2024 8 commits
  2. 12 May, 2024 1 commit
    • refcell's avatar
      feat(op-dispute-mon): L2BlockNumberChallenged Support (#10451) · bde6a96e
      refcell authored
      * feat(op-dispute-mon): L2BlockNumberChallenged dispute monitor support
      
      feat(op-dispute-mon): query for the l2 block number through the game metadata call
      
      fix(op-dispute-mon): query for the l2 block number through the game metadata call
      
      fix(op-dispute-mon): query for the l2 block number through the game metadata call
      
      * fix(op-dispute-mon): block challenge check
      
      * fix(op-dispute-mon): use agreement and metrice
      
      * op-dispute-mon: Separate l2 challenge metric (#10483)
      
      * op-dispute-mon: Consider l2 block number challenged when forecasting but don't make it a new game status.
      
      Add a separate metric to report the number of successful L2 block number challenges.
      
      * op-challenger: Remove unused blockNumChallenged field from list-games info struct
      
      * op-dispute-mon: Consider l2 block challenger in expected credits. (#10484)
      
      * feat(op-dispute-mon): Update L2 Challenges Metrics (#10492)
      
      * fix: change the l2 challenges to tha gauge vec
      
      * fix: consistent metric labels
      
      ---------
      Co-authored-by: default avatarrefcell <abigger87@gmail.com>
      
      ---------
      Co-authored-by: default avatarAdrian Sutton <adrian@oplabs.co>
      bde6a96e
  3. 11 May, 2024 5 commits
  4. 10 May, 2024 14 commits
  5. 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
  6. 08 May, 2024 1 commit
    • 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