- 10 May, 2024 10 commits
-
-
Mark Tyneway authored
Updates another import to reference local bindings rather than global bindings. This test isn't going to need to worry about having its bindings be updated.
-
Mark Tyneway authored
This moves the ERC20 bindings that the `op-service` tests depend on into the `test` package that already exists. This ensures that these bindings can always exist safely and be used as part of the tests.
-
Mark Tyneway authored
Updates a single import to use the `op-proposer` bindings instead of the global monorepo bindings. The big consumer of the bindings after this are `op-e2e` and some tests in `op-service`.
-
Adrian Sutton authored
Completed games weren't updating their latest acted block because they don't get scheduled which meant the metric always reported 0.
-
Adrian Sutton authored
If the collateral for a DelayedWETH contract is sufficient and then becomes insufficient, we need to zero out the metric with the sufficient label and set the values on the insufficient labelled version.
-
Inphi authored
-
Mark Tyneway authored
* op-chain-ops: decouple from bindings Another commit that removes bindings from `op-chain-ops`. The entire repo is very close to being completely decoupled from having a global set of bindings. This does have a little bit of code duplication, but it generally results in a more simple layout. Both the `crossdomain` and `upgrades` package end up with their own `bindings` package. The `crossdomain` package is mostly legacy but the `indexer` still depends on it. The `indexer` is in maintenance mode, after reth exex it makes a lot of sense to build indexers directly into reth. The `crossdomain` package uses the bindings to migrate and serialize L1 to L2 cross domain messages. These bindings never need to be updated. The `upgrades` package has a justfile added that can be used to regenerate the bindings. This makes it easier to generate bindings based on a specific release. Previously the `upgrades` bindings were coupled in a strange way and backwards compatibility hacks needed to exist. Now the team working on upgrades can update the bindings however they want so the proper upgrade can easily be generated. * upgrades: error case Since the AddressList doesn't have the `DisputeGameFactory` yet, it cannot be pulled into the upgrade scripts. Instead return an error so that we MUST update it. https://github.com/ethereum-optimism/superchain-registry/blob/110e744c97b4873384ad2da365c281639fc0668e/superchain/superchain.go#L194
-
Adrian Sutton authored
-
dependabot[bot] authored
* dependabot(gomod): bump golang.org/x/crypto from 0.21.0 to 0.23.0 Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.21.0 to 0.23.0. - [Commits](https://github.com/golang/crypto/compare/v0.21.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by:
dependabot[bot] <support@github.com> * deps: update * deps: update --------- Signed-off-by:
dependabot[bot] <support@github.com> Co-authored-by:
dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by:
Mark Tyneway <mark.tyneway@gmail.com>
-
Joshua Gutow authored
-
- 09 May, 2024 11 commits
-
-
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.
-
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:
Mark Tyneway <mark.tyneway@gmail.com>
-
Adrian Sutton authored
-
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
-
clabby authored
## Overview Exposes the `l2BlockNumberChallenger` in the fault dispute game.
-
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.
-
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
-
refcell authored
* feat(op-dispute-mon): contract creation failure metric * fix(op-dispute-mon): log the game address for easier investigation
-
refcell authored
-
refcell authored
-
clabby authored
Adds extra monitoring events into the `OptimismPortal2` for a dispute game being blacklisted and the resepected game type being set.
-
- 08 May, 2024 9 commits
-
-
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
-
Hteev Oli authored
-
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.
-
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
-
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
-
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
-
refcell authored
-
clabby authored
-
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
-
- 07 May, 2024 10 commits
-
-
refcell authored
* stash resolution status * fix(op-dispute-mon): resolution status metric * fix(op-dispute-mon): add logs for resolvable games
-
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
-
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
-
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:
protolambda <proto@protolambda.com> --------- Co-authored-by:
protolambda <proto@protolambda.com>
-
zhiqiangxu authored
-
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
-
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
-
Mark Tyneway authored
Since slither seems to be failing consistently in CI, try bumping the versions of the tooling. Bumps to latest slither github action release: https://github.com/crytic/slither-action/releases/tag/v0.4.0 Meant to fix the slither issue seen in https://github.com/ethereum-optimism/optimism/pull/10408 ``` [-] SARIF output enabled, writing to results.sarif. [-] Slither config provided: packages/contracts-bedrock/slither.config.json [-] SLITHERARGS provided. Running slither with extra arguments 'forge clean' running (wd: /github/workspace/packages/contracts-bedrock) 'forge config --json' running 'forge build --build-info --skip */test/** */scripts/** --force' running (wd: /github/workspace/packages/contracts-bedrock) Traceback (most recent call last): File "/opt/slither/bin/slither", line 8, in <module> sys.exit(main()) File "/opt/slither/lib/python3.9/site-packages/slither/__main__.py", line 753, in main main_impl(all_detector_classes=detectors, all_printer_classes=printers) File "/opt/slither/lib/python3.9/site-packages/slither/__main__.py", line 859, in main_impl ) = process_all(filename, args, detector_classes, printer_classes) File "/opt/slither/lib/python3.9/site-packages/slither/__main__.py", line 107, in process_all ) = process_single(compilation, args, detector_classes, printer_classes) File "/opt/slither/lib/python3.9/site-packages/slither/__main__.py", line 80, in process_single slither = Slither(target, ast_format=ast, **vars(args)) File "/opt/slither/lib/python3.9/site-packages/slither/slither.py", line 156, in __init__ sol_parser.parse_top_level_items(ast, path) File "/opt/slither/lib/python3.9/site-packages/slither/solc_parsing/slither_compilation_unit_solc.py", line 326, in parse_top_level_items get_imported_scope = self.compilation_unit.get_scope(import_directive.filename) File "/opt/slither/lib/python3.9/site-packages/slither/core/compilation_unit.py", line 282, in get_scope filename = self._crytic_compile_compilation_unit.crytic_compile.filename_lookup( File "/opt/slither/lib/python3.9/site-packages/crytic_compile/crytic_compile.py", line 283, in filename_lookup raise ValueError(f"{filename} does not exist") ValueError: lib/openzeppelin-contracts/contracts/utils/Context.sol does not exist ```
-
Sam Stokes authored
* Revert "Revert "Merge pull request #8242 from ethereum-optimism/go-docker-targets"" This reverts commit d972c460. It also fixes up some conflicts / inconsistencies, since op-conductor was added after the original revert. * ops: experimental cross-build fixes * Retrieve git tag in Circle CI and use to set op version within docker image * Update dispute-mon and da-server to use new docker build flow * Fix GIT_VERSION script in Circle CI config.yml * Update ops-bedrock docker-compose to use new docker build flow * Load pre-built op-challenger image in devnet tests * Save op-challenger.tar to avoid docker rebuild in devnet tests * Add Circle CI job for check-cross-platform * Allow env var to override VERSION in Makefiles * Pass version to op-program components except op-program-client * Wrap all docker-bake variable names in quotes --------- Co-authored-by:
protolambda <proto@protolambda.com>
-
Mark Tyneway authored
* op-chain-ops: delete memdb The simple in memory statedb implementation that was backed by a genesis has served us well but is no longer required since we build the genesis files using foundry. This was originally used to enable simple execution to deploy contracts and then dump into a `genesis.json`. Keeping this memdb around will only bloat PRs that update the geth version as they may change the interface to the statedb. Instead of using the memdb interface, the genesis is modified directly. * lint: fix * style: way better Co-authored-by:
protolambda <proto@protolambda.com> * build: fix * build: fix --------- Co-authored-by:
protolambda <proto@protolambda.com>
-