Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.0.1-alpha.9 #14

Merged
merged 1 commit into from
Feb 20, 2020
Merged

Release 0.0.1-alpha.9 #14

merged 1 commit into from
Feb 20, 2020

Conversation

willmeister
Copy link

Description

Release 0.0.1-alpha.9

Contributing Agreement

 - @eth-optimism/[email protected]
 - @eth-optimism/[email protected]
 - @eth-optimism/[email protected]
 - @eth-optimism/[email protected]
 - @eth-optimism/[email protected]
 - @eth-optimism/[email protected]
 - @eth-optimism/[email protected]
 - @eth-optimism/[email protected]
 - @eth-optimism/[email protected]
 - @eth-optimism/[email protected]
 - @eth-optimism/[email protected]
 - @eth-optimism/[email protected]
@willmeister willmeister merged commit e1e3496 into master Feb 20, 2020
@willmeister willmeister deleted the release-1-alpha-.9 branch February 20, 2020 18:34
snario pushed a commit that referenced this pull request Apr 14, 2021
* Added fix for error in StateTransitioner

* Added tests for some precompiles (#14)

* Added tests for some precompiles

* Cleanup build process (#15)

* Cleaned build and added typechain

* Linted files
InoMurko referenced this pull request in omgnetwork/optimism May 25, 2021
Clean up exit units and wording, check function and math
InoMurko referenced this pull request in omgnetwork/optimism May 25, 2021
Clean up exit units and wording, check function and math
protolambda pushed a commit that referenced this pull request Jun 16, 2023
Fix: add missing `refundChange` to journal
refcell pushed a commit that referenced this pull request Sep 6, 2023
therealbytes added a commit to therealbytes/optimism that referenced this pull request May 17, 2024
bap2pecs referenced this pull request in babylonlabs-io/optimism Jul 31, 2024
github-merge-queue bot pushed a commit that referenced this pull request Aug 21, 2024
* feat: add L2 standrad bridge interop contract

* test: add L2 standard bridge interop unit tests (#13)

* test: add L2 standard bridge interop unit tests

* fix: add tests natspec

* fix: unit tests fixes

* fix: super to legacy tests failing

* fix: mock and expect mint and burn

* fix: add generic factory interface (#14)

* test: add L2 standard bridge interop unit tests

* fix: add tests natspec

* fix: add generic factory interface

* feat: modify OptimismMintableERC20Factory for convert (#17)

* test: add L2 standard bridge interop unit tests

* fix: add tests natspec

* fix: add generic factory interface

* feat: modify OptimismMintableERC20Factory for convert

* fix: use only a public function for create3

* feat: rollback interop factory, modify legacy one

* fix: delete local token return variable

* fix: PR fixes

* test: fix address assuming

* test: fix view warning

* fix: snapshots

* test: small fixes
github-merge-queue bot pushed a commit that referenced this pull request Sep 12, 2024
* test: add L2 standard bridge interop unit tests (#13)

* test: add L2 standard bridge interop unit tests

* fix: add tests natspec

* fix: unit tests fixes

* fix: super to legacy tests failing

* fix: mock and expect mint and burn

* fix: add generic factory interface (#14)

* test: add L2 standard bridge interop unit tests

* fix: add tests natspec

* fix: add generic factory interface

* feat: modify OptimismMintableERC20Factory for convert (#17)

* test: add L2 standard bridge interop unit tests

* fix: add tests natspec

* fix: add generic factory interface

* feat: modify OptimismMintableERC20Factory for convert

* fix: use only a public function for create3

* feat: rollback interop factory, modify legacy one

* fix: delete local token return variable

* fix: PR fixes

* feat: add superchain erc20 factory implementation (#23)

* feat: add superchain erc20 factory implementation

* fix: remove createX comments

* test: add superchain erc20 factory tests (#25)

* test: add superchain erc20 factory tests

* test: add erc20 asserts

* test: fix expect emit

* fix: remove comments

* feat: add constructor to superchain ERC20 beacon (#34)

* test: remove factory predeploy etch

----------

Co-authored-by: 0xng <[email protected]>
Co-authored-by: 0xParticle <[email protected]>
Co-authored-by: gotzenx <[email protected]>

* fix: set an arbitrary address for superchain erc20 impl

* fix: deploy a proxy for the beacon on genesis (#45)


---------

Co-authored-by: 0xng <[email protected]>

* fix: conflicts and imports

* fix: interfaces

* chore: add .testdata

* fix: adding back .testdata to gitignore

* fix: new conflicts from ci improvements

---------

Co-authored-by: 0xng <[email protected]>
Co-authored-by: 0xParticle <[email protected]>
Co-authored-by: gotzenx <[email protected]>
Co-authored-by: Disco <[email protected]>
claymega pushed a commit to megaeth-labs/optimism that referenced this pull request Nov 1, 2024
…mission (#1)

* make an rpc server an into a cliapp service (#11197)

* Add buffered caching of L1 block refs to the confDepth-aware fetcher (#11142)

* Add buffered caching of L1 block refs to the confDepth-aware fetcher

* Refactor l1 head buffer into helper structs

* Fix linting errors

* Move L1 block caching from confDepth into an event-driven L1Tracker

* Fix l1HeadBuffer locking

* Better handle non-shallow reorgs

* Improve test naming

* Explicitly rewind cache when old head received

* op-conductor: Adds connection test to conductor addServer* apis (#11210)

* op-e2e: use util for RPC dial, and ensure op-node is on localhost RPC (#11209)

* dependabot(npm): bump typedoc from 0.25.7 to 0.26.5 (#11216)

Bumps [typedoc](https://github.com/TypeStrong/TypeDoc) from 0.25.7 to 0.26.5.
- [Release notes](https://github.com/TypeStrong/TypeDoc/releases)
- [Changelog](https://github.com/TypeStrong/typedoc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/TypeDoc/compare/v0.25.7...v0.26.5)

---
updated-dependencies:
- dependency-name: typedoc
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* dependabot(npm): bump eslint-plugin-jsdoc from 48.7.0 to 48.8.3 (#11213)

Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 48.7.0 to 48.8.3.
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Changelog](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/.releaserc)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v48.7.0...v48.8.3)

---
updated-dependencies:
- dependency-name: eslint-plugin-jsdoc
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* dependabot(npm): bump mocha from 10.6.0 to 10.7.0 (#11214)

Bumps [mocha](https://github.com/mochajs/mocha) from 10.6.0 to 10.7.0.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v10.6.0...v10.7.0)

---
updated-dependencies:
- dependency-name: mocha
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* dependabot(npm): bump typescript from 5.5.3 to 5.5.4 (#11215)

Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.5.3 to 5.5.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.5.3...v5.5.4)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* dependabot(npm): bump @types/node from 20.11.17 to 20.14.12 (#11220)

Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.11.17 to 20.14.12.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* contracts-bedrock: speed up ci (#11203)

Tests for `contracts-bedrock` should no longer depend
on the JS monorepo. This should speed up the tests
by removing a step that blocks it from running.

* Update README.md (#11222)

Update README

* deps: remove ts-mocha (#11202)

`ts-mocha` appears to be unused so this commit removes it

* deps: remove wait-on (#11201)

The `wait-on` dep is not used anywhere in the monorepo,
so this commit removes it.

The following command only shows the `package.json` and
lockfile:

```bash
git grep -rin wait-on
```

We should remove all unused deps

* op-node: set genesis l1 start block to value from SystemConfig contract (#11181)

* set genesis l1 start block to value from SystemConfig

* always retrieve genesis l1StartBlock from SystemConfig.startBlock()

* use contract-bedrock abi instead of large bindings file

* fix startBlock contract call

* use single func call instead of importing full SystemConfig abi

* use vars instead of hardcoded flag strings

* Fix CONTRIBUTING.md (#11224)

* cannon: fix fuzz test script (#11226)

* op-node: Extract contract binding for SystemConfig (#11227)

* deps: remove depcheck (#11230)

Remove another unused dependency. `depcheck` was previously
used when the monorepo had active typescript development in it.
Right now it has not typescript development in it and is no longer
used as part of CI. We should remove every dependency that is not
used.

* op-dispute-mon: fix the path and add example (#11233)

* fix the path and add example

* Update README.md

* Update README.md

* avoid passing factory address (#11236)

* op-service: use binary search instead of walkback for checkRecentTxs (#11232)

* use binary search instead of walkback for checkRecentTxs

* account for multiple txs from same sender in same block

* use recursion if reorg detected

* limit condition to return false

* Delete chain-mon in favor of monitorism (#11239)

* Delete chain-mon

* Delete chain-mon from other places.

---------

Co-authored-by: Kevin Kz <[email protected]>

* dependabot(gomod): bump github.com/onsi/gomega from 1.31.1 to 1.34.0 (#11242)

Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.31.1 to 1.34.0.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/gomega/compare/v1.31.1...v1.34.0)

---
updated-dependencies:
- dependency-name: github.com/onsi/gomega
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* dependabot(gomod): bump github.com/urfave/cli/v2 from 2.27.1 to 2.27.3 (#11243)

Bumps [github.com/urfave/cli/v2](https://github.com/urfave/cli) from 2.27.1 to 2.27.3.
- [Release notes](https://github.com/urfave/cli/releases)
- [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/urfave/cli/compare/v2.27.1...v2.27.3)

---
updated-dependencies:
- dependency-name: github.com/urfave/cli/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* docs(typo): README.md, pausability-lemmas.md (#11241)

* chore: add `help` target to Makefile to display the usage of all targets (#11221)

Co-authored-by: Mark Tyneway <[email protected]>

* op-node: genesis generation (#11249)

Better logging in the genesis generation when creating L2 genesis.
Using the `startBlock()` method depends on the L1 contracts being
initialized.

* [op-dispute-mon] Track the latest proposed L2 block number from games w/ a valid root claim (#11238)

We'd like to know the latest valid block number associated with a valid dispute game.
This would be the equivalent of getting the latest block number from `L2OutputOracle` in pre-FDG.
We could look into the `AnchorStateRegistry`, but this does not give us quick enough feedback
to know if we are keeping up with "proposing" correct root hashes for the most recent L2 blocks,
as dispute games resolves approximately 3.5 days (assuming happy path).

There can be many dispute games at any given time, and they may be valid or invalid.
This metric captures only valid block numbers from dispute games that we "agree" with.

* deps: remove more deps (#11250)

Removes more dead deps from the monorepo that are no longer used.
Every dep is a liability. We should only have deps that we actively use.
Soon we will be able to remove all JS from the monorepo, removing all of
these deps.

* deps: remove more js deps (#11254)

This commit removes more js deps. We are very close to removing all js
from the monorepo. We should only have deps in our codebase that we
actively use. Otherwise its a security liability.

* Update Kontrol Proofs (`0.1.247` to `0.1.316`) (#10953)

* Remove `Kontrol-Deploy.json`

* Remove `DeploymentSummaryFaultProofs` contracts

* Revert "Remove `DeploymentSummaryFaultProofs` contracts"

This reverts commit 192ac49acc76f98476caef40fa7af6bfb527282d.

* pausability-lemmas.md: update `copy-memory-to-memory` rule

* KontrolDeployment: add full deployment logic

* DeploymentSummary: sync with full deployment logic

* DeploymentSummaryFaultProofs: sync with full deployment logic

* Bump Kontrol from `0.1.247` to `0.1.313`

* run-kontrol.sh: update `kontrol prove` options

* make-sumary-deployment.sh: remove logic manipulating `Deploy.s.sol`

* Track `snapshots/state-diff/Kontrol-31337.json`

* `kontrol/README.md`: update

* OptimismPortalKontrol: remove `encodeWithSelector` from `expectRevert`

* run-kontrol.sh: set booster max recursion limit to `100`

* Kontrol-31337.json: update with non-fault-proofs deployment

* package.json: change order of evaluation for `snapshots` job

Both `pnpm kontrol-summary-fp` and `pnpm kontrol-summary` save the state updates
to `snapshots/state-diff/Kontrol-31337.json`. In order to correctly test the
non-fault-proof deployment setting `pnpm kontrol-summary` has to be run last.

* Bump Kontrol from `0.1.313` to `0.1.316`

* Update `DeploymentSummaryFaultProofs`

* ops-bedrock: Beacon-chain devnet with Dencun + Ecotone upgrade (#9117)

* ops-bedrock: beacon-chain devnet with fork to L1 Dencun and L2 Ecotone

ops-bedrock: clean up file names, drop unused stateviz

ops-bedrock: dockerfile for lighthouse from source

ops-bedrock: devnet validator keystores

ops-bedrock: dev chain config

generate genesis.ssz, work in progress devnet setup

lighthouse CLI tweaks

ops-bedrock: more CLI tweaks

devnet: fix validator keys loading

ops-bedrock: cleanup L1 geth setup and jwt-secret usage

ops-bedrock: fix L1 engine API endpoint

op-chain-ops: insert dev L1 contracts

devnet fixes

more fixes

schedule L2 Delta and Ecotone forks

op-chain-ops: fix lint

ops-bedrock: docker-compose config comments about special options

ops-bedrock: adjust beacon node log level

Co-authored-by: Sebastian Stammler <[email protected]>

* devnet: Add eth2-testnet-genesis installation step

* op-e2e: fix pre-Ecotone tests

* ops-bedrock: Fix entrypoint scripts

* op-e2e: Fix TestPreEcotone

* op-e2e: Fix hardfork validation tests

* op-e2e: Enable L1 Cancun at genesis for Ecotone system configs

* ci: use eth2-testnet-genesis tag v0.10.0

* op-e2e: use <fork>SystemConfig instead of manipulating fields

* op-e2e/actions: process beacon block root for Cancun L1s

* op-e2e/actions: fix TestBlockTimeBatchType

* op-e2e: add beacon endpoint to L1 setup

* op-e2e/actions: fix more tests...

* op-e2e/actions: fix manual setting of delta offset

* op-e2e/actions: set blob source in plasma tests

* devnet: sleep at start of tests

* ops-bedrock: remove fetch-all-sidecars for l1 lh from docker-compose

* op-e2e: fix Makefile go test flags

* op-chain-ops: Add 4788 deployer address to L1 genesis creation

* op-e2e: remove outdated TODO code

* ci: read eth2-testnet-genesis version from json

* fix l1 genesis & cci config

* rename beacon-data/deposit_contract_block.txt

* cci: dump l1-bn and l1-vs logs

* few improvements

* Move to op-e2e devnet withdrawals test

* set l1 block time to 6s in devnet template

* fix game resolve helper, to handle resolve race condition

* lower da windows

* devnet: bump plasma windows to 16

* fix: adjust plasma test params for smaller challenge window sizes

* bump lighthouse, remove src Dockerfile

* revert devnet python script commenting out

the test isn't run from this script any more anyways
that was just temporary while debugging

* remove deprecated options

ligthouse deprecated http-allow-sync-stalled
docker-compose deprecated the version tag

* retry start block fetching in L2 genesis cmd

* add CL to devnet L1 startup step

* ignore receipt for resolveClaim call in FinalizeWithdrawal

* forward tx trace as custom error type, use in withdrawal test

* return receipt in SendTx

---------

Co-authored-by: protolambda <[email protected]>
Co-authored-by: tchardin <[email protected]>

* cannon: delete unnecessary part in makefile (#11194)

* add dependence check in makefile

* Update Makefile

* Update Makefile

* docs(typo): `CrossL2Inbox.sol` (#11125)

* docs(typo): `CrossL2Inbox.sol`

`if{"f" => ""}`

* docs(crossL2Inbox): sync semver-lock

* monorepo: remove `devnet-tasks` (#11257)

Now `make devnet-test` runs go based devnet tests
rather than the legacy hardhat based ones.

```make
devnet-test: pre-devnet ## Runs tests on the local devnet
	make -C op-e2e test-devnet
```

This removes `devnet-tasks` from the monorepo, allowing
us to delete many dead dependencies.

* .github: remove old mergify config (#11258)

* remove changeset (#11259)

* feat(cross-l2-inbox): add CrossL2Inbox to predeploy addresses and abi_loader (#11267)

* dependabot(gomod): bump github.com/holiman/uint256 from 1.3.0 to 1.3.1 (#11268)

Bumps [github.com/holiman/uint256](https://github.com/holiman/uint256) from 1.3.0 to 1.3.1.
- [Release notes](https://github.com/holiman/uint256/releases)
- [Commits](https://github.com/holiman/uint256/compare/v1.3.0...v1.3.1)

---
updated-dependencies:
- dependency-name: github.com/holiman/uint256
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* cannon: add test dependence in Makefile (#11264)

* add test dependence in Makefile

* Update cannon/Makefile

Co-authored-by: mbaxter <[email protected]>

---------

Co-authored-by: mbaxter <[email protected]>

* op-chain-ops: remove dead code (#11261)

This code was used as part of the migration from the legacy system to
bedrock for op mainnet. It is no longer needed and exists in the
optimism-legacy repo if it is needed. The state transition that
represented the migration to bedrock can be reproduced using the
optimism legacy repo. Since this code is no longer used, we can delete
it here.

* MIPS2.sol MT-FPVM Implementation (#11036)

* cannon: MIPS2 MT-FPVM contract

Add a smart contract implementing the multi-threaded Cannon

* Update packages/contracts-bedrock/src/cannon/libraries/MIPSSyscalls.sol

Co-authored-by: mbaxter <[email protected]>

* cannon: Use common constant for BRK_START

* cannon: Define new constant FUTEX_EMPTY_ADDR

* cannon: Add SYS_ERROR_SIGNAL constant, fix futex wait ret val

* dedup syscall handling; rename timeout

* fix sys_clone bug

* use handler functions in onWaitComplete

* fix nits

* fix ETIMEDOUT constant

* remove leftover console import

* traverse right if left is empty on futex_wake syscall

* Update packages/contracts-bedrock/test/cannon/MIPS2.t.sol

Co-authored-by: mbaxter <[email protected]>

* fix traverseRight updates at popThread

* exit syscall is exit_group if last thread

* simplify wakeup logic; traverse fully before any other operation

* remove dup logic for wakeup traversal end

* fuzz thread.exited in wakeup tests

* update semver-lock; abi snapshots

* implement unused syscalls

* rebase; fix clone args

* update semver-lock

* handle munmap

* add comment on unimplemented syscalls

* add mising snapshots

---------

Co-authored-by: mbaxter <[email protected]>

* cleanup: rm more js (#11260)

* deps: pull js together

Puts all js in the single package where it is used

* deps: move linting config

* nx: remove config

* changesets: remove

* npmignore: remove

* npmrc: remove workspace

* ci: cleanup

* check-changed: remove nx dep

* build: attempt fix

* ci: cleanup

* cannon: Fix exitCode for invalid cloneargs in MIPS2 contract (#11275)

* mt-cannon: Implement mips logic (#11188)

* cannon: Copy over singlethreaded impls as a starting point

* cannon: Update mips property access to work with MTState

* cannon: Add new syscall constants

* mt-cannon: Implement clone syscall

* mt-cannon: Implement remaining new syscalls

* mt-cannon: Implement thread traversal changes to mipsStep()

* mt-cannon: Add logger, log when max steps reached

* mt-cannon: Implement onWaitComplete()

* mt-cannon: Implement thread manipulation methods

Also, use slices of pointers for the thread stacks

* mt-cannon: Move thread traversal fns to mips.go

* mt-cannon: Fix issue where wakeup traversal never stops

* mt-cannon: Fix issue where we can end up popping an empty stack

* mt-cannon: Move thread definitions to new thread.go file

* cannon: Add compile-time type checks for FPVM(State) impls

* mt-cannon: Add new threaded StackTracker

* mt-cannon: Update proof generation to include thread proof

* mt-cannon: Move FPVM compile-time type check

* cannon: Run common vm tests across all FPVM impls

* cannon: Cut OpenMIPS clone test

* cannon: Cleanup - fix some discrepancies, clarify constant

* cannon: Disable mem profiling in op-program instead of patch.go

* cannon: Consolidate calls to program.PatchGo

* cannon: Disable program.PatchGo in MTCannon tests

* mt-cannon: Add multithreaded program test

* cannon: Only run sleep check for single-threaded cannon

* op-program: Update profiling before dependency init fns are called

* mt-cannon: Track stack on thread clone, handled popped threads

* mt-cannon: Panic if unrecognized syscall is executed

* mt-cannon: Panic if unexpected flags are passed to SysClone

* mt-cannon: Add some tests for EncodeThreadProof()

* mt-cannon: Add some more tests around threadProof edge cases

* mt-cannon: Minimize logging

* cannon: Update go version in cannon/example/multithreaded/go.mod

Co-authored-by: Inphi <[email protected]>

* mt-cannon: Rework clone behavior based on feedback

* mt-cannon: Rework wakeup logic

* mt-cannon: Cleanup - simplify clone, refine logging

* Revert "cannon: Cut OpenMIPS clone test"

This reverts commit d876d6a44ffc01672a019d5b2411e7d3eab08439.

* mt-cannon: Skip open-mips clone test add todos

* mt-cannon: Handle munmap syscall

* mt-cannon: Exit if the last thread exits

* cannon: Clarify skip comment

* cannon: Add some todos

* cannon: Add guard around logging

---------

Co-authored-by: Inphi <[email protected]>

* contracts-bedrock docker fix (#11278)

* contracts-bedrock docker fix

* lockfile update for pnpm workspace

* op-chain-ops: Organize deploy-config, improve check-logging (#11189)

* op-chain-ops: Organize deploy-config, improve check-logging

* op-chain-ops: fix DAChallengeProxy check

* op-chain-ops: add godocs

* dependabot(gomod): bump github.com/onsi/gomega from 1.34.0 to 1.34.1 (#11279)

Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.34.0 to 1.34.1.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/gomega/compare/v1.34.0...v1.34.1)

---
updated-dependencies:
- dependency-name: github.com/onsi/gomega
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat(opsm): scaffold OP Stack Manager and tests (#11274)

* init scaffolding of OPSM contract and tests

* add chainIdToBatchInboxAddress

* chore: address semgrep findings

* test: add auth spec

* update functions sig, semver lock, snapshots

* semver lock update after installing correct foundry version

* udpates based on style guide

* snapshots

* op-program: delete redundant code (#11263)

* delete redundant code

* delete

* op-challenger: fix the wrong variable name and some additional fix (#11179)

* fix from differential-testing

* fix from L2Genesis

* fix variable name

* Update metrics.go

* docs: broken links in op-preimage (#11296)

* cannon: Fix onchain clone flags (#11293)

* cannon: Fix onchain clone flags

* cannon: Bump contract versions

* cannon: Run pre-commit

* op-node/derive: linter fix (#11265)

* linter fix

* use sentinel error

* fix format

* op-challenger: Add subcommand to continuously run trace providers (#11294)

* op-challenger: Add subcommand to continuously run trace providers

* op-challenger: Remove duplicate invalid recording.

* ops: fix build (#11299)

* ops: fix build

Migrates to a different `pnpm build` command that broke
as part of removing JS from the monorepo.

* ops: use frozen lockfile

* reduce scope of `expandedOwners` (#11301)

* fix comment (#11303)

* op-batcher: Add dynamic blob/calldata selection (#11219)

* op-batcher: Implement dynamic blob/calldata selection

* op-batcher: Improve logging in dynamic eth-da channel config

* op-batcher: Rename field ChannelConfig.MultiFrameTx to UseBlobs

* op-e2e: Add Batcher AutoDA test

* lint

* contracts-bedrock: fix `SentMessage` event (#11305)

* contracts-bedrock: fix `SentMessage` event

The bytecode emitted from `SentMessage(bytes) anonymous` abi encoded
the `relayMessage` call, breaking the ability to put calldata directly
into the event data. This uses yul to not abi encode the log as `bytes`
and instead place the calldata directly into the event data.

The fact that there is no abi decoding done in the test shows that this
is correct. Previously the abi decoding done in the test was not
correct, we want the exact data in the log to be the calldata.

* snapshots: update

* semver-lock: regenerate

* feat: introduce SuperchainWETH and ETHLiquidity (#11042)

Introduces the SuperchainWETH and ETHLiquidity contracts. More
information about these contracts can be found in the OP Stack
Specs repository.

* contracts-bedrock: fix CrossL2Inbox (#11320)

* contracts-bedrock: fix cross l2 inbox

Updates the `CrossL2Inbox` per the latest specs proposal in
https://github.com/ethereum-optimism/specs/pull/254

This reduces the cost of sending cross chain messages by
emitting the message hash as part of the event rather than
the full message itself.

* semver-lock: fix

* contracts-bedrock: port custom gas token to portal2 (#10780)

* contracts-bedrock: port custom gas token to portal2

Ports the custom gas token feature to `OptimismPortal2`.
This will enable fault proofs to run on custom gas token
chains.

* lint: fix

* tests: update

* tests: update

* Add task to capture a section of sepolia running fjord for compatibility tests. (#11326)

* Cannon: optimize the example (#11302)

* optimize the example

Use better-suited examples and make sure to add the required flag L2outputroot.

* fix path

* update

* replace network

* update comment

* op-node: optimize case to handle proposer requests (#11262)

* op-node: optimize case to handle proposer requests

* op-e2e: modify withdrawals test to trigger BlockRefWithStatus finalized hot-path

* fix(ci-builder-foundry-bump): Updating ci-builder. (#11325)

* Snapshots go scripts (#11338)

* contracts-bedrock: Go version of generate-invariant-docs

* contracts-bedrock: Go version of generate-snapshots

* devnet: Update expired docs link (#11329)

* delete expired docs link

* use the official doc

* doc: update style guide (#11290)

* doc: update style guide

* apply suggestion from code review

Co-authored-by: Maurelian <[email protected]>

* Update packages/contracts-bedrock/STYLE_GUIDE.md

---------

Co-authored-by: Maurelian <[email protected]>

* Add Granite and Holocene fork references (#11339)

* fix: set default forge gas limit (#11342)

* chain-spec: Fix next fork (#11341)

* fix: add missing assume condition (#11344)

* contracts-bedrock: remove typescript (#11340)

* contracts-bedrock: remove typescript

Moves to using Go from typescript, new code is autogenerated
by claude. Can confirm that both work as expected.

The `check-test-names` is not running in CI, it fails for both
the Go and Typescript scripts. Maybe claude will be able to get
the script to pass.

* Update check-spacers.go

Co-authored-by: semgrep-app[bot] <63493438+semgrep-app[bot]@users.noreply.github.com>

* Update packages/contracts-bedrock/scripts/checks/check-test-names.go

Co-authored-by: semgrep-app[bot] <63493438+semgrep-app[bot]@users.noreply.github.com>

* contracts-bedrock: fix build

* scripts: rename

* scripts: rename

* scripts: fixes

---------

Co-authored-by: protolambda <[email protected]>
Co-authored-by: semgrep-app[bot] <63493438+semgrep-app[bot]@users.noreply.github.com>

* Reduce ChannelTimeout to 50 in Granite (#11343)

* Reduce ChannelTimeout to 50 in Granite

* Capture granite genesis files.

* Update snapshots.

* Update op-geth dependency and resolve TODOs.

* update op-geth dependency to rc.1

* fix TestGetRollupConfig

---------

Co-authored-by: Adrian Sutton <[email protected]>

* fix: SuperchainWETH fuzz testing chain ID error (#11352)

Minor fix to fuzz testing for SuperchainWETH and related contracts.
Recipient chain ID cannot be the same as the sending chain ID.
Contracts throw an error when this is the case, causing fuzz tests
to fail.

* Apply error variable lint in op-node/p2p (#11354)

* op-chain-ops: remove etherscan package (#11345)

The `etherscan` package isn't maintained or used
in the monorepo, so it should be deleted.

* fix op-geth dependency (#11356)

* dependabot(gomod): bump golang.org/x/sync from 0.7.0 to 0.8.0 (#11358)

Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.7.0 to 0.8.0.
- [Commits](https://github.com/golang/sync/compare/v0.7.0...v0.8.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sync
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* dependabot(gomod): bump golang.org/x/time from 0.5.0 to 0.6.0 (#11357)

Bumps [golang.org/x/time](https://github.com/golang/time) from 0.5.0 to 0.6.0.
- [Commits](https://github.com/golang/time/compare/v0.5.0...v0.6.0)

---
updated-dependencies:
- dependency-name: golang.org/x/time
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ci: bump ci builder `0.50.0` (#11334)

* ci: bump ci builder `0.50.0`

Bumps the `ci-builder` image with an updated version
of foundry.

Foundry update:
https://github.com/ethereum-optimism/optimism/pull/11325

Docker build:
https://app.circleci.com/pipelines/github/ethereum-optimism/optimism/60263/workflows/154fd94a-4029-4e2f-8bce-4ea4c6d25897

* contracts-bedrock: fix tests after new foundry version

* contracts-bedrock: comment why skip

* test: better comments

* gas-snapshot: regenerate

* snapshots: update

* snapshots: update

* fix(ctb): Align expected ptr in `Bytes.slice` test

An update to `forge-std` causes `bound` to set the free memory pointer
at an unaligned offset. This commit updates the test such that the
expected pointer is correctly aligned, without an assumption on the
starting ptr's alignment.

---------

Co-authored-by: clabby <[email protected]>

* op-challenger: Modify run_trace to run a block prior to the safe head (#11349)

* op-challenger: Add metric to report memory used in the cannon VM (#11350)

* op-challenger: Add metric to report memory used in the cannon VM

* op-challenger: Remove config override.

* op-proposer: retry failed output proposals (#11291)

* op-proposer: add retries to output proposal

* op-proposer: proposeOutput returns err to help trigger retry

* op-proposer: use retry.Do for FetchOutput, add unit tests

* op-proposer: improve output fetching retry impl

* op-proposer: move done signal check into inner loop

---------

Co-authored-by: Sebastian Stammler <[email protected]>

* op-challenger: Fix prestate loading for asterisc in run-trace (#11363)

* feat(challenger): `AsteriscKona` trace type (#11140)

* feat(challenger): `AsteriscKona` trace type

Adds support for the new `asterisc-kona` game type in the
`op-challenger`

* feat: add `kona-host` `--l2-chain-id` flag

* op-challenger: Separate oracle server executor (#11348)

* fix(op-challenger): run trace cmd

* fix(op-challenger): lints

---------

Co-authored-by: Adrian Sutton <[email protected]>
Co-authored-by: refcell <[email protected]>

* op-e2e: Fix GraniteSystemConfig (#11361)

* update sepolia-devnet-0 deploy-config (#11371)

* cannon: move example test programs into testdata directory to prevent Go tool noise (#11379)

* op-node: abort block publishing if conductor commit fails (#11380)

* Fix devnet-up when op-program/bin is missing prestate-proof.json (#11383)

* contracts-bedrock: migrate to just (#11276)

* contracts-bedrock: migrate to just

Move away from `pnpm` for contracts scripts
and towards `just`. `just` was made for this,
since we are moving away from JS it makes no
sense to keep `pnpm` around which is native
to the JS ecosystem.

* ci: install just

* ops: cleanup, docs

* ci: install just

* justfile: update

* ci: fix install

* snapshots: update

* contracts-bedrock: remove pnpm/node, cleanup dockerfile

* slither ci: no longer need for workaround (TM)

* ts-linting: remove

* kontrol: regenerate snapshots

* safecall: update test

* test: update

Co-authored-by: Matt Solomon <[email protected]>

* docs: update

Co-authored-by: Matt Solomon <[email protected]>

* readme: update

Co-authored-by: Matt Solomon <[email protected]>

* docs: update

Co-authored-by: Matt Solomon <[email protected]>

* docs: update

Co-authored-by: Matt Solomon <[email protected]>

* docs: update

Co-authored-by: Maurelian <[email protected]>

* versions: use latest

* ci: fix

* CONTRIBUTING: update

* ci: fix

* lint: fix

---------

Co-authored-by: protolambda <[email protected]>
Co-authored-by: Matt Solomon <[email protected]>
Co-authored-by: Maurelian <[email protected]>

* op-proposer, op-batcher: Wait for sync in Start rather than loop. (#11192)

Ensures that if it fails, the process exits with an error, rather than just exiting the runloop and continuing on in a zombie mode that doesn't do anything but doesn't exit.

* contracts-bedrock: improve `CrossL2Inbox` devex (#11322)

* contracts-bedrock: improve `CrossL2Inbox` devex

Improve the `CrossL2Inbox` devex by creating an alternative entrypoint.
This design was not considered previously because there was a "top level
call" restriction, aka the "only EOA" invariant. This was to allow for
static analysis of transactions, keeping resource usage lower for
validating transactions when building blocks or at the mempool layer.
Since 3074/7702 render the enforcement of only eoa impossible,  we decided
to op/acc and lean into the approach of allowing subcalls to trigger
`ExecutingMessage` events.

This new interface allows another contract to be the entrypoint,
the idea is that the user sends the `Identifier` and the serialized
log (message) to whatever contract that they want and then pass it to
`CrossL2Inbox.validateMessage` which then emits the event that consensus
validates. This allows the calling smart contract to be aware of the
schema for the log and deserialize it however they see fit. Since the
serialized logs are done with the following algorithm:

```go
msg := make([]byte, 0)
for _, topic := range log.Topics {
    msg = append(msg, topic.Bytes()...)
}
msg = append(msg, log.Data...)
```

It is very easy to use `abi.decode` to decode a log, given that solidity
was used to `emit` it. The topics are `bytes32` and then the data is
abi encoded given the schema of the event itself. Unused parts like
`topic[0]` (hash of the event name) can be dropped when decoding if
they are not required.

* ctb: fix typo

* remove nonReentrant and add tests for validateMessage, rename ENTERED_SLOT preimage

* add natspec for _checkIdentifier and update that of validateMessage

* update version and semver-lock file

* check all topics in crossl2inbox test, run pnpm snapshots

* tests: fix

---------

Co-authored-by: Michael Amadi <[email protected]>

* Revert "Fix devnet-up when op-program/bin is missing prestate-proof.json (#11383)" (#11393)

This reverts commit 2491a3732fe97c9eec9baf615a010e8f7a42f738.

make cannon-prestate doesn't declare all transitive dependencies properly so can fail to build when there are changes.

* devnet/e2e: run L1 Deneb and L2 Fjord by default (#11359)

* devnet/e2e: run L1 Deneb and L2 Fjord by default

* op-e2e: fix TestPostUnsafePayload

* op-e2e: Fix TestGasPriceOracleFeeUpdates

* op-e2e/actions: fix some tests

The L2EngineAPI test needs more fixing

* tests: fixes to support Ecotone/Fjord in more tests

* op-e2e: one more fix

---------

Co-authored-by: Sebastian Stammler <[email protected]>

* feat(predeploys): add L2toL2CDM to predeploy addresses.go (#11403)

* contracts-bedrock: debug tests (#11397)

* contracts-bedrock: debug tests

See why the tests are flaking and cannot be reproduced locally.
Also modularize/cleanup CI along the way

* typo: fix

* debug: remove

* just: update name

* ci: better error help

* ci: fix typo

* contracts-bedrock: abstract

* ci: run with foundry profile ci

* ci: better solc warnings check (#11231)

* ci: better solc warnings check

Use `forge build --force` to force a build so that the warning check can
be observed. CI should fail on this commit

* contracts-bedrock: fix warnings

Fix the failed solc build

See the failed workflow here:
https://app.circleci.com/pipelines/github/ethereum-optimism/optimism/59631/workflows/b93bc600-e772-4ba9-98ed-a0b6f48683c7/jobs/2512271

* foundry: add ignored error code

* repo: migrate away from pnpm (#11395)

Migrate to just from pnpm. This is continued tech debt
cleanup away from `pnpm` and typescript that is no longer
used.

* Run cannon-prestate if devnet cannon prestate files are missing (#11399)

* Fix devnet-up when op-program/bin is missing prestate-proof.json

* Fix cannon-prestate to always run

* Add prestate.json

* ci: update geth tool to v1.14.7 (#11410)

* ci: update geth tool to v1.14.7

* ci: temporarily disable L1 geth version check, so L1 geth can be updated

* ops-bedrock: explicit hash state.scheme on geth

* Add RV reviews (#11422)

* Add RV reviews

* Fix naming of trust audit to match convention

* Update to Geth 1.14.7 (#11382)

* chore: update to support geth v1.14.7

* Update geth

* Fix "private key curve is not secp256k1" error

* Temporarily quiet noisy logs

* signature test

* Add comments about S256 curve override fix

* Update geth

* go.mod: update to op-geth v1.101407.0-rc.1

* op-e2e: fix L1/L2 miner settings

* Also update devnet L1 base image

* ci: bump ci-builder in circleci

---------

Co-authored-by: Danyal Prout <[email protected]>
Co-authored-by: protolambda <[email protected]>
Co-authored-by: Sebastian Stammler <[email protected]>

* cannon: Undo changes to memprofile patching (#11420)

* fix: update contracts README diagram (#11406)

* fix(ctb): remove linked libraries from scripts and tests (#11426)

* add additional address to exclude

* chore: make public library methods internal

* remove another public lib method

* remove additional public lib methods

* remove hardcoded assumption now that we know it's lib linking

* style: forge fmt

* add rationale to comment (#11429)

* ci: manage versions in versions.json (#11415)

* ci: manage versions in versions.json

and optimize archive downloads to directly extract

* ci: also pin just version

* cannon: Add support for --type mt to enable multithreaded cannon (#11411)

* cannon: Add support for --type mt to enable multithreaded cannon

* cannon: Rename vm type to cannon-mt

* dependabot(gomod): bump golang.org/x/crypto from 0.25.0 to 0.26.0 (#11373)

* dependabot(gomod): bump golang.org/x/crypto from 0.25.0 to 0.26.0

Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.25.0 to 0.26.0.
- [Commits](https://github.com/golang/crypto/compare/v0.25.0...v0.26.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* deps: update

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mark Tyneway <[email protected]>

* op-supervisor: Include executing message info when storing logs. (#11369)

* Rebase: op-supervisor: Include executing message info when storing logs.

Takes from aj/parse-exec-msg and makes the following updates:
- uses upstream ABI definitions for identifier hash
- removes the core recording functionality for the moment
- fixes up inconsistent typing and merge conflicts due to rearranged packages

* Incorporate new ABI format

* remove trailing newline in contract

---------

Co-authored-by: Adrian Sutton <[email protected]>

* fix: minor error in contracts readme (#11432)

* Don't recheck terminal type for color (#11412)

Not necessary as it's checked further up the call tree. Without this --log.color doesn't work when intended.

* maint: further clean up contract scripts organization (#11434)

Scripts within contracts-bedrock are all over the place. Relatively
minor PR that moves things around into a cleaner folder structure.
Scripts themselves are unchanged.

* op-e2e: Test Granite EVM rules in op-program (#11391)

* op-geth: update to support new precompile-overrides function (#11443)

* op-geth: update to support new precompile-overrides function

* op-program: ensure no accidental precompile overrides

* go.mod: update op-geth for new precompile override functionality

* op-challenger: Do not resolve games in selective mode (#11430)

* dependabot(gomod): bump github.com/urfave/cli/v2 from 2.27.3 to 2.27.4 (#11450)

Bumps [github.com/urfave/cli/v2](https://github.com/urfave/cli) from 2.27.3 to 2.27.4.
- [Release notes](https://github.com/urfave/cli/releases)
- [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/urfave/cli/compare/v2.27.3...v2.27.4)

---
updated-dependencies:
- dependency-name: github.com/urfave/cli/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* dependabot(docker): bump ethereum/client-go in /ops-bedrock (#11448)

Bumps ethereum/client-go from v1.14.7 to v1.14.8.

---
updated-dependencies:
- dependency-name: ethereum/client-go
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: introduce OptimismSuperchainERC20 (#11256)

* feat: introduce OptimismSuperchainERC20

* fix: contract fixes

* feat: add snapshots and semver

* test: add supports interface tests

* test: add invariant test

* feat: add parameters to the RelayERC20 event

* fix: typo

* fix: from param description

* fix: event signature and interface pragma

* feat: add initializer

* feat: use unstructured storage and OZ v5

* feat: update superchain erc20 interfaces

* fix: adapt storage to ERC7201

* test: add initializable OZ v5 test

* fix: invariant docs

* fix: ERC165 implementation

* test: improve superc20 invariant (#11)

* fix: gas snapshot

---------

Co-authored-by: 0xng <[email protected]>
Co-authored-by: Disco <[email protected]>

* op-node: Fix p2p data races (#11353)

* Fix data races around p2p records

Fixes https://github.com/ethereum-optimism/optimism/issues/11328

* Remove some constructor boilerplate

* Add data race fixes for op-node/p2p tests

* Include book locking for record deletion

* Add missing read locks

* Move locks into wrappers

* Remove ping service trace parameter from public API

* I came in search of data races and I found refactors

* op-challenger: Fix run-trace disputed block selection (#11437)

* op-challenger: Fix run-trace disputed block selection

Previously it assumed the safe head at SafeL1 was before the safe head at HeadL1 in the sync status, but that is not guaranteed. As a result it could select an L2 block to check that was unsafe at the specified L1 head.

* op-challenger: Update vm-runner to handle the case where op-node hasn't processed all finalized L1 blocks yet

* contracts-bedrock: migrate interop portal to fp (#11051)

* contracts-bedrock: migrate interop portal to fp

Utilize fault proofs in the interop portal. This is
useful for removing the `L2OutputOracle` from the codebase.
We will need to deploy the interop devnet using the permissioned
dispute game after this change, so we want to ensure that the
deploy script can set that up easily.

* ctb: migrate interop to fp portal

* snapshots: regenerate

* lint: fix

* contracts-bedrock: always enable fault proofs with interop

* interop: support fault proofs

* deploy script: only deploy correct contracts

* contracts-bedrock: cleanup deploy

* contracts-bedrock: fix deploy

The deploy script is very coupled to unit tests

* portal2: reduce codesize

* lint: fix

* snapshots: update

* snapshots: update

* semver-lock: regenerate

* deploy script: update

* tests: update excludes

* summary: update

* op-wheel: harden against missing safe/finalized heads (#11460)

* op-bedrock: Add detail to the documentation to clarify any confusion. (#11457)

* Add detail to the documentation to clarify any confusion.

* fix format

* op-chain-ops: artifacts FS, improve artifacts metadata (#11445)

* op-chain-ops: artifacts FS, improve artifacts metadata

* ci: include artifacts as Go e2e test pre-requisite

* op-chain-ops: move full artifacts test, update testdata

* ci: fix artifacts workspace copy

* op-node: remove MaxSequencerDrift hardcode (#11459)

* go: update superchain import

* op-node: read MaxSequencerDrift from superchain configs

* go: update superchain import to point to main commit

* op-chain-ops/script: turn any Go struct/interface into a precompile with ABI encoding/decoding (#11444)

* op-chain-ops/script: turn any Go struct/interface into a precompile with ABI encoding/decoding

* op-chain-ops: add more comments about precompile auto ABI code

* op-service: capture inherited log attributes (#11470)

* op-service: capture inherited log attributes

* op-service/testlog: reverse Attrs traversal order

* devnet: enable span batches and use blobs for non-plasma (#11477)

* op-node,op-batcher: implement span channel out block count limit (#11416)

* op-node: implement span channel out block count limit

* op-batcher: add max-blocks-per-span-batch flag

* op-e2e: test MaxBlocksPerSpanBatch in system test

* op-e2e: use span batches in 4844 test

* address Axel's review

* Update README.md (#11474)

Corrected a typo in the sentence: "`op-geth` embeds upstream geth’s version inside its own version..."

* feat: update Sepolia Drippie config to latest (#10810)

* fix: makefile build command (#11466)

Build command inside of the root-level makefile was calling
build-ts which no longer exists. Adds a new command to build
contracts-bedrock and replaces that inside of the root build
command.

* op-node: attempt recovery from odd forkchoice states (#11462)

* op-node: attempt recovery from odd forkchoice states

* op-node: adjust recovery heuristic to express distance in number of sequence windows

* op-e2e: Disable proposer in dispute game tests (#11431)

The games being tested are created manually and the automated proposals at best waste time and can interfere with tsts like TestHighestActedL1BlockMetric which expects the challenger to acton all games.

* deploy-config: Update OP Sepolia absolute prestate (#11394)

* txmgr: add rpc api getters/setters (#10897)

* Add txmgr rpc api

* Update mock TxManager

* Use parameterized tests to remove redundant code

* Add txmgr.cfgLock to protect values configurable at runtime

* txmgr: use generic API() method on interface to allow custom rpc apis

* txmgr: re-generate mocks

* txmgr: use atomics for Config vals that can be modified via rpc

* txmgr: use pointer for SimpleTxManager.cfg

* txmgr: remove extraneous code

* txmgr: cleanup ctx input arg in rpc methods

* Feature/rv compute (#11015)

* Add dummy tests for passing and failing

* Updating passing along return errors and a duplicate call to clean_docker

* Fixing logging

* Update to latest kontrol version supporting error codes

* Remove trap for testing

* Add install-kontrol and run local with enforced version requiresments

* Drop on failure trap and test

* The cleanup steps may be altering the return results. We're not running docker, not needed here

* Test with traps re-added after finding issue was with using find

* Formatting, now test with passing test

* Update run-kontrol.sh

Revert debug set to original header

* Increase CPU workers to 16 for kaas runners

* Update config.yml

* Remove dummy proofs

* run-kontrol.sh: set `max_workers` to 16

* run-kontrol.sh: execute all tests with `script` option

* run-kontrol.sh: match tests more precisely

* run-kontrol.sh: add back `break_every_step` variable

* versions.json: bump Kontrol from 0.1.247 to 0.1.258

* IGnore vscode configuration files

* Move on regardless of docker removal, container is started with automatic removal on stop, we just want to make sure it happens for redundancy

* Extract content of Results to upload to kaas

* Call into RV Workflow to run symbolic tests

* Updating circleCI to latest credentials setup/secret references. Set context to proper env. Remove unused inputs

* Reverting unecessary change

* Add RV context

* Removing comma from end of json block

* Set the specific branch name to run on, do not assume develop.

* Temporary when conditional to always run

* Revert test when conditional

* Supress extraction of outputs

* Accept Suggestion for comment line in packages/contracts-bedrock/test/kontrol/scripts/run-kontrol.sh

Co-authored-by: Matt Solomon <[email protected]>

* Supress tar file creation output

* Dropping -verbose in tar command. Reduce output on exeutions

* run-kontrol.sh: Update Temporarily unexecuted tests list

* run-kontrol.sh: Update Temporarily unexecuted tests list v2

* Update documentation noting changes / usage / flow / secrets for utilizing kaas

* run-kontrol.sh: Fetch the xml file if it exists from the build env and make available for posting to summary

* Update packages/contracts-bedrock/test/kontrol/README.md

Co-authored-by: Matt Solomon <[email protected]>

* Update packages/contracts-bedrock/test/kontrol/README.md

Co-authored-by: Matt Solomon <[email protected]>

* Update packages/contracts-bedrock/test/kontrol/README.md

Co-authored-by: Matt Solomon <[email protected]>

* Update packages/contracts-bedrock/test/kontrol/README.md

Co-authored-by: Matt Solomon <[email protected]>

* Update packages/contracts-bedrock/test/kontrol/README.md

Co-authored-by: Matt Solomon <[email protected]>

* kontrol/README.md: Update instructions for clarity and usage

* .github/workflows: Adding a new workflow to trigger on updates to depoloyment_status from third party

* Force push to test

* Remove if check for environment.

* status-test: This looks like the wrong trigger

* Update slack notification workflow with template

* proof-runner-notification.yml: Slack notifications on failure, and webhook URL

* Replace Link with provided target_url from commit status

* Update payload variables per slack workflow variable requirements.

---------

Co-authored-by: Juan C <[email protected]>
Co-authored-by: Matt Solomon <[email protected]>

* repo: rename plasma --> altDA (#11370)

* update superchain-registry import

* replace all plasma with altda

* replace plasma with altda in filenames

* contracts: update snapshots

* go: update superchain import

* go: update superchain import after rebase

* go: run mod tidy

* op-batcher: fix altda env vars passed in devnet docker-compose

* go: update superchain import

* go: use main commit for superchain import

* ci: remove proof runner workflow (#11486)

The 'on: status' trigger is too broad and causes this job to trigger
for all commits. Instead KaaS (Kontrol as a Service) will post the
resulting status to slack directly, instead of through github

* Added Stop API in the conductor (#11463)

* add stop api in the conductor

* add tests

* fix test cases

* fix conductor stop api test

* re-trigger ci tests

* op-chain-ops/script: ConsolePrecompile with console2 ABI (#11446)

v2

* op-challenger: Extract RegistrationTask to dedeuplicate registration code between different game types. (#11413)

* feat: add cgo_test tags to fuzz tests (#11489)

* getting-started: modernize (#11436)

Make the getting started script modern by adding recent hardfork config
and also make the script runnable from any directory.

* op-e2e: Add forge clean to README.md troubleshooting section (#11471)

* op-e2e: Add forge clean to README.md troubleshooting section

* Update op-e2e/README.md

Co-authored-by: Matt Solomon <[email protected]>

---------

Co-authored-by: Matt Solomon <[email protected]>

* fix run-kontrol.sh path (#11495)

* Prevent reiniting preimage uploads. (#190)

* fix: require minimum split depth of 2

FDGs with a split depth below 2 can trigger bugs in clock
extension. Since we don't expect to have a split depth anywhere
near 0 or 1 this is a low impact bug and doesn't have an impact
on production but should be prevented anyway.

* fix: correct check for max game depth

Modifies the FDG constructor to correctly check that the
splitDepth +1 is gte the max game depth. Means that the splitDepth
is now limited to be 1 smaller than it was before. Fine in prod
but avoids a bug in the trace ancestor lookup logic.

* fix: have MIPS revert on add/sub overflow/underflow (#230)

Updates MIPSInstructions so that it correctly reverts on calls to
add, addi, and sub that overflow/underflow. Additionally includes
tests that demonstrates that the unchecked versions of the same
opcodes allow for overflow/underflow.

* fix: correct implementation of srav (#245)

Existing implementation of SRAV had a bug where it would perform a
shift with all bytes of the rs register when the spec says it
should only be using the lower 5 bits of the register. Updates the
implementation to reflect this, updates the existing test to use
the same test vector as provided in the open mips tests, and adds
fuzz tests that shows srav works as expected with rs values that
have more than the lower 5 bits set.

* fix: have DelayedWETH use call instead of transfer (#228)

Updates DelayedWETH to use call instead of transfer because
transfer only sends along 2300 gas which will cause the transfer
to fail if the owner contract uses lots of gas in the fallback
function. Adds tests that demonstrate that the function now works
appropriately under any reasonable amount of gas usage. In theory
this means the recovery function can be reentered but this isn't
an issue because the function is authenticated and is recovering
all of the ETH in the contract anyway.

* fix: make state.exited be zero or one (#246)

Modifies the MIPS contracts to enforce that state.exited is either
exactly zero or one and cannot have any other value.

* fix: have mips step check register offset instead of overwrite (#238)

Existing step logic wrote the register offset into memory but the
compiler should already be doing this when the struct is defined.
Instead of writing directly into memory, this change verifies that
the memory at that location has the expected value which will
catch any cases where the compiler's memory allocation mechanism
changes in the future.

* Add gas input to precompile pre-images (#186) (#252)

* contracts: Add gas input to precompile pre-images (#186)

Also update the cannon evm tests to use the new precompile preimage scheme.

---------

Co-authored-by: Adrian Sutton <[email protected]>

* op-challenger: Support uploading data in new format. (#188)

* op-program: Add required gas to precompile oracle key (#176)

* op-challenger: Support multiple versions of the preimage oracle contract

---------

Co-authored-by: Adrian Sutton <[email protected]>

---------

Co-authored-by: inphi <[email protected]>

---------

Co-authored-by: Adrian Sutton <[email protected]>

* fix: correctly verify mips instruction encoding (#237)

A lot of instructions in the MIPS spec require that certain fields
be set to zero. Most of the time this isn't actually a problem but
this can cause side-effects in a few cases. A buggy compiler could
create an issue if it ever spit out non-compliant instructions.
This PR implements those zero value enforcement checks for all
instructions that we implement.

* fix: localdata size check (#271)

* Prevent reiniting preimage uploads. (#190)

* fix(ctb): PreimageOracle `loadLocalData` length check

* fixes

* fix: bump preimage oracle semver

* chore: snapshots

* fix: gas snapshot

* revert: gas snapshot changes

---------

Co-authored-by: Adrian Sutton <[email protected]>
Co-authored-by: clabby <[email protected]>

* fix(ctb): Perform correct clock validation in FDG constructor (#231)

* Prevent reiniting preimage uploads. (#190)

* fix(ctb): Perform correct clock validation in FDG constructor

Fixes the clock extension / max clock duration check in the
`FaultDisputeGame` constructor to account for the worst-case clock
extension.

* fix: add semver-lock

* fix: add kontrol

* gas snapshot

* fix: gas snapshot and semver-lock

---------

Co-authored-by: Adrian Sutton <[email protected]>
Co-authored-by: refcell <[email protected]>

* fix: no squeezing unfinalized proposals (#257)

* fix: no squeezing unfinalized proposals

Updates the PreimageOracle to correctly revert if a proposal has
not actually been finalized. This fixes a bug because the timestamp
is not set until after a proposal is finalized but all other
conditions in the squeeze function are met even before addLeaves
is called with the finalize boolean set.

* fix: ci checks

* fix: semver lock

---------

Co-authored-by: refcell <[email protected]>

* fix: Choose min block in FDG local inputs

* fix: correct clock extension for step (#258)

When the FDG is about to execute a step, we must add an additional
clock extension equal to the PreimageOracle challenge period. This
gives the PreimageOracle time to elapse.

* op-e2e: Fix preimage upload to use new ABI. (#274)

* fix(ci): `fp-staging` ci fix (#278)

* Revert "fix: have MIPS revert on add/sub overflow/underflow (#230)" (#279)

This reverts commit 864e59a821e87f9dd00ae97f85add93fa3857597.

* Revert "fix: correctly verify mips instruction encoding (#237)" (#281)

This reverts commit 59e02fb3ece7fc249223054944a0b1ff437aa64f.

* cannon: Limit mmap allocations (#285)

* cannon: Basic memory protections

Add memory protections against high memory allocations to the VM.
This prevents large allocations from causing the `heap` to overflow and
wrap into low memory, which could overwrite code and cause arbitrary code execution.

---------

Co-authored-by: inphi <[email protected]>

* Add e2e test for starting trace extension one block too late (#268)

* feat: create deploy script for fp updates (#292)

Creates a deploy script to deploy the implementations for the
FaultDisputeGame and PermissionedDisputeGame contracts being
updated as part of Granite. Based on the original FPACOPS script
with modifications to remove actions that are not necessary for
an upgrade.

* fix(ctb): Set Anchor State (#280)

Allow the `DeputyGuardian` to set the Anchor State for brick prevention.

---------

Co-authored-by: clabby <[email protected]>
Co-authored-by: refcell <[email protected]>

* feat: contract versions for fp fixes (#295)

* fix: use existing ASR for FPACOPS2 (#297)

FPACOPS2 deployed a new AnchorStateRegistry proxy when the actual
script needed to just deploy a new implementation.

* op-chain-ops: Go forge scripts runner (#11447)

* op-chain-ops: Go forge scripts runner

* fix lint

* op-chain-ops: encapsulate forge script tests in testdata

* op-proposer: ensure uniform proposal interval across restarts (#11417)

* op-proposer: ensure uniform proposal interval across restarts

closes https://github.com/ethereum-optimism/optimism/issues/11193

* move DGF query logic into FetchDGFOutput

* merge loopL2OO and loopDGF

* tweak comments

* Apply suggestions from code review

Co-authored-by: Sebastian Stammler <[email protected]>

* return err instead of defaulting to sending a proposak

flatten out control flow, remove shouldPropose var

* defer l.Log.Info("loop returning")

* improve error handling and logging

* fix logging syntax error

* make DGFContract interface

harmonize how network contexts are constructed

* modify test for new DGF behavior

* fix bugs in test code

* remove OutputRetryInterval flag

* handle gameCount = 0

* finish removing OutputRetryInterval

* driver waits one proposal interval for the first ever proposal

* do not create mock unecessarily

* do not create mockL2OOContract unecessarily

* wrap and return errors instead of logging and returning

* op-proposer: Switch to modern binding style for dispute game factory (#11472)

---------

Co-authored-by: Sebastian Stammler <[email protected]>
Co-authored-by: Adrian Sutton <[email protected]>

* Add Base cantina/spearbit audits

* Update op-geth dependency to 1.14.8 base (#11494)

* Update op-geth dependency to 1.14.8 base

* go.mod: update op-geth to v1.101408.0-rc.1

---------

Co-authored-by: protolambda <[email protected]>

* op-chain-ops: automatic ABI bindings from Go struct (#11497)

* op-node: cleanup driver, closer to removing stepping (#11464)

* op-node: cleanup driver, closer to removing stepping

* op-node: add comment about event Drain error

* op-node: fix lint

* op-node: handle drain errors

* fix: wrong MaxSequencerDrift comment (#11505)

* feat: ensure proper closing of gzip and file writers/readers to prevent resource leaks (#11475)

* add gzipCloser struct

* add Close method

* fix OpenDecompressed func

* fix CompressByFileType func

* knit

* Apply suggestions from code review

close both even if one fails

Co-authored-by: Adrian Sutton <[email protected]>

* fix WriteCloser Close method

* fix name for more general

* fix writercloser name for more geneeral

* add construction function for WrappedCloser

* using construction func

* seperate wrapped closer struct to wrapped_closer.go

---------

Co-authored-by: Adrian Sutton <[email protected]>

* add regression test (#11519)

* refactor: using slices.Contains (#11521)

* Change to `latest` in getting started config (#11524)

* feat: add fork activation based on env variables - getting started script update (#11500)

* feat: add configurable fork times for each update

* remove granite for now

* add granite if env var is defined

* add granite if env var is defined

* fix if else

* fix if else

* add debug step

* fix l2name

* remove debug step

* dependabot(gomod): bump github.com/prometheus/client_golang (#11483)

Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.19.1 to 1.20.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.19.1...v1.20.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Interop: Add new role for dependency set management (#11407)

* add role based auth for dependency related setters with tests

* support systemConfig initialize, rename foundation multisig to dependency manager

* use dependency manager role only, update SystemConfigInterop and Specs tests

* rebase to current develop head, run pre-pr script

* use constant hash with comments over computing at compile time, update semver-lock

* use dependencyManager() fn internally, import directly not indirectly in SystemConfigInterop

* op-chain-ops: forge script cheatcodes (#11465)

* op-chain-ops: forge script cheatcodes, work in progress

incl prank cheatcodes
incl env var handling
incl serialize utils
incl some json/toml utils
incl go.mod: tidy

* op-chain-ops: fix state dumping

* op-chain-ops: remove debug print line

* txmgr: rename Get|SetPriorityFee to Get|SetMinPriorityFee (#11526)

* txmgr: add tx-type metric (#11523)

* ctb: `rc` version FP contracts (#11525)

* ctb: `rc` version FP contracts

* bump deputy guardian module

* Add missing GOMODCACHE caching when building op-stack-go services (#11512)

* chore: clarify contracts release process (#11529)

* chore: clarify contracts release process

* Update packages/contracts-bedrock/VERSIONING.md

Co-authored-by: Inphi <[email protected]>

---------

Co-authored-by: Inphi <[email protected]>

* Add optimistic Granite mainnet activation (#11531)

* use copy of config.L1Deployments (#11532)

* fix: slice init len (#11520)

* Upgrade bbolt via raft (#11507)

* deploy-config: Update mainnet prestate for granite HF (#11533)

* Add Interop Start timestamp to CrossL2Inbox (#11398)

* add interop start timestamp to CrossL2Inbox with tests

* change to function, add assertions, update tests

* correct the preimage of interop start storage slot

* rename custome error

* require id timestamp must be > interopStartTime not >=, update tests to use realistic interopStartTime (non-zero)

* bump CrossL2Inbox semver, run just semver-lock & just snapshots

* add natspec for setInteropStart

* update semver lock

* dependabot(gomod): bump github.com/prometheus/client_golang (#11540)

Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.20.0 to 1.20.1.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/v1.20.1/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.20.0...v1.20.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* OPSM: Deploy Superchain, alternate approach (#11480)

* feat: initial DeloySuperchain script

* chore: scaffold file-based interfaces

* test: additional assertions

* chore: appease semgrep

* scaffold alternate approach

* incorporate feedback

* refactor based on feedback

* fix tests

* test: more robust testing

* refactor: dedupe etching of IO contracts and add getter method

* refactor: using maps.Copy (#11544)

* ctb(proofs): switch to running OptimismPortal2 proofs, since that portal is used in production (#11545)

* cannon: Run common evm tests across all implementations (#11333)

* cannon: Prep test utils to handle Mips2.sol

* cannon: Add metadata struct to hold all contract-related metadata

* cannon: Add forge debug test for mips2

* cannon: Fix path to mips2 artifacts in testutil

* cannon: Rework evm tests to run across both cannon impls

* cannon: Skip failing test for now, add todo

* cannon: Rename FPVMState.GetRegisters to GetRegistersMutable

* cannon: Run linter

* cannon: Fix skipped claim test

* cannon: Rename FPVMState registers getter to follow convention

* cannon: Rename cpu getter to match naming convention

* cannon: Fix bad merge - elf paths, versioned references

* refactor: using maps.Keys (#11547)

* fix: `getting-started` deploy config (#11557)

* fix: fix slice init length (#11542)

Signed-off-by: shandongzhejiang <[email protected]>

* feat: liquidity migration (#11479)

* feat: add L2 standrad bridge interop contract

* test: add L2 standard bridge interop unit tests (#13)

* test: add L2 standard bridge interop unit tests

* fix: add tests natspec

* fix: unit tests fixes

* fix: super to legacy tests failing

* fix: mock and expect mint and burn

* fix: add generic factory interface (#14)

* test: add L2 standard bridge interop unit tests

* fix: add tests natspec

* fix: add generic factory inter…
claymega pushed a commit to megaeth-labs/optimism that referenced this pull request Nov 1, 2024
…mission (#1)

* make an rpc server an into a cliapp service (#11197)

* Add buffered caching of L1 block refs to the confDepth-aware fetcher (#11142)

* Add buffered caching of L1 block refs to the confDepth-aware fetcher

* Refactor l1 head buffer into helper structs

* Fix linting errors

* Move L1 block caching from confDepth into an event-driven L1Tracker

* Fix l1HeadBuffer locking

* Better handle non-shallow reorgs

* Improve test naming

* Explicitly rewind cache when old head received

* op-conductor: Adds connection test to conductor addServer* apis (#11210)

* op-e2e: use util for RPC dial, and ensure op-node is on localhost RPC (#11209)

* dependabot(npm): bump typedoc from 0.25.7 to 0.26.5 (#11216)

Bumps [typedoc](https://github.com/TypeStrong/TypeDoc) from 0.25.7 to 0.26.5.
- [Release notes](https://github.com/TypeStrong/TypeDoc/releases)
- [Changelog](https://github.com/TypeStrong/typedoc/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/TypeDoc/compare/v0.25.7...v0.26.5)

---
updated-dependencies:
- dependency-name: typedoc
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* dependabot(npm): bump eslint-plugin-jsdoc from 48.7.0 to 48.8.3 (#11213)

Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 48.7.0 to 48.8.3.
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Changelog](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/.releaserc)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v48.7.0...v48.8.3)

---
updated-dependencies:
- dependency-name: eslint-plugin-jsdoc
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* dependabot(npm): bump mocha from 10.6.0 to 10.7.0 (#11214)

Bumps [mocha](https://github.com/mochajs/mocha) from 10.6.0 to 10.7.0.
- [Release notes](https://github.com/mochajs/mocha/releases)
- [Changelog](https://github.com/mochajs/mocha/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mochajs/mocha/compare/v10.6.0...v10.7.0)

---
updated-dependencies:
- dependency-name: mocha
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* dependabot(npm): bump typescript from 5.5.3 to 5.5.4 (#11215)

Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.5.3 to 5.5.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v5.5.3...v5.5.4)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* dependabot(npm): bump @types/node from 20.11.17 to 20.14.12 (#11220)

Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.11.17 to 20.14.12.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* contracts-bedrock: speed up ci (#11203)

Tests for `contracts-bedrock` should no longer depend
on the JS monorepo. This should speed up the tests
by removing a step that blocks it from running.

* Update README.md (#11222)

Update README

* deps: remove ts-mocha (#11202)

`ts-mocha` appears to be unused so this commit removes it

* deps: remove wait-on (#11201)

The `wait-on` dep is not used anywhere in the monorepo,
so this commit removes it.

The following command only shows the `package.json` and
lockfile:

```bash
git grep -rin wait-on
```

We should remove all unused deps

* op-node: set genesis l1 start block to value from SystemConfig contract (#11181)

* set genesis l1 start block to value from SystemConfig

* always retrieve genesis l1StartBlock from SystemConfig.startBlock()

* use contract-bedrock abi instead of large bindings file

* fix startBlock contract call

* use single func call instead of importing full SystemConfig abi

* use vars instead of hardcoded flag strings

* Fix CONTRIBUTING.md (#11224)

* cannon: fix fuzz test script (#11226)

* op-node: Extract contract binding for SystemConfig (#11227)

* deps: remove depcheck (#11230)

Remove another unused dependency. `depcheck` was previously
used when the monorepo had active typescript development in it.
Right now it has not typescript development in it and is no longer
used as part of CI. We should remove every dependency that is not
used.

* op-dispute-mon: fix the path and add example (#11233)

* fix the path and add example

* Update README.md

* Update README.md

* avoid passing factory address (#11236)

* op-service: use binary search instead of walkback for checkRecentTxs (#11232)

* use binary search instead of walkback for checkRecentTxs

* account for multiple txs from same sender in same block

* use recursion if reorg detected

* limit condition to return false

* Delete chain-mon in favor of monitorism (#11239)

* Delete chain-mon

* Delete chain-mon from other places.

---------

Co-authored-by: Kevin Kz <[email protected]>

* dependabot(gomod): bump github.com/onsi/gomega from 1.31.1 to 1.34.0 (#11242)

Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.31.1 to 1.34.0.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/gomega/compare/v1.31.1...v1.34.0)

---
updated-dependencies:
- dependency-name: github.com/onsi/gomega
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* dependabot(gomod): bump github.com/urfave/cli/v2 from 2.27.1 to 2.27.3 (#11243)

Bumps [github.com/urfave/cli/v2](https://github.com/urfave/cli) from 2.27.1 to 2.27.3.
- [Release notes](https://github.com/urfave/cli/releases)
- [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/urfave/cli/compare/v2.27.1...v2.27.3)

---
updated-dependencies:
- dependency-name: github.com/urfave/cli/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* docs(typo): README.md, pausability-lemmas.md (#11241)

* chore: add `help` target to Makefile to display the usage of all targets (#11221)

Co-authored-by: Mark Tyneway <[email protected]>

* op-node: genesis generation (#11249)

Better logging in the genesis generation when creating L2 genesis.
Using the `startBlock()` method depends on the L1 contracts being
initialized.

* [op-dispute-mon] Track the latest proposed L2 block number from games w/ a valid root claim (#11238)

We'd like to know the latest valid block number associated with a valid dispute game.
This would be the equivalent of getting the latest block number from `L2OutputOracle` in pre-FDG.
We could look into the `AnchorStateRegistry`, but this does not give us quick enough feedback
to know if we are keeping up with "proposing" correct root hashes for the most recent L2 blocks,
as dispute games resolves approximately 3.5 days (assuming happy path).

There can be many dispute games at any given time, and they may be valid or invalid.
This metric captures only valid block numbers from dispute games that we "agree" with.

* deps: remove more deps (#11250)

Removes more dead deps from the monorepo that are no longer used.
Every dep is a liability. We should only have deps that we actively use.
Soon we will be able to remove all JS from the monorepo, removing all of
these deps.

* deps: remove more js deps (#11254)

This commit removes more js deps. We are very close to removing all js
from the monorepo. We should only have deps in our codebase that we
actively use. Otherwise its a security liability.

* Update Kontrol Proofs (`0.1.247` to `0.1.316`) (#10953)

* Remove `Kontrol-Deploy.json`

* Remove `DeploymentSummaryFaultProofs` contracts

* Revert "Remove `DeploymentSummaryFaultProofs` contracts"

This reverts commit 192ac49acc76f98476caef40fa7af6bfb527282d.

* pausability-lemmas.md: update `copy-memory-to-memory` rule

* KontrolDeployment: add full deployment logic

* DeploymentSummary: sync with full deployment logic

* DeploymentSummaryFaultProofs: sync with full deployment logic

* Bump Kontrol from `0.1.247` to `0.1.313`

* run-kontrol.sh: update `kontrol prove` options

* make-sumary-deployment.sh: remove logic manipulating `Deploy.s.sol`

* Track `snapshots/state-diff/Kontrol-31337.json`

* `kontrol/README.md`: update

* OptimismPortalKontrol: remove `encodeWithSelector` from `expectRevert`

* run-kontrol.sh: set booster max recursion limit to `100`

* Kontrol-31337.json: update with non-fault-proofs deployment

* package.json: change order of evaluation for `snapshots` job

Both `pnpm kontrol-summary-fp` and `pnpm kontrol-summary` save the state updates
to `snapshots/state-diff/Kontrol-31337.json`. In order to correctly test the
non-fault-proof deployment setting `pnpm kontrol-summary` has to be run last.

* Bump Kontrol from `0.1.313` to `0.1.316`

* Update `DeploymentSummaryFaultProofs`

* ops-bedrock: Beacon-chain devnet with Dencun + Ecotone upgrade (#9117)

* ops-bedrock: beacon-chain devnet with fork to L1 Dencun and L2 Ecotone

ops-bedrock: clean up file names, drop unused stateviz

ops-bedrock: dockerfile for lighthouse from source

ops-bedrock: devnet validator keystores

ops-bedrock: dev chain config

generate genesis.ssz, work in progress devnet setup

lighthouse CLI tweaks

ops-bedrock: more CLI tweaks

devnet: fix validator keys loading

ops-bedrock: cleanup L1 geth setup and jwt-secret usage

ops-bedrock: fix L1 engine API endpoint

op-chain-ops: insert dev L1 contracts

devnet fixes

more fixes

schedule L2 Delta and Ecotone forks

op-chain-ops: fix lint

ops-bedrock: docker-compose config comments about special options

ops-bedrock: adjust beacon node log level

Co-authored-by: Sebastian Stammler <[email protected]>

* devnet: Add eth2-testnet-genesis installation step

* op-e2e: fix pre-Ecotone tests

* ops-bedrock: Fix entrypoint scripts

* op-e2e: Fix TestPreEcotone

* op-e2e: Fix hardfork validation tests

* op-e2e: Enable L1 Cancun at genesis for Ecotone system configs

* ci: use eth2-testnet-genesis tag v0.10.0

* op-e2e: use <fork>SystemConfig instead of manipulating fields

* op-e2e/actions: process beacon block root for Cancun L1s

* op-e2e/actions: fix TestBlockTimeBatchType

* op-e2e: add beacon endpoint to L1 setup

* op-e2e/actions: fix more tests...

* op-e2e/actions: fix manual setting of delta offset

* op-e2e/actions: set blob source in plasma tests

* devnet: sleep at start of tests

* ops-bedrock: remove fetch-all-sidecars for l1 lh from docker-compose

* op-e2e: fix Makefile go test flags

* op-chain-ops: Add 4788 deployer address to L1 genesis creation

* op-e2e: remove outdated TODO code

* ci: read eth2-testnet-genesis version from json

* fix l1 genesis & cci config

* rename beacon-data/deposit_contract_block.txt

* cci: dump l1-bn and l1-vs logs

* few improvements

* Move to op-e2e devnet withdrawals test

* set l1 block time to 6s in devnet template

* fix game resolve helper, to handle resolve race condition

* lower da windows

* devnet: bump plasma windows to 16

* fix: adjust plasma test params for smaller challenge window sizes

* bump lighthouse, remove src Dockerfile

* revert devnet python script commenting out

the test isn't run from this script any more anyways
that was just temporary while debugging

* remove deprecated options

ligthouse deprecated http-allow-sync-stalled
docker-compose deprecated the version tag

* retry start block fetching in L2 genesis cmd

* add CL to devnet L1 startup step

* ignore receipt for resolveClaim call in FinalizeWithdrawal

* forward tx trace as custom error type, use in withdrawal test

* return receipt in SendTx

---------

Co-authored-by: protolambda <[email protected]>
Co-authored-by: tchardin <[email protected]>

* cannon: delete unnecessary part in makefile (#11194)

* add dependence check in makefile

* Update Makefile

* Update Makefile

* docs(typo): `CrossL2Inbox.sol` (#11125)

* docs(typo): `CrossL2Inbox.sol`

`if{"f" => ""}`

* docs(crossL2Inbox): sync semver-lock

* monorepo: remove `devnet-tasks` (#11257)

Now `make devnet-test` runs go based devnet tests
rather than the legacy hardhat based ones.

```make
devnet-test: pre-devnet ## Runs tests on the local devnet
	make -C op-e2e test-devnet
```

This removes `devnet-tasks` from the monorepo, allowing
us to delete many dead dependencies.

* .github: remove old mergify config (#11258)

* remove changeset (#11259)

* feat(cross-l2-inbox): add CrossL2Inbox to predeploy addresses and abi_loader (#11267)

* dependabot(gomod): bump github.com/holiman/uint256 from 1.3.0 to 1.3.1 (#11268)

Bumps [github.com/holiman/uint256](https://github.com/holiman/uint256) from 1.3.0 to 1.3.1.
- [Release notes](https://github.com/holiman/uint256/releases)
- [Commits](https://github.com/holiman/uint256/compare/v1.3.0...v1.3.1)

---
updated-dependencies:
- dependency-name: github.com/holiman/uint256
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* cannon: add test dependence in Makefile (#11264)

* add test dependence in Makefile

* Update cannon/Makefile

Co-authored-by: mbaxter <[email protected]>

---------

Co-authored-by: mbaxter <[email protected]>

* op-chain-ops: remove dead code (#11261)

This code was used as part of the migration from the legacy system to
bedrock for op mainnet. It is no longer needed and exists in the
optimism-legacy repo if it is needed. The state transition that
represented the migration to bedrock can be reproduced using the
optimism legacy repo. Since this code is no longer used, we can delete
it here.

* MIPS2.sol MT-FPVM Implementation (#11036)

* cannon: MIPS2 MT-FPVM contract

Add a smart contract implementing the multi-threaded Cannon

* Update packages/contracts-bedrock/src/cannon/libraries/MIPSSyscalls.sol

Co-authored-by: mbaxter <[email protected]>

* cannon: Use common constant for BRK_START

* cannon: Define new constant FUTEX_EMPTY_ADDR

* cannon: Add SYS_ERROR_SIGNAL constant, fix futex wait ret val

* dedup syscall handling; rename timeout

* fix sys_clone bug

* use handler functions in onWaitComplete

* fix nits

* fix ETIMEDOUT constant

* remove leftover console import

* traverse right if left is empty on futex_wake syscall

* Update packages/contracts-bedrock/test/cannon/MIPS2.t.sol

Co-authored-by: mbaxter <[email protected]>

* fix traverseRight updates at popThread

* exit syscall is exit_group if last thread

* simplify wakeup logic; traverse fully before any other operation

* remove dup logic for wakeup traversal end

* fuzz thread.exited in wakeup tests

* update semver-lock; abi snapshots

* implement unused syscalls

* rebase; fix clone args

* update semver-lock

* handle munmap

* add comment on unimplemented syscalls

* add mising snapshots

---------

Co-authored-by: mbaxter <[email protected]>

* cleanup: rm more js (#11260)

* deps: pull js together

Puts all js in the single package where it is used

* deps: move linting config

* nx: remove config

* changesets: remove

* npmignore: remove

* npmrc: remove workspace

* ci: cleanup

* check-changed: remove nx dep

* build: attempt fix

* ci: cleanup

* cannon: Fix exitCode for invalid cloneargs in MIPS2 contract (#11275)

* mt-cannon: Implement mips logic (#11188)

* cannon: Copy over singlethreaded impls as a starting point

* cannon: Update mips property access to work with MTState

* cannon: Add new syscall constants

* mt-cannon: Implement clone syscall

* mt-cannon: Implement remaining new syscalls

* mt-cannon: Implement thread traversal changes to mipsStep()

* mt-cannon: Add logger, log when max steps reached

* mt-cannon: Implement onWaitComplete()

* mt-cannon: Implement thread manipulation methods

Also, use slices of pointers for the thread stacks

* mt-cannon: Move thread traversal fns to mips.go

* mt-cannon: Fix issue where wakeup traversal never stops

* mt-cannon: Fix issue where we can end up popping an empty stack

* mt-cannon: Move thread definitions to new thread.go file

* cannon: Add compile-time type checks for FPVM(State) impls

* mt-cannon: Add new threaded StackTracker

* mt-cannon: Update proof generation to include thread proof

* mt-cannon: Move FPVM compile-time type check

* cannon: Run common vm tests across all FPVM impls

* cannon: Cut OpenMIPS clone test

* cannon: Cleanup - fix some discrepancies, clarify constant

* cannon: Disable mem profiling in op-program instead of patch.go

* cannon: Consolidate calls to program.PatchGo

* cannon: Disable program.PatchGo in MTCannon tests

* mt-cannon: Add multithreaded program test

* cannon: Only run sleep check for single-threaded cannon

* op-program: Update profiling before dependency init fns are called

* mt-cannon: Track stack on thread clone, handled popped threads

* mt-cannon: Panic if unrecognized syscall is executed

* mt-cannon: Panic if unexpected flags are passed to SysClone

* mt-cannon: Add some tests for EncodeThreadProof()

* mt-cannon: Add some more tests around threadProof edge cases

* mt-cannon: Minimize logging

* cannon: Update go version in cannon/example/multithreaded/go.mod

Co-authored-by: Inphi <[email protected]>

* mt-cannon: Rework clone behavior based on feedback

* mt-cannon: Rework wakeup logic

* mt-cannon: Cleanup - simplify clone, refine logging

* Revert "cannon: Cut OpenMIPS clone test"

This reverts commit d876d6a44ffc01672a019d5b2411e7d3eab08439.

* mt-cannon: Skip open-mips clone test add todos

* mt-cannon: Handle munmap syscall

* mt-cannon: Exit if the last thread exits

* cannon: Clarify skip comment

* cannon: Add some todos

* cannon: Add guard around logging

---------

Co-authored-by: Inphi <[email protected]>

* contracts-bedrock docker fix (#11278)

* contracts-bedrock docker fix

* lockfile update for pnpm workspace

* op-chain-ops: Organize deploy-config, improve check-logging (#11189)

* op-chain-ops: Organize deploy-config, improve check-logging

* op-chain-ops: fix DAChallengeProxy check

* op-chain-ops: add godocs

* dependabot(gomod): bump github.com/onsi/gomega from 1.34.0 to 1.34.1 (#11279)

Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.34.0 to 1.34.1.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/gomega/compare/v1.34.0...v1.34.1)

---
updated-dependencies:
- dependency-name: github.com/onsi/gomega
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat(opsm): scaffold OP Stack Manager and tests (#11274)

* init scaffolding of OPSM contract and tests

* add chainIdToBatchInboxAddress

* chore: address semgrep findings

* test: add auth spec

* update functions sig, semver lock, snapshots

* semver lock update after installing correct foundry version

* udpates based on style guide

* snapshots

* op-program: delete redundant code (#11263)

* delete redundant code

* delete

* op-challenger: fix the wrong variable name and some additional fix (#11179)

* fix from differential-testing

* fix from L2Genesis

* fix variable name

* Update metrics.go

* docs: broken links in op-preimage (#11296)

* cannon: Fix onchain clone flags (#11293)

* cannon: Fix onchain clone flags

* cannon: Bump contract versions

* cannon: Run pre-commit

* op-node/derive: linter fix (#11265)

* linter fix

* use sentinel error

* fix format

* op-challenger: Add subcommand to continuously run trace providers (#11294)

* op-challenger: Add subcommand to continuously run trace providers

* op-challenger: Remove duplicate invalid recording.

* ops: fix build (#11299)

* ops: fix build

Migrates to a different `pnpm build` command that broke
as part of removing JS from the monorepo.

* ops: use frozen lockfile

* reduce scope of `expandedOwners` (#11301)

* fix comment (#11303)

* op-batcher: Add dynamic blob/calldata selection (#11219)

* op-batcher: Implement dynamic blob/calldata selection

* op-batcher: Improve logging in dynamic eth-da channel config

* op-batcher: Rename field ChannelConfig.MultiFrameTx to UseBlobs

* op-e2e: Add Batcher AutoDA test

* lint

* contracts-bedrock: fix `SentMessage` event (#11305)

* contracts-bedrock: fix `SentMessage` event

The bytecode emitted from `SentMessage(bytes) anonymous` abi encoded
the `relayMessage` call, breaking the ability to put calldata directly
into the event data. This uses yul to not abi encode the log as `bytes`
and instead place the calldata directly into the event data.

The fact that there is no abi decoding done in the test shows that this
is correct. Previously the abi decoding done in the test was not
correct, we want the exact data in the log to be the calldata.

* snapshots: update

* semver-lock: regenerate

* feat: introduce SuperchainWETH and ETHLiquidity (#11042)

Introduces the SuperchainWETH and ETHLiquidity contracts. More
information about these contracts can be found in the OP Stack
Specs repository.

* contracts-bedrock: fix CrossL2Inbox (#11320)

* contracts-bedrock: fix cross l2 inbox

Updates the `CrossL2Inbox` per the latest specs proposal in
https://github.com/ethereum-optimism/specs/pull/254

This reduces the cost of sending cross chain messages by
emitting the message hash as part of the event rather than
the full message itself.

* semver-lock: fix

* contracts-bedrock: port custom gas token to portal2 (#10780)

* contracts-bedrock: port custom gas token to portal2

Ports the custom gas token feature to `OptimismPortal2`.
This will enable fault proofs to run on custom gas token
chains.

* lint: fix

* tests: update

* tests: update

* Add task to capture a section of sepolia running fjord for compatibility tests. (#11326)

* Cannon: optimize the example (#11302)

* optimize the example

Use better-suited examples and make sure to add the required flag L2outputroot.

* fix path

* update

* replace network

* update comment

* op-node: optimize case to handle proposer requests (#11262)

* op-node: optimize case to handle proposer requests

* op-e2e: modify withdrawals test to trigger BlockRefWithStatus finalized hot-path

* fix(ci-builder-foundry-bump): Updating ci-builder. (#11325)

* Snapshots go scripts (#11338)

* contracts-bedrock: Go version of generate-invariant-docs

* contracts-bedrock: Go version of generate-snapshots

* devnet: Update expired docs link (#11329)

* delete expired docs link

* use the official doc

* doc: update style guide (#11290)

* doc: update style guide

* apply suggestion from code review

Co-authored-by: Maurelian <[email protected]>

* Update packages/contracts-bedrock/STYLE_GUIDE.md

---------

Co-authored-by: Maurelian <[email protected]>

* Add Granite and Holocene fork references (#11339)

* fix: set default forge gas limit (#11342)

* chain-spec: Fix next fork (#11341)

* fix: add missing assume condition (#11344)

* contracts-bedrock: remove typescript (#11340)

* contracts-bedrock: remove typescript

Moves to using Go from typescript, new code is autogenerated
by claude. Can confirm that both work as expected.

The `check-test-names` is not running in CI, it fails for both
the Go and Typescript scripts. Maybe claude will be able to get
the script to pass.

* Update check-spacers.go

Co-authored-by: semgrep-app[bot] <63493438+semgrep-app[bot]@users.noreply.github.com>

* Update packages/contracts-bedrock/scripts/checks/check-test-names.go

Co-authored-by: semgrep-app[bot] <63493438+semgrep-app[bot]@users.noreply.github.com>

* contracts-bedrock: fix build

* scripts: rename

* scripts: rename

* scripts: fixes

---------

Co-authored-by: protolambda <[email protected]>
Co-authored-by: semgrep-app[bot] <63493438+semgrep-app[bot]@users.noreply.github.com>

* Reduce ChannelTimeout to 50 in Granite (#11343)

* Reduce ChannelTimeout to 50 in Granite

* Capture granite genesis files.

* Update snapshots.

* Update op-geth dependency and resolve TODOs.

* update op-geth dependency to rc.1

* fix TestGetRollupConfig

---------

Co-authored-by: Adrian Sutton <[email protected]>

* fix: SuperchainWETH fuzz testing chain ID error (#11352)

Minor fix to fuzz testing for SuperchainWETH and related contracts.
Recipient chain ID cannot be the same as the sending chain ID.
Contracts throw an error when this is the case, causing fuzz tests
to fail.

* Apply error variable lint in op-node/p2p (#11354)

* op-chain-ops: remove etherscan package (#11345)

The `etherscan` package isn't maintained or used
in the monorepo, so it should be deleted.

* fix op-geth dependency (#11356)

* dependabot(gomod): bump golang.org/x/sync from 0.7.0 to 0.8.0 (#11358)

Bumps [golang.org/x/sync](https://github.com/golang/sync) from 0.7.0 to 0.8.0.
- [Commits](https://github.com/golang/sync/compare/v0.7.0...v0.8.0)

---
updated-dependencies:
- dependency-name: golang.org/x/sync
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* dependabot(gomod): bump golang.org/x/time from 0.5.0 to 0.6.0 (#11357)

Bumps [golang.org/x/time](https://github.com/golang/time) from 0.5.0 to 0.6.0.
- [Commits](https://github.com/golang/time/compare/v0.5.0...v0.6.0)

---
updated-dependencies:
- dependency-name: golang.org/x/time
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* ci: bump ci builder `0.50.0` (#11334)

* ci: bump ci builder `0.50.0`

Bumps the `ci-builder` image with an updated version
of foundry.

Foundry update:
https://github.com/ethereum-optimism/optimism/pull/11325

Docker build:
https://app.circleci.com/pipelines/github/ethereum-optimism/optimism/60263/workflows/154fd94a-4029-4e2f-8bce-4ea4c6d25897

* contracts-bedrock: fix tests after new foundry version

* contracts-bedrock: comment why skip

* test: better comments

* gas-snapshot: regenerate

* snapshots: update

* snapshots: update

* fix(ctb): Align expected ptr in `Bytes.slice` test

An update to `forge-std` causes `bound` to set the free memory pointer
at an unaligned offset. This commit updates the test such that the
expected pointer is correctly aligned, without an assumption on the
starting ptr's alignment.

---------

Co-authored-by: clabby <[email protected]>

* op-challenger: Modify run_trace to run a block prior to the safe head (#11349)

* op-challenger: Add metric to report memory used in the cannon VM (#11350)

* op-challenger: Add metric to report memory used in the cannon VM

* op-challenger: Remove config override.

* op-proposer: retry failed output proposals (#11291)

* op-proposer: add retries to output proposal

* op-proposer: proposeOutput returns err to help trigger retry

* op-proposer: use retry.Do for FetchOutput, add unit tests

* op-proposer: improve output fetching retry impl

* op-proposer: move done signal check into inner loop

---------

Co-authored-by: Sebastian Stammler <[email protected]>

* op-challenger: Fix prestate loading for asterisc in run-trace (#11363)

* feat(challenger): `AsteriscKona` trace type (#11140)

* feat(challenger): `AsteriscKona` trace type

Adds support for the new `asterisc-kona` game type in the
`op-challenger`

* feat: add `kona-host` `--l2-chain-id` flag

* op-challenger: Separate oracle server executor (#11348)

* fix(op-challenger): run trace cmd

* fix(op-challenger): lints

---------

Co-authored-by: Adrian Sutton <[email protected]>
Co-authored-by: refcell <[email protected]>

* op-e2e: Fix GraniteSystemConfig (#11361)

* update sepolia-devnet-0 deploy-config (#11371)

* cannon: move example test programs into testdata directory to prevent Go tool noise (#11379)

* op-node: abort block publishing if conductor commit fails (#11380)

* Fix devnet-up when op-program/bin is missing prestate-proof.json (#11383)

* contracts-bedrock: migrate to just (#11276)

* contracts-bedrock: migrate to just

Move away from `pnpm` for contracts scripts
and towards `just`. `just` was made for this,
since we are moving away from JS it makes no
sense to keep `pnpm` around which is native
to the JS ecosystem.

* ci: install just

* ops: cleanup, docs

* ci: install just

* justfile: update

* ci: fix install

* snapshots: update

* contracts-bedrock: remove pnpm/node, cleanup dockerfile

* slither ci: no longer need for workaround (TM)

* ts-linting: remove

* kontrol: regenerate snapshots

* safecall: update test

* test: update

Co-authored-by: Matt Solomon <[email protected]>

* docs: update

Co-authored-by: Matt Solomon <[email protected]>

* readme: update

Co-authored-by: Matt Solomon <[email protected]>

* docs: update

Co-authored-by: Matt Solomon <[email protected]>

* docs: update

Co-authored-by: Matt Solomon <[email protected]>

* docs: update

Co-authored-by: Maurelian <[email protected]>

* versions: use latest

* ci: fix

* CONTRIBUTING: update

* ci: fix

* lint: fix

---------

Co-authored-by: protolambda <[email protected]>
Co-authored-by: Matt Solomon <[email protected]>
Co-authored-by: Maurelian <[email protected]>

* op-proposer, op-batcher: Wait for sync in Start rather than loop. (#11192)

Ensures that if it fails, the process exits with an error, rather than just exiting the runloop and continuing on in a zombie mode that doesn't do anything but doesn't exit.

* contracts-bedrock: improve `CrossL2Inbox` devex (#11322)

* contracts-bedrock: improve `CrossL2Inbox` devex

Improve the `CrossL2Inbox` devex by creating an alternative entrypoint.
This design was not considered previously because there was a "top level
call" restriction, aka the "only EOA" invariant. This was to allow for
static analysis of transactions, keeping resource usage lower for
validating transactions when building blocks or at the mempool layer.
Since 3074/7702 render the enforcement of only eoa impossible,  we decided
to op/acc and lean into the approach of allowing subcalls to trigger
`ExecutingMessage` events.

This new interface allows another contract to be the entrypoint,
the idea is that the user sends the `Identifier` and the serialized
log (message) to whatever contract that they want and then pass it to
`CrossL2Inbox.validateMessage` which then emits the event that consensus
validates. This allows the calling smart contract to be aware of the
schema for the log and deserialize it however they see fit. Since the
serialized logs are done with the following algorithm:

```go
msg := make([]byte, 0)
for _, topic := range log.Topics {
    msg = append(msg, topic.Bytes()...)
}
msg = append(msg, log.Data...)
```

It is very easy to use `abi.decode` to decode a log, given that solidity
was used to `emit` it. The topics are `bytes32` and then the data is
abi encoded given the schema of the event itself. Unused parts like
`topic[0]` (hash of the event name) can be dropped when decoding if
they are not required.

* ctb: fix typo

* remove nonReentrant and add tests for validateMessage, rename ENTERED_SLOT preimage

* add natspec for _checkIdentifier and update that of validateMessage

* update version and semver-lock file

* check all topics in crossl2inbox test, run pnpm snapshots

* tests: fix

---------

Co-authored-by: Michael Amadi <[email protected]>

* Revert "Fix devnet-up when op-program/bin is missing prestate-proof.json (#11383)" (#11393)

This reverts commit 2491a3732fe97c9eec9baf615a010e8f7a42f738.

make cannon-prestate doesn't declare all transitive dependencies properly so can fail to build when there are changes.

* devnet/e2e: run L1 Deneb and L2 Fjord by default (#11359)

* devnet/e2e: run L1 Deneb and L2 Fjord by default

* op-e2e: fix TestPostUnsafePayload

* op-e2e: Fix TestGasPriceOracleFeeUpdates

* op-e2e/actions: fix some tests

The L2EngineAPI test needs more fixing

* tests: fixes to support Ecotone/Fjord in more tests

* op-e2e: one more fix

---------

Co-authored-by: Sebastian Stammler <[email protected]>

* feat(predeploys): add L2toL2CDM to predeploy addresses.go (#11403)

* contracts-bedrock: debug tests (#11397)

* contracts-bedrock: debug tests

See why the tests are flaking and cannot be reproduced locally.
Also modularize/cleanup CI along the way

* typo: fix

* debug: remove

* just: update name

* ci: better error help

* ci: fix typo

* contracts-bedrock: abstract

* ci: run with foundry profile ci

* ci: better solc warnings check (#11231)

* ci: better solc warnings check

Use `forge build --force` to force a build so that the warning check can
be observed. CI should fail on this commit

* contracts-bedrock: fix warnings

Fix the failed solc build

See the failed workflow here:
https://app.circleci.com/pipelines/github/ethereum-optimism/optimism/59631/workflows/b93bc600-e772-4ba9-98ed-a0b6f48683c7/jobs/2512271

* foundry: add ignored error code

* repo: migrate away from pnpm (#11395)

Migrate to just from pnpm. This is continued tech debt
cleanup away from `pnpm` and typescript that is no longer
used.

* Run cannon-prestate if devnet cannon prestate files are missing (#11399)

* Fix devnet-up when op-program/bin is missing prestate-proof.json

* Fix cannon-prestate to always run

* Add prestate.json

* ci: update geth tool to v1.14.7 (#11410)

* ci: update geth tool to v1.14.7

* ci: temporarily disable L1 geth version check, so L1 geth can be updated

* ops-bedrock: explicit hash state.scheme on geth

* Add RV reviews (#11422)

* Add RV reviews

* Fix naming of trust audit to match convention

* Update to Geth 1.14.7 (#11382)

* chore: update to support geth v1.14.7

* Update geth

* Fix "private key curve is not secp256k1" error

* Temporarily quiet noisy logs

* signature test

* Add comments about S256 curve override fix

* Update geth

* go.mod: update to op-geth v1.101407.0-rc.1

* op-e2e: fix L1/L2 miner settings

* Also update devnet L1 base image

* ci: bump ci-builder in circleci

---------

Co-authored-by: Danyal Prout <[email protected]>
Co-authored-by: protolambda <[email protected]>
Co-authored-by: Sebastian Stammler <[email protected]>

* cannon: Undo changes to memprofile patching (#11420)

* fix: update contracts README diagram (#11406)

* fix(ctb): remove linked libraries from scripts and tests (#11426)

* add additional address to exclude

* chore: make public library methods internal

* remove another public lib method

* remove additional public lib methods

* remove hardcoded assumption now that we know it's lib linking

* style: forge fmt

* add rationale to comment (#11429)

* ci: manage versions in versions.json (#11415)

* ci: manage versions in versions.json

and optimize archive downloads to directly extract

* ci: also pin just version

* cannon: Add support for --type mt to enable multithreaded cannon (#11411)

* cannon: Add support for --type mt to enable multithreaded cannon

* cannon: Rename vm type to cannon-mt

* dependabot(gomod): bump golang.org/x/crypto from 0.25.0 to 0.26.0 (#11373)

* dependabot(gomod): bump golang.org/x/crypto from 0.25.0 to 0.26.0

Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.25.0 to 0.26.0.
- [Commits](https://github.com/golang/crypto/compare/v0.25.0...v0.26.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* deps: update

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mark Tyneway <[email protected]>

* op-supervisor: Include executing message info when storing logs. (#11369)

* Rebase: op-supervisor: Include executing message info when storing logs.

Takes from aj/parse-exec-msg and makes the following updates:
- uses upstream ABI definitions for identifier hash
- removes the core recording functionality for the moment
- fixes up inconsistent typing and merge conflicts due to rearranged packages

* Incorporate new ABI format

* remove trailing newline in contract

---------

Co-authored-by: Adrian Sutton <[email protected]>

* fix: minor error in contracts readme (#11432)

* Don't recheck terminal type for color (#11412)

Not necessary as it's checked further up the call tree. Without this --log.color doesn't work when intended.

* maint: further clean up contract scripts organization (#11434)

Scripts within contracts-bedrock are all over the place. Relatively
minor PR that moves things around into a cleaner folder structure.
Scripts themselves are unchanged.

* op-e2e: Test Granite EVM rules in op-program (#11391)

* op-geth: update to support new precompile-overrides function (#11443)

* op-geth: update to support new precompile-overrides function

* op-program: ensure no accidental precompile overrides

* go.mod: update op-geth for new precompile override functionality

* op-challenger: Do not resolve games in selective mode (#11430)

* dependabot(gomod): bump github.com/urfave/cli/v2 from 2.27.3 to 2.27.4 (#11450)

Bumps [github.com/urfave/cli/v2](https://github.com/urfave/cli) from 2.27.3 to 2.27.4.
- [Release notes](https://github.com/urfave/cli/releases)
- [Changelog](https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/urfave/cli/compare/v2.27.3...v2.27.4)

---
updated-dependencies:
- dependency-name: github.com/urfave/cli/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* dependabot(docker): bump ethereum/client-go in /ops-bedrock (#11448)

Bumps ethereum/client-go from v1.14.7 to v1.14.8.

---
updated-dependencies:
- dependency-name: ethereum/client-go
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: introduce OptimismSuperchainERC20 (#11256)

* feat: introduce OptimismSuperchainERC20

* fix: contract fixes

* feat: add snapshots and semver

* test: add supports interface tests

* test: add invariant test

* feat: add parameters to the RelayERC20 event

* fix: typo

* fix: from param description

* fix: event signature and interface pragma

* feat: add initializer

* feat: use unstructured storage and OZ v5

* feat: update superchain erc20 interfaces

* fix: adapt storage to ERC7201

* test: add initializable OZ v5 test

* fix: invariant docs

* fix: ERC165 implementation

* test: improve superc20 invariant (#11)

* fix: gas snapshot

---------

Co-authored-by: 0xng <[email protected]>
Co-authored-by: Disco <[email protected]>

* op-node: Fix p2p data races (#11353)

* Fix data races around p2p records

Fixes https://github.com/ethereum-optimism/optimism/issues/11328

* Remove some constructor boilerplate

* Add data race fixes for op-node/p2p tests

* Include book locking for record deletion

* Add missing read locks

* Move locks into wrappers

* Remove ping service trace parameter from public API

* I came in search of data races and I found refactors

* op-challenger: Fix run-trace disputed block selection (#11437)

* op-challenger: Fix run-trace disputed block selection

Previously it assumed the safe head at SafeL1 was before the safe head at HeadL1 in the sync status, but that is not guaranteed. As a result it could select an L2 block to check that was unsafe at the specified L1 head.

* op-challenger: Update vm-runner to handle the case where op-node hasn't processed all finalized L1 blocks yet

* contracts-bedrock: migrate interop portal to fp (#11051)

* contracts-bedrock: migrate interop portal to fp

Utilize fault proofs in the interop portal. This is
useful for removing the `L2OutputOracle` from the codebase.
We will need to deploy the interop devnet using the permissioned
dispute game after this change, so we want to ensure that the
deploy script can set that up easily.

* ctb: migrate interop to fp portal

* snapshots: regenerate

* lint: fix

* contracts-bedrock: always enable fault proofs with interop

* interop: support fault proofs

* deploy script: only deploy correct contracts

* contracts-bedrock: cleanup deploy

* contracts-bedrock: fix deploy

The deploy script is very coupled to unit tests

* portal2: reduce codesize

* lint: fix

* snapshots: update

* snapshots: update

* semver-lock: regenerate

* deploy script: update

* tests: update excludes

* summary: update

* op-wheel: harden against missing safe/finalized heads (#11460)

* op-bedrock: Add detail to the documentation to clarify any confusion. (#11457)

* Add detail to the documentation to clarify any confusion.

* fix format

* op-chain-ops: artifacts FS, improve artifacts metadata (#11445)

* op-chain-ops: artifacts FS, improve artifacts metadata

* ci: include artifacts as Go e2e test pre-requisite

* op-chain-ops: move full artifacts test, update testdata

* ci: fix artifacts workspace copy

* op-node: remove MaxSequencerDrift hardcode (#11459)

* go: update superchain import

* op-node: read MaxSequencerDrift from superchain configs

* go: update superchain import to point to main commit

* op-chain-ops/script: turn any Go struct/interface into a precompile with ABI encoding/decoding (#11444)

* op-chain-ops/script: turn any Go struct/interface into a precompile with ABI encoding/decoding

* op-chain-ops: add more comments about precompile auto ABI code

* op-service: capture inherited log attributes (#11470)

* op-service: capture inherited log attributes

* op-service/testlog: reverse Attrs traversal order

* devnet: enable span batches and use blobs for non-plasma (#11477)

* op-node,op-batcher: implement span channel out block count limit (#11416)

* op-node: implement span channel out block count limit

* op-batcher: add max-blocks-per-span-batch flag

* op-e2e: test MaxBlocksPerSpanBatch in system test

* op-e2e: use span batches in 4844 test

* address Axel's review

* Update README.md (#11474)

Corrected a typo in the sentence: "`op-geth` embeds upstream geth’s version inside its own version..."

* feat: update Sepolia Drippie config to latest (#10810)

* fix: makefile build command (#11466)

Build command inside of the root-level makefile was calling
build-ts which no longer exists. Adds a new command to build
contracts-bedrock and replaces that inside of the root build
command.

* op-node: attempt recovery from odd forkchoice states (#11462)

* op-node: attempt recovery from odd forkchoice states

* op-node: adjust recovery heuristic to express distance in number of sequence windows

* op-e2e: Disable proposer in dispute game tests (#11431)

The games being tested are created manually and the automated proposals at best waste time and can interfere with tsts like TestHighestActedL1BlockMetric which expects the challenger to acton all games.

* deploy-config: Update OP Sepolia absolute prestate (#11394)

* txmgr: add rpc api getters/setters (#10897)

* Add txmgr rpc api

* Update mock TxManager

* Use parameterized tests to remove redundant code

* Add txmgr.cfgLock to protect values configurable at runtime

* txmgr: use generic API() method on interface to allow custom rpc apis

* txmgr: re-generate mocks

* txmgr: use atomics for Config vals that can be modified via rpc

* txmgr: use pointer for SimpleTxManager.cfg

* txmgr: remove extraneous code

* txmgr: cleanup ctx input arg in rpc methods

* Feature/rv compute (#11015)

* Add dummy tests for passing and failing

* Updating passing along return errors and a duplicate call to clean_docker

* Fixing logging

* Update to latest kontrol version supporting error codes

* Remove trap for testing

* Add install-kontrol and run local with enforced version requiresments

* Drop on failure trap and test

* The cleanup steps may be altering the return results. We're not running docker, not needed here

* Test with traps re-added after finding issue was with using find

* Formatting, now test with passing test

* Update run-kontrol.sh

Revert debug set to original header

* Increase CPU workers to 16 for kaas runners

* Update config.yml

* Remove dummy proofs

* run-kontrol.sh: set `max_workers` to 16

* run-kontrol.sh: execute all tests with `script` option

* run-kontrol.sh: match tests more precisely

* run-kontrol.sh: add back `break_every_step` variable

* versions.json: bump Kontrol from 0.1.247 to 0.1.258

* IGnore vscode configuration files

* Move on regardless of docker removal, container is started with automatic removal on stop, we just want to make sure it happens for redundancy

* Extract content of Results to upload to kaas

* Call into RV Workflow to run symbolic tests

* Updating circleCI to latest credentials setup/secret references. Set context to proper env. Remove unused inputs

* Reverting unecessary change

* Add RV context

* Removing comma from end of json block

* Set the specific branch name to run on, do not assume develop.

* Temporary when conditional to always run

* Revert test when conditional

* Supress extraction of outputs

* Accept Suggestion for comment line in packages/contracts-bedrock/test/kontrol/scripts/run-kontrol.sh

Co-authored-by: Matt Solomon <[email protected]>

* Supress tar file creation output

* Dropping -verbose in tar command. Reduce output on exeutions

* run-kontrol.sh: Update Temporarily unexecuted tests list

* run-kontrol.sh: Update Temporarily unexecuted tests list v2

* Update documentation noting changes / usage / flow / secrets for utilizing kaas

* run-kontrol.sh: Fetch the xml file if it exists from the build env and make available for posting to summary

* Update packages/contracts-bedrock/test/kontrol/README.md

Co-authored-by: Matt Solomon <[email protected]>

* Update packages/contracts-bedrock/test/kontrol/README.md

Co-authored-by: Matt Solomon <[email protected]>

* Update packages/contracts-bedrock/test/kontrol/README.md

Co-authored-by: Matt Solomon <[email protected]>

* Update packages/contracts-bedrock/test/kontrol/README.md

Co-authored-by: Matt Solomon <[email protected]>

* Update packages/contracts-bedrock/test/kontrol/README.md

Co-authored-by: Matt Solomon <[email protected]>

* kontrol/README.md: Update instructions for clarity and usage

* .github/workflows: Adding a new workflow to trigger on updates to depoloyment_status from third party

* Force push to test

* Remove if check for environment.

* status-test: This looks like the wrong trigger

* Update slack notification workflow with template

* proof-runner-notification.yml: Slack notifications on failure, and webhook URL

* Replace Link with provided target_url from commit status

* Update payload variables per slack workflow variable requirements.

---------

Co-authored-by: Juan C <[email protected]>
Co-authored-by: Matt Solomon <[email protected]>

* repo: rename plasma --> altDA (#11370)

* update superchain-registry import

* replace all plasma with altda

* replace plasma with altda in filenames

* contracts: update snapshots

* go: update superchain import

* go: update superchain import after rebase

* go: run mod tidy

* op-batcher: fix altda env vars passed in devnet docker-compose

* go: update superchain import

* go: use main commit for superchain import

* ci: remove proof runner workflow (#11486)

The 'on: status' trigger is too broad and causes this job to trigger
for all commits. Instead KaaS (Kontrol as a Service) will post the
resulting status to slack directly, instead of through github

* Added Stop API in the conductor (#11463)

* add stop api in the conductor

* add tests

* fix test cases

* fix conductor stop api test

* re-trigger ci tests

* op-chain-ops/script: ConsolePrecompile with console2 ABI (#11446)

v2

* op-challenger: Extract RegistrationTask to dedeuplicate registration code between different game types. (#11413)

* feat: add cgo_test tags to fuzz tests (#11489)

* getting-started: modernize (#11436)

Make the getting started script modern by adding recent hardfork config
and also make the script runnable from any directory.

* op-e2e: Add forge clean to README.md troubleshooting section (#11471)

* op-e2e: Add forge clean to README.md troubleshooting section

* Update op-e2e/README.md

Co-authored-by: Matt Solomon <[email protected]>

---------

Co-authored-by: Matt Solomon <[email protected]>

* fix run-kontrol.sh path (#11495)

* Prevent reiniting preimage uploads. (#190)

* fix: require minimum split depth of 2

FDGs with a split depth below 2 can trigger bugs in clock
extension. Since we don't expect to have a split depth anywhere
near 0 or 1 this is a low impact bug and doesn't have an impact
on production but should be prevented anyway.

* fix: correct check for max game depth

Modifies the FDG constructor to correctly check that the
splitDepth +1 is gte the max game depth. Means that the splitDepth
is now limited to be 1 smaller than it was before. Fine in prod
but avoids a bug in the trace ancestor lookup logic.

* fix: have MIPS revert on add/sub overflow/underflow (#230)

Updates MIPSInstructions so that it correctly reverts on calls to
add, addi, and sub that overflow/underflow. Additionally includes
tests that demonstrates that the unchecked versions of the same
opcodes allow for overflow/underflow.

* fix: correct implementation of srav (#245)

Existing implementation of SRAV had a bug where it would perform a
shift with all bytes of the rs register when the spec says it
should only be using the lower 5 bits of the register. Updates the
implementation to reflect this, updates the existing test to use
the same test vector as provided in the open mips tests, and adds
fuzz tests that shows srav works as expected with rs values that
have more than the lower 5 bits set.

* fix: have DelayedWETH use call instead of transfer (#228)

Updates DelayedWETH to use call instead of transfer because
transfer only sends along 2300 gas which will cause the transfer
to fail if the owner contract uses lots of gas in the fallback
function. Adds tests that demonstrate that the function now works
appropriately under any reasonable amount of gas usage. In theory
this means the recovery function can be reentered but this isn't
an issue because the function is authenticated and is recovering
all of the ETH in the contract anyway.

* fix: make state.exited be zero or one (#246)

Modifies the MIPS contracts to enforce that state.exited is either
exactly zero or one and cannot have any other value.

* fix: have mips step check register offset instead of overwrite (#238)

Existing step logic wrote the register offset into memory but the
compiler should already be doing this when the struct is defined.
Instead of writing directly into memory, this change verifies that
the memory at that location has the expected value which will
catch any cases where the compiler's memory allocation mechanism
changes in the future.

* Add gas input to precompile pre-images (#186) (#252)

* contracts: Add gas input to precompile pre-images (#186)

Also update the cannon evm tests to use the new precompile preimage scheme.

---------

Co-authored-by: Adrian Sutton <[email protected]>

* op-challenger: Support uploading data in new format. (#188)

* op-program: Add required gas to precompile oracle key (#176)

* op-challenger: Support multiple versions of the preimage oracle contract

---------

Co-authored-by: Adrian Sutton <[email protected]>

---------

Co-authored-by: inphi <[email protected]>

---------

Co-authored-by: Adrian Sutton <[email protected]>

* fix: correctly verify mips instruction encoding (#237)

A lot of instructions in the MIPS spec require that certain fields
be set to zero. Most of the time this isn't actually a problem but
this can cause side-effects in a few cases. A buggy compiler could
create an issue if it ever spit out non-compliant instructions.
This PR implements those zero value enforcement checks for all
instructions that we implement.

* fix: localdata size check (#271)

* Prevent reiniting preimage uploads. (#190)

* fix(ctb): PreimageOracle `loadLocalData` length check

* fixes

* fix: bump preimage oracle semver

* chore: snapshots

* fix: gas snapshot

* revert: gas snapshot changes

---------

Co-authored-by: Adrian Sutton <[email protected]>
Co-authored-by: clabby <[email protected]>

* fix(ctb): Perform correct clock validation in FDG constructor (#231)

* Prevent reiniting preimage uploads. (#190)

* fix(ctb): Perform correct clock validation in FDG constructor

Fixes the clock extension / max clock duration check in the
`FaultDisputeGame` constructor to account for the worst-case clock
extension.

* fix: add semver-lock

* fix: add kontrol

* gas snapshot

* fix: gas snapshot and semver-lock

---------

Co-authored-by: Adrian Sutton <[email protected]>
Co-authored-by: refcell <[email protected]>

* fix: no squeezing unfinalized proposals (#257)

* fix: no squeezing unfinalized proposals

Updates the PreimageOracle to correctly revert if a proposal has
not actually been finalized. This fixes a bug because the timestamp
is not set until after a proposal is finalized but all other
conditions in the squeeze function are met even before addLeaves
is called with the finalize boolean set.

* fix: ci checks

* fix: semver lock

---------

Co-authored-by: refcell <[email protected]>

* fix: Choose min block in FDG local inputs

* fix: correct clock extension for step (#258)

When the FDG is about to execute a step, we must add an additional
clock extension equal to the PreimageOracle challenge period. This
gives the PreimageOracle time to elapse.

* op-e2e: Fix preimage upload to use new ABI. (#274)

* fix(ci): `fp-staging` ci fix (#278)

* Revert "fix: have MIPS revert on add/sub overflow/underflow (#230)" (#279)

This reverts commit 864e59a821e87f9dd00ae97f85add93fa3857597.

* Revert "fix: correctly verify mips instruction encoding (#237)" (#281)

This reverts commit 59e02fb3ece7fc249223054944a0b1ff437aa64f.

* cannon: Limit mmap allocations (#285)

* cannon: Basic memory protections

Add memory protections against high memory allocations to the VM.
This prevents large allocations from causing the `heap` to overflow and
wrap into low memory, which could overwrite code and cause arbitrary code execution.

---------

Co-authored-by: inphi <[email protected]>

* Add e2e test for starting trace extension one block too late (#268)

* feat: create deploy script for fp updates (#292)

Creates a deploy script to deploy the implementations for the
FaultDisputeGame and PermissionedDisputeGame contracts being
updated as part of Granite. Based on the original FPACOPS script
with modifications to remove actions that are not necessary for
an upgrade.

* fix(ctb): Set Anchor State (#280)

Allow the `DeputyGuardian` to set the Anchor State for brick prevention.

---------

Co-authored-by: clabby <[email protected]>
Co-authored-by: refcell <[email protected]>

* feat: contract versions for fp fixes (#295)

* fix: use existing ASR for FPACOPS2 (#297)

FPACOPS2 deployed a new AnchorStateRegistry proxy when the actual
script needed to just deploy a new implementation.

* op-chain-ops: Go forge scripts runner (#11447)

* op-chain-ops: Go forge scripts runner

* fix lint

* op-chain-ops: encapsulate forge script tests in testdata

* op-proposer: ensure uniform proposal interval across restarts (#11417)

* op-proposer: ensure uniform proposal interval across restarts

closes https://github.com/ethereum-optimism/optimism/issues/11193

* move DGF query logic into FetchDGFOutput

* merge loopL2OO and loopDGF

* tweak comments

* Apply suggestions from code review

Co-authored-by: Sebastian Stammler <[email protected]>

* return err instead of defaulting to sending a proposak

flatten out control flow, remove shouldPropose var

* defer l.Log.Info("loop returning")

* improve error handling and logging

* fix logging syntax error

* make DGFContract interface

harmonize how network contexts are constructed

* modify test for new DGF behavior

* fix bugs in test code

* remove OutputRetryInterval flag

* handle gameCount = 0

* finish removing OutputRetryInterval

* driver waits one proposal interval for the first ever proposal

* do not create mock unecessarily

* do not create mockL2OOContract unecessarily

* wrap and return errors instead of logging and returning

* op-proposer: Switch to modern binding style for dispute game factory (#11472)

---------

Co-authored-by: Sebastian Stammler <[email protected]>
Co-authored-by: Adrian Sutton <[email protected]>

* Add Base cantina/spearbit audits

* Update op-geth dependency to 1.14.8 base (#11494)

* Update op-geth dependency to 1.14.8 base

* go.mod: update op-geth to v1.101408.0-rc.1

---------

Co-authored-by: protolambda <[email protected]>

* op-chain-ops: automatic ABI bindings from Go struct (#11497)

* op-node: cleanup driver, closer to removing stepping (#11464)

* op-node: cleanup driver, closer to removing stepping

* op-node: add comment about event Drain error

* op-node: fix lint

* op-node: handle drain errors

* fix: wrong MaxSequencerDrift comment (#11505)

* feat: ensure proper closing of gzip and file writers/readers to prevent resource leaks (#11475)

* add gzipCloser struct

* add Close method

* fix OpenDecompressed func

* fix CompressByFileType func

* knit

* Apply suggestions from code review

close both even if one fails

Co-authored-by: Adrian Sutton <[email protected]>

* fix WriteCloser Close method

* fix name for more general

* fix writercloser name for more geneeral

* add construction function for WrappedCloser

* using construction func

* seperate wrapped closer struct to wrapped_closer.go

---------

Co-authored-by: Adrian Sutton <[email protected]>

* add regression test (#11519)

* refactor: using slices.Contains (#11521)

* Change to `latest` in getting started config (#11524)

* feat: add fork activation based on env variables - getting started script update (#11500)

* feat: add configurable fork times for each update

* remove granite for now

* add granite if env var is defined

* add granite if env var is defined

* fix if else

* fix if else

* add debug step

* fix l2name

* remove debug step

* dependabot(gomod): bump github.com/prometheus/client_golang (#11483)

Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.19.1 to 1.20.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.19.1...v1.20.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Interop: Add new role for dependency set management (#11407)

* add role based auth for dependency related setters with tests

* support systemConfig initialize, rename foundation multisig to dependency manager

* use dependency manager role only, update SystemConfigInterop and Specs tests

* rebase to current develop head, run pre-pr script

* use constant hash with comments over computing at compile time, update semver-lock

* use dependencyManager() fn internally, import directly not indirectly in SystemConfigInterop

* op-chain-ops: forge script cheatcodes (#11465)

* op-chain-ops: forge script cheatcodes, work in progress

incl prank cheatcodes
incl env var handling
incl serialize utils
incl some json/toml utils
incl go.mod: tidy

* op-chain-ops: fix state dumping

* op-chain-ops: remove debug print line

* txmgr: rename Get|SetPriorityFee to Get|SetMinPriorityFee (#11526)

* txmgr: add tx-type metric (#11523)

* ctb: `rc` version FP contracts (#11525)

* ctb: `rc` version FP contracts

* bump deputy guardian module

* Add missing GOMODCACHE caching when building op-stack-go services (#11512)

* chore: clarify contracts release process (#11529)

* chore: clarify contracts release process

* Update packages/contracts-bedrock/VERSIONING.md

Co-authored-by: Inphi <[email protected]>

---------

Co-authored-by: Inphi <[email protected]>

* Add optimistic Granite mainnet activation (#11531)

* use copy of config.L1Deployments (#11532)

* fix: slice init len (#11520)

* Upgrade bbolt via raft (#11507)

* deploy-config: Update mainnet prestate for granite HF (#11533)

* Add Interop Start timestamp to CrossL2Inbox (#11398)

* add interop start timestamp to CrossL2Inbox with tests

* change to function, add assertions, update tests

* correct the preimage of interop start storage slot

* rename custome error

* require id timestamp must be > interopStartTime not >=, update tests to use realistic interopStartTime (non-zero)

* bump CrossL2Inbox semver, run just semver-lock & just snapshots

* add natspec for setInteropStart

* update semver lock

* dependabot(gomod): bump github.com/prometheus/client_golang (#11540)

Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.20.0 to 1.20.1.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/v1.20.1/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.20.0...v1.20.1)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* OPSM: Deploy Superchain, alternate approach (#11480)

* feat: initial DeloySuperchain script

* chore: scaffold file-based interfaces

* test: additional assertions

* chore: appease semgrep

* scaffold alternate approach

* incorporate feedback

* refactor based on feedback

* fix tests

* test: more robust testing

* refactor: dedupe etching of IO contracts and add getter method

* refactor: using maps.Copy (#11544)

* ctb(proofs): switch to running OptimismPortal2 proofs, since that portal is used in production (#11545)

* cannon: Run common evm tests across all implementations (#11333)

* cannon: Prep test utils to handle Mips2.sol

* cannon: Add metadata struct to hold all contract-related metadata

* cannon: Add forge debug test for mips2

* cannon: Fix path to mips2 artifacts in testutil

* cannon: Rework evm tests to run across both cannon impls

* cannon: Skip failing test for now, add todo

* cannon: Rename FPVMState.GetRegisters to GetRegistersMutable

* cannon: Run linter

* cannon: Fix skipped claim test

* cannon: Rename FPVMState registers getter to follow convention

* cannon: Rename cpu getter to match naming convention

* cannon: Fix bad merge - elf paths, versioned references

* refactor: using maps.Keys (#11547)

* fix: `getting-started` deploy config (#11557)

* fix: fix slice init length (#11542)

Signed-off-by: shandongzhejiang <[email protected]>

* feat: liquidity migration (#11479)

* feat: add L2 standrad bridge interop contract

* test: add L2 standard bridge interop unit tests (#13)

* test: add L2 standard bridge interop unit tests

* fix: add tests natspec

* fix: unit tests fixes

* fix: super to legacy tests failing

* fix: mock and expect mint and burn

* fix: add generic factory interface (#14)

* test: add L2 standard bridge interop unit tests

* fix: add tests natspec

* fix: add generic factory inter…
samlaf pushed a commit to samlaf/optimism that referenced this pull request Nov 10, 2024
* feat: add L2 standrad bridge interop contract

* test: add L2 standard bridge interop unit tests (ethereum-optimism#13)

* test: add L2 standard bridge interop unit tests

* fix: add tests natspec

* fix: unit tests fixes

* fix: super to legacy tests failing

* fix: mock and expect mint and burn

* fix: add generic factory interface (ethereum-optimism#14)

* test: add L2 standard bridge interop unit tests

* fix: add tests natspec

* fix: add generic factory interface

* feat: modify OptimismMintableERC20Factory for convert (ethereum-optimism#17)

* test: add L2 standard bridge interop unit tests

* fix: add tests natspec

* fix: add generic factory interface

* feat: modify OptimismMintableERC20Factory for convert

* fix: use only a public function for create3

* feat: rollback interop factory, modify legacy one

* fix: delete local token return variable

* fix: PR fixes

* test: fix address assuming

* test: fix view warning

* fix: snapshots

* test: small fixes
samlaf pushed a commit to samlaf/optimism that referenced this pull request Nov 10, 2024
* test: add L2 standard bridge interop unit tests (ethereum-optimism#13)

* test: add L2 standard bridge interop unit tests

* fix: add tests natspec

* fix: unit tests fixes

* fix: super to legacy tests failing

* fix: mock and expect mint and burn

* fix: add generic factory interface (ethereum-optimism#14)

* test: add L2 standard bridge interop unit tests

* fix: add tests natspec

* fix: add generic factory interface

* feat: modify OptimismMintableERC20Factory for convert (ethereum-optimism#17)

* test: add L2 standard bridge interop unit tests

* fix: add tests natspec

* fix: add generic factory interface

* feat: modify OptimismMintableERC20Factory for convert

* fix: use only a public function for create3

* feat: rollback interop factory, modify legacy one

* fix: delete local token return variable

* fix: PR fixes

* feat: add superchain erc20 factory implementation (ethereum-optimism#23)

* feat: add superchain erc20 factory implementation

* fix: remove createX comments

* test: add superchain erc20 factory tests (ethereum-optimism#25)

* test: add superchain erc20 factory tests

* test: add erc20 asserts

* test: fix expect emit

* fix: remove comments

* feat: add constructor to superchain ERC20 beacon (ethereum-optimism#34)

* test: remove factory predeploy etch

----------

Co-authored-by: 0xng <[email protected]>
Co-authored-by: 0xParticle <[email protected]>
Co-authored-by: gotzenx <[email protected]>

* fix: set an arbitrary address for superchain erc20 impl

* fix: deploy a proxy for the beacon on genesis (ethereum-optimism#45)


---------

Co-authored-by: 0xng <[email protected]>

* fix: conflicts and imports

* fix: interfaces

* chore: add .testdata

* fix: adding back .testdata to gitignore

* fix: new conflicts from ci improvements

---------

Co-authored-by: 0xng <[email protected]>
Co-authored-by: 0xParticle <[email protected]>
Co-authored-by: gotzenx <[email protected]>
Co-authored-by: Disco <[email protected]>
claymega added a commit to megaeth-labs/optimism that referenced this pull request Nov 22, 2024
* feat: add ERC-5202 Blueprint library with initial tests (#11700)

https://eips.ethereum.org/EIPS/eip-5202

* chore: Fix lint error (#11714)

golangci-lint v1.60.2 seems to report a new error when performing a nil check and length != 0 on maps. We're not using this version in CI yet but fix the error to simplify the code and provide for a future upgrade.

* maint: no kontrol summaries in PRs (#11725)

Removes the need for kontrol summaries to be generated at PR time.
Summaries will now be generated during run-kontrol.sh instead.

* feat: check interface differences in CI (#11677)

Adds a new check script to contracts-bedrock that verifies that
interfaces being added to the repository accurately represent
the interface of the contract that the interface was generated
for.

* add comment to SingularBatch.Timestamp (#11720)

* op-program: Use PebbleDB for DiskKV (Reapply with fixes) (#11709)

* feat(op-program): Use `PebbleDB` for `DiskKV` (#11705)

* feat(op-program): Use `PebbleDB` for `DiskKV`

* close db

* fix `testFaultProofProgramScenario` tests

* switch to snappy compression

https://github.com/cockroachdb/pebble/issues/3434

* fix tempdir

* update compat release

* defer k/v until preimage server and hinter have both exited

* Only open preimage source when actually needing preimages.

Avoids concurrent access to the pebbledb.

* op-program: Handle interrupts in host

Ensures the preimage kv store is closed cleanly even when the process is sent an interrupt signal.
Enables non-blocking IO so that read calls return io.EOF when a file handle is closed rather than blocking forever.

* op-program: Restore file based kv store. Add pebble as an additional option.

* op-program: Add option to specify KV store format to use

* op-program: Switch pebble to perform sync writes.

* op-program: Rename disk kv to file kv

* op-program: Rename DBFormat to DataFormat for consistency.

---------

Co-authored-by: clabby <[email protected]>

* fix: SuperchainWETH fuzz flake with bad sender (#11728)

Fixes a number of places where SuperchainWETH fuzz tests can flake
as a result of using a sender address that is the ETHLiquidity or
SuperchainWETH contract.

* Fix copy-paste typo (#11731)

* maint: add interfaces for legacy contracts (#11625)

Adds interfaces for the contracts inside of /legacy. Interface is
not included for the LegacyMintableERC20 contract because that
interface has already been defined elsewhere.

* Slim down contracts-bedrock package (#11723)

* Slim down contracts-bedrock package

The contracts-bedrock package was over 2GB in size, mostly because it contained the Git repository. It also supported multiple platforms, which would lead to costly recompilation steps every time the image was used on a different platform (e.g., OSX).

The PR updates the Dockerfile to no longer ship the Git repo. It also updates the Debian base image to a more modern, slimmed down version. The new image is <1G in size.

* fix bakefile

* fix: properly check all interfaces (#11734)

Interfaces check script had a bug that would cause it to use the
wrong ABI when checking an interface. Each compiler artifact only
has a single ABI in it but this same ABI was being used for all
contract definitions found within that file. Since each separate
contract definition gets its own file anyway, this script now
properly verifies by finding the specific definition that matches
the filename.

* feat: update interface validation script to check semver (#11740)

Updates the interface validation script to verify that all
interface contracts are using Solidity ^0.8.0 exactly.

* challenger: Introduce StateConverter to abstract loading VM states (#11715)

* fix: flake tests (#11742)

* fix: add optimism mintable check on assume address helper

* fix: mock interfaces checks

* chore: remove unused import

---------

Co-authored-by: 0xng <[email protected]>

* repo: bump foundry (#11746)

Bumps foundry to the following commit: https://github.com/foundry-rs/foundry/commit/143abd6a768eeb52a5785240b763d72a56987b4a

Release: https://github.com/foundry-rs/foundry/releases/tag/nightly

This needs to be followed up with a rebuild of `ci-builder`

* Revert "challenger: Introduce StateConverter to abstract loading VM states (#…" (#11747)

This reverts commit 3410109155ae75915ff95dc0a1995ac0d3cac8b5.

* cannon: Run expensive tests in parallel (#11739)

* op-node: sequencer should clear inconsistent asyncGossip buffer on sequencer-start (#11724)

* op-node: sequencer should clear inconsistent asyncGossip buffer on sequencer-start

* op-node: test async-gossip clearing

* Update op-node/rollup/sequencing/sequencer.go

Co-authored-by: Adrian Sutton <[email protected]>

---------

Co-authored-by: Adrian Sutton <[email protected]>

* Reapply "challenger: Introduce StateConverter to abstract loading VM states" (#11752)

With fix to set a state converter when creating trace providers for test.

* contracts-bedrock: Add OPSM file I/O for superchain deployments (#11750)

* contracts-bedrock: Add OPSM file I/O for superchain deployments

* Update packages/contracts-bedrock/scripts/DeploySuperchain.s.sol

Co-authored-by: Matt Solomon <[email protected]>

* Update packages/contracts-bedrock/test/DeploySuperchain.t.sol

Co-authored-by: Matt Solomon <[email protected]>

* Address feedback from code review

* Linter

---------

Co-authored-by: Matt Solomon <[email protected]>

* maint: update solidity vscode extension (#11751)

* op-conductor: adds raft log snapshot configs (#11745)

* Refactors NewRaftConsensus param list into a config struct
* Adds configuration support for SnapshotInterval, SnapshotThreshold, TrailingLogs

* fix: initialization tests (#11674)

Fixes the initialization tests, existing tests were not properly
verifying that all of the initializable contracts were being
accounted for.

* Update VERSIONING.md (#11761)

* Fix contracts-bedrock-docker-publish build (#11755)

The build stage name was accidentally removed, which [broke](https://app.circleci.com/pipelines/github/ethereum-optimism/optimism/63237/workflows/e6a2d738-132f-4e10-9da2-c265b364c771/jobs/2627291) the job.

* op-node: op-node interop block verification (devnet-1 scope) (#11611)

* op-node: experimental interop block verification

* op-node: supervisor RPC init

* op-e2e/actions: test interop safety checks

* op-e2e/op-node: test fixes

* op-node: update comments

* op-node: unit-test interop deriver, trigger cross-safe updates on driver step, to poll for supervisor safety changes

* op-node: add more comments, fix flag description

* op-e2e: fix rebase, add missing argument

* cannon: Support binary serialisation for snapshots (#11718)

* cannon: Add serialize utils for binary formats and automatic binary/json detection.

* cannon: Support reading and writing states as binary or JSON

* cannon: Generate mt prestate as gzipped binary.

Use different versions for singlethreaded and multithreaded states.

* cannon: Improve comments for serialization

* cannon: Review feedback

* cannon: Introduce reader and writer helpers to simplify code.

* op-node: sanity-check the forkchoice updates (#11780)

* Use local logger in data source (#11756)

There may be other places where a global logger is used, but this instance is particularly important because one message warns the user of a misconfiguration that otherwise manifests in a seemingly unrelated bug (rollbacks on unsafe block consolidation).

* fix: small typo fixes to DeploySuperchain.s.sol. (#11758)

* fix: small typo fixes to DeploySuperchain.s.sol.

* fix: semgrep Javadoc-style comments are not allowed.

* style: remove extra space

---------

Co-authored-by: Matt Solomon <[email protected]>

* cannon: Port audit fixes (#11697)

* cannon: Require boolean exited field to be encoded as 0 or 1

* cannon: Port mmap solidity tests for MTCannon

* cannon: Port srav solidity tests

* cannon: Run semver-lock, snapshot tasks

* cannon: Cut extra validation on thread.exited

* cannon: Run semver lock

* cannon: Update IMIPS2 interface

* ci: pull cached artifacts for contracts tests (#11771)

Contracts tests don't need to recompile if we can just use the
artifacts instead.

* test: more blueprint tests (#11782)

* test: more blueprint tests

* address PR feedback

* op-chain-ops: prep / utils for interop genesis work (#11790)

* Add Maintenance Trigger for Cascading Updates (#11619)

* Update and cleanup CODEOWNERS with expert teams (#11786)

* Catch 'header not found' string in L2BlockRefByLabel (#11759)

* ci: speed up CI by up to 50% (#11794)

Introduces a number of improvements to CI that significantly
reduce overal CI time by up to 50% of the previous time.

* dependabot(gomod): bump github.com/prometheus/client_golang (#11764)

Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.20.2 to 1.20.3.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/v1.20.3/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.20.2...v1.20.3)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(challenger): `asterisc-kona` trace type (#11789)

* dependabot(gomod): bump golang.org/x/crypto from 0.26.0 to 0.27.0 (#11765)

* dependabot(gomod): bump golang.org/x/crypto from 0.26.0 to 0.27.0

Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.26.0 to 0.27.0.
- [Commits](https://github.com/golang/crypto/compare/v0.26.0...v0.27.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* deps: update

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mark Tyneway <[email protected]>

* Add Admin RPC for Adding New Chain Monitors (#11792)

* Add Admin RPC for Adding New Chain Monitors

* Update op-supervisor/supervisor/backend/db/db.go

---------

Co-authored-by: protolambda <[email protected]>

* semgrep: try to fix CI timeout (#11798)

* maint: move existing interfaces to folders (#11749)

Moves any existing interfaces that are not already inside of
their corresponding /interfaces folders into those folders.

* op-challenger: Support binary and JSON snapshots (#11754)

* op-challenger: Support loading json or binary cannon states.

* op-challenger: Use binary cannon snapshots

* op-challenger: Support downloading prestates in multiple formats.

* op-challenger: Verify newly downloaded snapshots.

* op-e2e: Update test to handle binary snapshots correctly.

* op-e2e: Remove unused parameter

* op-challenger: Add more varied data to the test cannon state.

* op-challenger: Add more varied data to the test cannon state.

* Remove hardcoded entrypoint (#11801)

Removes the `ENTRYPOINT` directive in the `contracts-bedrock` image. While convenient, using `ENTRYPOINT` makes building tooling on top of the image much harder since the entrypoint cannot be overridden without providing special flags to Docker. It is easier to use a dummy `CMD` instead that directs users to call specific tools when running the container. Functionally, this means users will run `docker run just <cmd>` instead of `docker run <cmd>` if they want to use the Justfile.

* Allow cheatcodes on DeploySuperchain.s.sol (#11802)

We need to add these calls otherwise calling `DeploySuperchain.s.sol` as a script with input/output files fails.

* op-program: Add recent op-program versions to reproducibility check (#11560)

* op-program: Add recent op-program versions to reproducibility check

* Add 1.3.1-rc.2

* ci: update contracts tests to split by file (#11797)

Contracts tests were being split by test name which meant that
Circle CI wouldn't be able to (eventually) be able to properly
split these files by timings. Updates the CI job to split by
file instead.

* fix `ReadPreimage` (#11805)

* avoid out of bound for TrackingPreimageOracleReader.ReadPreimage

* use p.GetPreimage

* op-program: Add a script to build cannon prestates for all tagged op-program releases. (#11559)

* op-dispute-mon: Identify unclaimed credits based on the withdrawal request timestamp (#11488)

* cannon: Fix path used when verifying a downloaded state (#11813)

* op-service: Make target destination when writing JSON/binary explicit (#11800)

Avoids being surprised by the special handling for - and empty string output paths.

* maint: add interface for L2OutputOracle (#11817)

First in a series of PRs adding interfaces for L2 contracts. Since
each of these changes involves touching a lot of other contracts
it seemed easier to split this up into several PRs for legibility.

* cannon: Autodetect VM type from state (#11803)

* cannon: Autodetect VM type from state in run command

* cannon: Autodetect VM type from state in witness command

* cannon: Remove vm type flag from run and witness

* cannon: Only peek the version byte

* cannon: Move all version handling to VersionedState, simplify a lot and forbid serializing multithreaded states to JSON

* cannon: Rename method

* op-challenger: Update cannon state parsing to use version detecting methods

* cannon: Move CreateVM to FPVMState for simplicity

Test read/write/create for VersionedState

* cannon: Readd detect_test

* cannon: Remove json names from multithreaded.State.

Multithreaded states always use binary serialization.

* cannon: Move vmtype to load_elf since it is no longer shared.

* cannon: Ensure metadata is available and sleepCheck used even if debug is disabled.

* op-challenger: Update canon state loading test to cover multiple state versions.

* op-challenger: Release agent resources once game is complete (#11820)

* Fix race condition in sequencer stopping logic (#11769)

* Fix race condition in sequencer stopping logic

* Add channel to signal that latestHead has been updated

* Fix test

* Store latest sealed separately, as latest gets cleared by engine.PayloadSuccessEvent

* Cleanup tests

* Add assertions on latest block ref variables

* Re-check if sequencer is active

* feat: Add nested directory data format for op-program kvstore (#11795)

* feat: Add nested directory data format for op-program kvstore

* Review feedback: Update error message

Co-authored-by: Adrian Sutton <[email protected]>

* op-program: Make directory preimage format the default.

---------

Co-authored-by: Adrian Sutton <[email protected]>
Co-authored-by: Adrian Sutton <[email protected]>

* Revert "op-program: Make directory preimage format the default." (#11823)

* Add broadcast API to Go forge scripts (#11826)

* Add broadcast API to Go forge scripts

Adds a hooks-based API to collect transactions broadcasted via `vm.broadcast(*)` in the Go-based Forge scripts. Users pass an `OnBroadcast` hook to the host, which will be called with a `Broadcast` struct with the following fields whenever a transaction needs to be emitted:

```go
type Broadcast struct {
	From     common.Address
	To       common.Address
	Calldata []byte
	Value    *big.Int
}
```

This API lets us layer on custom transaction management in the future which will be helpful for `op-deployer`.

As part of this PR, I changed the internal `callStack` data structure to contain pointers to `CallFrame`s rather than passing by value. I discovered a bug where the pranked sender was not being cleared in subsequent calls due to an ineffectual assignment error. I took a look at the implementation and there are many places where assignments to call frames within the stack happen after converting the value to a reference, so converting the stack to store pointers in the first place both simplified the code and eliminated a class of errors in the future. I updated the public API methods to return copies of the internal structs to prevent accidental mutation.

* Code review updates

* moar review updates

* fix bug with staticcall

* fix(op-batcher): initAltDA before initChannelConfig (#11816)

* fix(op-batcher): initAltDA before initChannelConfig

* chore(op-bastcher): fix comment

* op-node: read DACommitmentType from scr in LoadOPStackRollupConfig (#11830)

* op-node: read DACommitmentType from scr in LoadOPStackRollupConfig

* op-node: check for altda nil pointers before dereferencing

* op-node: leave altDA config nil if not existent in scr config

* OPSM: Begin implementing OP Stack Manager code and it's deployment (#11623)

* begin supporting specifying versions in OPSM

* add deploy logic

* deploy OPSM along with implementations

* scaffold opsm interface between scripts

* fixes

* mvp of DeployOPChain

* start working on an e2e opsm test, currently reverts

* fix tests

* test cleanup

* rename opsmSingleton to opsm

* chore: remove unused imports

* refactor: switch from 'new' to blueprints, 50% code size reduction

* fix semgrep

* feat: add OPSM interop tests

* test: add missing specs

* add DisputeGameFactory deployment

* chore: update snapshots

* fix opsm interop support

* chore: update snapshots

* Update packages/contracts-bedrock/test/DeployOPChain.t.sol

* fix: add L1StandardBridge setter and initialization

* chore: small clarification of deploy flow

* Update packages/contracts-bedrock/scripts/DeployImplementations.s.sol

Co-authored-by: Blaine Malone <[email protected]>

* chore: add todos

* fix: change bytes32 to string

* rename addrs to opChainAddrs for clarity

* test: fix assertion string numbering

* chore: update semver lock:

---------

Co-authored-by: Blaine Malone <[email protected]>

* op-chain-ops: fix Go forge script broadcast handling (#11832)

* fix: OptimismPortal fuzz flakes (#11818)

OptimismPortal fuzz tests were flaking because the base fee would
increase so much that there wouldn't be enough gas to burn for the
user to be able to buy the gas that they want. Introduces an
additional assumption that will prevent the elasticity multiplier
and max change denominator from being such that the maximum
change to the base fee won't cause us to run out of gas.

* cannon: Fix jalr stack tracking (#11831)

* ci: make semgrep-scan use a large docker image (#11834)

semgrep-scan kept failing with a medium docker image with 4g RAM.
Updating this image to large seems to fix the issue.

* maint: clarify interface fixes are manual (#11835)

* feat: ban deposits interop (#11712)

* interop: disable interop messages in force-deposits

Co-authored-by: Disco <[email protected]>

* interop: clean up config helpers

* op-node: fix/improve L1 info tx tests

* op-node: fix attributes test

* op-node: fix sequence-number usage in post-interop system deposit, fix tests

* op-contracts: L1Block interop: fix diff, remove duplicate test from renaming

* contracts: update metadata

* contracts: fix build warnings

* contracts: fix interface build

* script: ignore

* lint: fix

* test: .testdata directory

* tests: fix revert

---------

Co-authored-by: Disco <[email protected]>
Co-authored-by: protolambda <[email protected]>
Co-authored-by: Mark Tyneway <[email protected]>

* Improvements/bugfixes to Go forge scripts (#11838)

* Improvements/bugfixes to Go forge scripts

Adds some improvements to the Go forge scripts:

- Adds a `GasUsed` field to the `Broadcast` struct so that transaction broadcast utilities can use it for gas estimation. Gas estimation using the RPC will fail when sending transactions in parallel since the state can change significantly between calls.
- Fixes a bug in the `vm.broadcast` cheatcode where sender nonce were not increased for `vm.CALL`s. This led to a mismatch between the contract addresses generated by the Forge tooling, and what was actually being generated onchain.

* op-chain-ops: isolate broadcast functionality

* review updates

* wrap in broadcast check

* Add nonce tests

* Update op-chain-ops/script/script.go

Co-authored-by: protolambda <[email protected]>

* Fix test

* op-chain-ops: track broadcast nonce, add sanity checks

---------

Co-authored-by: protolambda <[email protected]>

* OPSM: remove structs from `DeploySuperchain` (#11833)

* refactor: remove structs from DeploySuperchainInput and DeploySuperchainOutput

* test: fix tests

* test: fix test

* chore: remove outdated struct references

* pr feedback

* chore: code comments

* maint: add more L1 interfaces (#11822)

Another PR adding contract interfaces. L1 contract interfaces are
way more involved than everything else so we're required to start
replacing the contracts with interfaces all over the place.

* ci: selectively build contracts (#11824)

Updates the contracts-bedrock-tests job to only build the specific
tests that are being tested as part of the test split for that
job. Also merges the other contracts-bedrock-build with
build-devnet-allocs since this is a bottleneck now. Overall impact
is that CI time is now 7-10 minutes.

* Add entrypoint to deploy against existing Superchain (#11791)

* Add entrypoint to deploy against existing Superchain

Creates a separate entrypoint in the deploy script to allow an L2 to be deployed against an existing set of Superchain contracts. The deployment assumes that the Superchain contracts have been deployed correctly. The L2 still gets its own ProxyAdmin, AddressManager, and Safe. The API is additive and backwards-compatible.

* Update packages/contracts-bedrock/scripts/deploy/Deploy.s.sol

Co-authored-by: Maurelian <[email protected]>

* remove redundant call

---------

Co-authored-by: Maurelian <[email protected]>

* test: fix test and variable naming conventions (#11845)

* feat: concurrent alt-da requests (#11698)

* feat: initial goroutine blob submission implementation

test(batcher): add e2e test for concurrent altda requests

doc: add explanation comment for FakeDAServer

chore: fix if condition in altda sendTransaction path

feat: add maxConcurrentDaRequests config flag + semaphore

refactor: batcher to use errgroup for da instead of separate semaphore/waitgroup

fix: nil pointer bug after using wrong function after rebase

fix: defn of maxConcurrentDaRequests=0

fix: TestBatcherConcurrentAltDARequests

chore: remove unneeded if statement around time.Sleep

refactor: use TryGo instead of Go to make logic local and easier to read

chore: clean up some comments in batcher

chore: make batcher shutdown cancel pending altda requests by using shutdownCtx instead of killCtx

* chore(batcher): make altda wg wait + log only when useAltDa is true

* refactor: batcher altda submission code into its own function

* test: refactor batcher e2e test to only count batcher txs

* chore: log errors from wait functions

* chore: refactor and minimize time that e2e batcher system tests can run

* chore: lower timeout duration in test

* fix(batcher): maxConcurentDARequests was not being initialized

* feat: run extra fuzz rounds for new fuzz tests (#11748)

Adds a new script that can run extra fuzz test iterations when
new fuzz tests are added. Can be used in CI or locally to make
sure that new fuzz tests aren't flaky.

* Release op-contracts/v1.6.0 (#11760)

* op-contracts/v1.6.0-rc.1 release (#11528)

* Fix deploy-config absolute prestate

* chore: update semver-lock

---------

Co-authored-by: smartcontracts <[email protected]>
Co-authored-by: Kelvin Fichter <[email protected]>

* proofs Add a proofs-tools docker image  (#11825)

* op-challenger: Add a "big" op-challenger docker image including asterisc and kona

* proofs-tools: Rename op-challenger-deps to proofs-tools and use tagged asterisc and kona sources.

* proofs-tools: Use more recent version of challenger for testing

* proofs-tools: Remove TODO

* proofs-tools: Only build for amd64 - kona doesn't support arm64.

* proofs-tools: Add README

* proofs-tools: Use challenger v1.1.0

* maint: add remaining L1 contract interfaces (#11848)

Adds interfaces for all remaining L1 contracts. L2 contracts are
next!

* feat: Run `op-program` in `op-e2e` action tests (#11846)

* feat: Run `op-program` in `op-e2e` action tests

* configurable forks

* golint / op-program test

* use correct endpoint

* fix: add IBeacon to interface check ignore (#11860)

IBeacon should've thrown an error but didn't, need to investigate
why that was the case. For now I've added it to the ignore list.

* proofs-tools: Fix circleci config to run hold job on proofs-tools release tags (#11856)

* maint: add comment to OptimismPortal2 proof submitters mapping (#11853)

Adds a comment to OptimismPortal2 that further explains the
proofSubmitters mapping.

* fix: add extra context to check interfaces script logs (#11861)

Updates the output of the check-interfaces script to be more clear
about cases when removing items from the EXCLUDE_CONTRACTS list is
acceptable and how to verify that an item is unnecessary.

* feat: Helper for dumping `fp-tests` fixtures in `op-program` action tests (#11855)

* feat: Helper for dumping `fp-tests` fixtures in `op-program` action tests

* adrian review

* proofs-tools: Update ci-docker-tag-op-stack-release.sh regex (#11862)

* chore: export process frames (#11864)

* chore: Cleanup proofs actions (#11858)

* chore: Cleanup proofs actions

* tidy

* lint

* adrian review

* move `RunFaultProofProgram` onto the `L2FaultProofEnv` type

* proofs-tools: Include openssl and certs (#11865)

* cannon: Fix GC emulation of Go programs (#11704)

* cannon: Fix GC emulation of Go programs

Improves Linux/MIPS32 emulation for Go programs that utilize the garbage
collector and goroutine scheduling.

This adds support for the following syscalls:

- getpid - used by the go scheduler
- clock_gettime - used by the go scheduler and for GC assists and to properly emulate
  time related operations such as `time.Sleep`.

Note on GC assists:

The Go GC relies on `clock_gettime` for GC "assists", whereby a mutator can perform a little bit
of GC without waiting for the scheduler to do so.
A monotonic clock (runtime.nanotime) is used to compute the current goroutine's compute budget.
By modeling a MIPS32 CPU that runs at some clock speed (ex: 10 MHz), we can provide a consistent
emulation of monotonic time needed by the Go runtime.
All other clock_gettime flags are handled as unimplemented syscalls.

* fix unsupported syscalls test

* fix some review comments

* address review comments

* update snapshots

* fuzz invalid memory proof

* reduce test runtime

* tweak realtime emulation

* reduce test runtime

* set a high timeout for heavy fuzz tests

* simplify fuzz

* fix heavy tests

* Fix the error usage in cannon (#11368)

* chore(op-program): Turn off `fsync` on pebble KV store (#11863)

* chore: Cleanup proofs actions

* tidy

* lint

* adrian review

* move `RunFaultProofProgram` onto the `L2FaultProofEnv` type

* chore(op-program): Turn off `fsync` on pebble KV store

* Add SendAsync to TxMgr (#11843)

* Add SendAsync to TxMgr

Adds a SendAsync method to TxMgr. I'd like to use this for `op-deployer`, which needs to send multiple transactions in parallel but with predictable nonces. `SendAsync` returns a channel that resolves with the result of each send, but synchronously increases the nonce and prepares the first send prior to returning.

* review updates + tests

* feat: introduce OptimismSuperchainERC20Factory (#11617)

* test: add L2 standard bridge interop unit tests (#13)

* test: add L2 standard bridge interop unit tests

* fix: add tests natspec

* fix: unit tests fixes

* fix: super to legacy tests failing

* fix: mock and expect mint and burn

* fix: add generic factory interface (#14)

* test: add L2 standard bridge interop unit tests

* fix: add tests natspec

* fix: add generic factory interface

* feat: modify OptimismMintableERC20Factory for convert (#17)

* test: add L2 standard bridge interop unit tests

* fix: add tests natspec

* fix: add generic factory interface

* feat: modify OptimismMintableERC20Factory for convert

* fix: use only a public function for create3

* feat: rollback interop factory, modify legacy one

* fix: delete local token return variable

* fix: PR fixes

* feat: add superchain erc20 factory implementation (#23)

* feat: add superchain erc20 factory implementation

* fix: remove createX comments

* test: add superchain erc20 factory tests (#25)

* test: add superchain erc20 factory tests

* test: add erc20 asserts

* test: fix expect emit

* fix: remove comments

* feat: add constructor to superchain ERC20 beacon (#34)

* test: remove factory predeploy etch

----------

Co-authored-by: 0xng <[email protected]>
Co-authored-by: 0xParticle <[email protected]>
Co-authored-by: gotzenx <[email protected]>

* fix: set an arbitrary address for superchain erc20 impl

* fix: deploy a proxy for the beacon on genesis (#45)


---------

Co-authored-by: 0xng <[email protected]>

* fix: conflicts and imports

* fix: interfaces

* chore: add .testdata

* fix: adding back .testdata to gitignore

* fix: new conflicts from ci improvements

---------

Co-authored-by: 0xng <[email protected]>
Co-authored-by: 0xParticle <[email protected]>
Co-authored-by: gotzenx <[email protected]>
Co-authored-by: Disco <[email protected]>

* fix: do not delete test data directory (#11869)

Our "just clean" command was deleting the entirety of .testdata
which gets in several scripts now. We don't actually want to
delete the entirety of .testdata, we want to delete anything
inside of it (except for the gitkeep file).

* codeowners: move go-reviewers team at the end (#11877)

* txmgr: improve code sharing between Send and SendAsync (#11876)

* Revert "txmgr: improve code sharing between Send and SendAsync (#11876)" (#11883)

This reverts commit 87af6f0d033996b0cad2437f75fe8bc626a2b5d5.

* Add op-deployer proof-of-concept (#11804)

This PR adds a proof-of-concept for `op-deployer`, a CLI tool that allows declarative management of live OP Stack chains. This POC supports initializing the declarative chain config (called an "intent") and deploying the Superchain smart contracts using the OP Stack Manager.

An example intent for a Sepolia chain looks like this:

```toml
l1ChainID = 11155111
useFaultProofs = true
useAltDA = false
fundDevAccounts = true
contractArtifactsURL = "file:///Users/matthewslipper/dev/optimism/packages/contracts-bedrock/forge-artifacts"

[superchainRoles]
  proxyAdminOwner = "0xb9cdf788704088a4c0191d045c151fcbe2db14a4"
  protocolVersionsOwner = "0xb910764be39c84d572ff17713c615b5bfd7df650"
  guardian = "0x8c7e4a51acb17719d225bd17598b8a94b46c8767"
```

When deployed, it produces a state file that looks like this:

```json
{
  "version": 1,
  "appliedIntent": {
    "l1ChainID": 11155111,
    "superchainRoles": {
      "proxyAdminOwner": "0xb9cdf788704088a4c0191d045c151fcbe2db14a4",
      "protocolVersionsOwner": "0xb910764be39c84d572ff17713c615b5bfd7df650",
      "guardian": "0x8c7e4a51acb17719d225bd17598b8a94b46c8767"
    },
    "useFaultProofs": true,
    "useAltDA": false,
    "fundDevAccounts": true,
    "contractArtifactsURL": "file:///Users/matthewslipper/dev/optimism/packages/contracts-bedrock/forge-artifacts",
    "chains": null
  },
  "superchainDeployment": {
    "proxyAdminAddress": "0x54a6088c04a7782e69b5031579a1973a9e3c1a8c",
    "superchainConfigProxyAddress": "0xc969afc4799a9350f9f05b60748bc62f2829b03a",
    "superchainConfigImplAddress": "0x08426b74350e7cba5b52be4909c542d28b6b3962",
    "protocolVersionsProxyAddress": "0x212a023892803c7570eb317c77672c8391bf3dde",
    "protocolVersionsImplAddress": "0x2633ac74edb7ae1f1b5656e042285015f9ee477d"
  }
}
```

To use `op-deployer`, run `op-deployer init --dev --l1-chain-id <chain-id>`. This will initialize a deployment intent using the development keys in the repo. Then, run `op-deployer apply --l1-rpc-url <l1-rpc> --private-key <deployer-private-key>` to apply the deployment.

- The contracts deployment is performed by the local Go/Forge tooling.
- Upgrades of the contracts (i.e. modifying them after deploying the contracts afresh) is not currently supported. This will be supported in the future.
- The rest of the pipeline (i.e., deploying L2s and generating genesis files) is not included in this PR to keep it smaller and allow us to get buy-in on the fundamental concepts behind `op-deployer` before further implementation.

* fix(ci): skip files without modified functions (#11891)

Updates test-heavy-fuzz-modified-tests to skip any files that
don't have any modified fuzz tests.

* fix(ci): tweak heavy fuzz run parameters (#11894)

Tweaks various parameters for the heavy fuzz run tests to prevent
the test from taking too long. We can run a daily super heavy fuzz
run instead to catch any rare flakes.

* discard candidate when ahead (#11874)

* discard candidate when ahead

* also discard result.Unsafe for consistency

* remove unnecessary type convertion for FakeGenesis

* Revert "also discard result.Unsafe for consistency"

This reverts commit d2288d4a01bb4176fd1a3c6e1901646c7bb404c7.

* remove type cast

* codeowners: own op-e2e/actions/proofs by proofs team (#11895)

* maint: add interfaces for governance contracts (#11878)

Adds interfaces for the two governance contracts.

* maint: rename Safe folder to safe (#11882)

Renames the Safe folder (uppercase) to safe (lowercase) in line
with all other folders.

* opsm: remove remaining structs (#11854)

* refactor: remove structs from DeployImplementations

* refactor: remove structs from DeployOPChain

* test: fix tests

* Update packages/contracts-bedrock/test/DeployOPChain.t.sol

Co-authored-by: Blaine Malone <[email protected]>

* Update packages/contracts-bedrock/test/DeployOPChain.t.sol

Co-authored-by: Blaine Malone <[email protected]>

* test: add missing assertions

* fix: update fuzz test timeout

---------

Co-authored-by: Blaine Malone <[email protected]>
Co-authored-by: Kelvin Fichter <[email protected]>

* feat: Add channel timeout tests for `op-program` (#11885)

* feat: Add channel timeout tests for `op-program`

* typo

* assert error

* fix comment

* feat: Add garbage frame tests for `op-program` (#11896)

* feat: Add channel timeout tests for `op-program`

* typo

* assert error

* fix comment

* feat: Add garbage frame tests for `op-program`

* assert error

* fix comment

* feat: mintable with permit (#11868)

* contracts-bedrock: add permit functionality to mintable erc20

Adds `permit` functionality to `OptimismMintableERC20` tokens
that are deployed by the `OptimismMintableERC20Factory`.

* feat: max approve permit2 in ERC20Mintable

This commit max approves permit2 automatically for all holders of the
ERC20 bridge token. This enables all users on OP stack chains to skip an
approval step for actions on protocols utilizing permit2 e.g. Uniswap

* fix: constants first

* semver-lock: update

* snapshots: fix

* contracts: add natspec

* semver-lock: update

* contracts-bedrock: fix nits

* snapshots: update

---------

Co-authored-by: Mark Toda <[email protected]>

* add sequence window expiry test (#11897)

* fix: incorrect import in ManageDrippie.s.sol (#11898)

Fixes an incorrect import inside of ManageDrippie.s.sol. Seems to
work just fine when forge install is executed but not otherwise.

* op-e2e: Setup mt-cannon for tests (#11881)

* op-e2e: Use mt-cannon

Introduces a `USE_MT_CANNON` env to optionally enables MT-Cannon in
op-e2e integration tests

* a couple of fixes

* fix todo

* op-program: Inject prefetcher instead of setting code in config (#11902)

* op-program: Support injecting a Prefetcher creator rather than setting code on the Config object.

* op-program: Use an interface for the Prefetcher instead of requiring a concrete type.

* feat: `op-program` actor test API improvements (#11903)

* feat: `op-program` actor test API improvements

* lint

* sort fix

* rebase

* op-program: Record the kv format used. (#11900)

Automatically use the correct format if it has been recorded.

Change the default format to directory. Compatibility with op-challenger is preserved because it now uses the automatic format detection, defaulting to file if not specified (e.g for kona-host).

* feat: Scaffolding for DeployAuthSystemInput (#11889)

* feat: Scaffolding for DeployAuthSystemInput

* fix: Remove undefined import

* feat: Address feedback

* interop: interopgen v2 using OPSM (#11702)

* op-chain-ops/interopgen: OPSM powered interop genesis

* ci: make forge scripts available to op-e2e

* op-chain-ops: address interopgen review comments

* cannon: Handle preimage bounds checks consistently (#11911)

* cannon: Handle preimage bounds checks consistently

* cannon: Cleanup stray comment

* feat: Scaffolding for DeployAuthSystemInput (#11890)

* feat: Scaffolding for DeployAuthSystemInput

* feat: Scaffolding for DeployAuthSystem Output

* feat: Address feedback and remove comments

* Interop: SuperSystem for E2E Tests (#11850)

* op-e2e: interop test setup (work in progress)

* op-e2e: interop test setup

* organization and comment updates

* refactor creation code into WIP system2

* save secrets per L2

* Add SuperSystem Interface ; Add Users and Transactions

* Further Refactoring ; Fix Test

* Add Supervisor

* Add Supervisor Client

* Comment out Proposer

* Add AddL2RPC to Supervisor Client

* Fully link Supervisor and OP Node in E2E Test

* correct RPC call supervisor_checkBlock

* Make EOF acceptable for backend check

* final structure names

* Change unused functions to _ for linter

* fix import order

* Add Github Issue Numbers to TODOs

* tynes comments: add World Resource as configurable

---------

Co-authored-by: protolambda <[email protected]>

* feat: Front OPSM with Proxy and Initialize (#11875)

* fix: getting stack underflow error.

* feat: adding proxy infront of OPStackManager.

* fix: PR comments, we're landing on using the initialize function over setRelease.

* fix: rename function.

* fix: nit

* fix: infering proxy admin from superchain config.

* fix: ran command: just pre-pr-no-build

* fix: nits

* fix: using CommonBase in DeployImplementations.s.sol.

* op-chain-ops: pass superchain proxy admin address as input to deployments script

---------

Co-authored-by: Matt Solomon <[email protected]>
Co-authored-by: protolambda <[email protected]>

* fix: Additional DeployImplementations.s.sol tests (#11914)

* fix: Additional testing for inferring proxy admin from superchain config.

* Apply suggestions from code review

---------

Co-authored-by: Matt Solomon <[email protected]>

* Use the deterministic deployer when broadcasting with CREATE2 (#11915)

* op-e2e: Separate helpers for proofs action tests into a new package (#11920)

* op-e2e: Move action test helpers for proofs to a separate package.

* op-e2e: Use helpers package under proofs rather than a completely separate package tree for helpers.

* cannon: Implement thread-safe ll and sc operations (#11906)

* cannon: Extract RMW op handling from shared logic

* cannon: Add more test cases of LL/SC behavior

* cannon: Cut ll/sc-related logic from common mips code

* cannon: Setup mips helpers to return memory modification info

* cannon: Add new fields to track reserved memory

* cannon: Add a boolean field indicating whether an ll reservation is active

* cannon: Implement ll/sc for MTCannon

* cannon: Add modified sysRead tests for MTCannon

* cannon: Test store operations cleare memory reservations

* cannon: Update SysClockGettime to clear ll memory reservation

* cannon: Fix slither warning - initialize variable

* cannon: Bump MIP2.sol version

* cannon: Run semver, snapshot tasks

* cannon: Cut unused log msg

* cannon: Add new error to MIPS interfaces

* cannon: Cut stale TODO

* Add integration test for apply (#11910)

* Add integration test for apply

Adds an integration test for OP Deployer's `apply` method. This test uses Kurtosis to spin up an in-memory L1, deploy the contracts using OP Deployer, then asserts that there is code at all reported addresses.

* Review updates

* circleci: Enable mt-cannon in develop-fault-proofs (#11928)

* feat: add SuperchainERC20 baseline (#11675)

* feat: add superchain erc20 baseline (#37)

* feat: add superchain erc20 baseline

* feat: make superchain ERC20 simpler

* fix: small version fix and tests

* test: fix test name

* test: remove unused import

* feat: making baseline abstract

* fix: interfaces to comply with the new interface checker

* fix: import paths and empty line

* fix: lint line

---------

Co-authored-by: 0xng <[email protected]>
Co-authored-by: 0xng <[email protected]>

* feat(op-service): add SuperchainWETH and ETHLiquidity to predeploys/addresses.go (#11927)

* Port deployers, add end-to-end contract deployments (#11922)

This PR ports over the deployers in `interopgen` into `op-deployer`, and updates `op-deployer` to support end-to end contract deployments for both the Superchain and individual OP Chains.

This PR includes a couple of bugfixes for things I discovered along the way:

1. The script host is updated to bump the nonce of the address calling the CREATE2 deployer when broadcasting. This fixes a chain/simulation mismatch that blocked contracts from being deployed.
2. The DeployImplementations contract used a fixed CREATE2 salt, which caused problems on repeated deployments. I updated the contract to pull the nonce from the environment as we do elsewhere.

Builds on https://github.com/ethereum-optimism/optimism/pull/11910.

* cannon: Handle unaligned futex addresses (#11929)

* cannon: Update tests for futex unaligned memory behavior

* cannon: Align futex-related addresses when they are set

* cannon: Run lint and semver tasks

* cannon: Add wakeup traversal tests with unaligend addresses

* cannon: Don't panic if ThreadState.FutexAddr is unaligned

* cannon: Run semver lock task

* cannon: Cleanup stray whitespace

* Add Logging ; Fix Broken Maintenance Context (#11931)

* Add Logging ; Fix Broken Maintenance Context

* Remove unneeded timing ; use Testlogger

* feat(op-e2e): Expose `L1Replica` + `L2Engine` + `BlobsStore` endpoints (#11926)

* feat(op-e2e): Expose `L1Replica` + `L2Engine` + `BlobsStore` endpoints

* mutex

* deterministic blob indexing

* proto review

* lint

* op-node: handle crit error events, lift event-system out of driver (#11932)

* op-e2e: Fix compile error (#11933)

* op-e2e: Fix compile error

* ci: Make go-lint a dependency of bedrock-go-tests to prevent merging if it fails.

* op-e2e: Separate actions tests into different packages (#11921)

* op-e2e: Move most action tests into a package based on what they test

* op-e2e: Move batch_queue_test.go to derivation package

* op-e2e: Move eip4844_test.go to batcher package

* op-e2e: Move actions helper code to helpers package

* update makefile

* op-e2e: Fix typo

---------

Co-authored-by: clabby <[email protected]>

* feat(op-e2e): Kona FPP actions test adapter (#11936)

* feat(op-e2e): Kona FPP actions test adapter

* rebase

* lint

* review

* fix result check

* op-e2e: Organize e2e system tests in subdirs (#11939)

* op-e2e: organize system tests

* op-e2e: update CI make targets

* op-e2e: fix artifacts file paths

* op-e2e: Fix paths.

* op-e2e: Fix paths again

---------

Co-authored-by: Adrian Sutton <[email protected]>

* OPSM: miscellaneous fixes and improvements (#11935)

* chore: fix comment

* feat: add assertions

* fix: use method instead of new

* refactor: make salt into an input

* refactor: unify checkOutput function signatures

* chore: update snapshots

* test: fix testContractAuth

* test: fix checkOutput signatures

* fix: update go DeployImplementationsInput struct with salt

* pr feedback

* chore: semver lock

* Disable go patches for cannon MT (#11937)

* Disable go patches for cannon MT.

Fix the prestate file list for devnet to use the binary cannon MT prestates.

* Update Makefile

---------

Co-authored-by: Inphi <[email protected]>

* feat: Scaffolding for DeployAuthSystem Script (#11908)

* feat: Scaffolding for DeployAuthSystem Script

* feat: Remove redundant documentation

* Update DeployAuthSystem.s.sol

* op-batcher: Add String methods to txRef (#11904)

* feat: Rewrite FP contract distinctions as table (#11940)

* feat: Rewrite FP contract distinctions as table

* feat: clarify handling of non-MCP contracts

* feat: Update pending mcp statuses

* op-e2e: fix fuzz cgo build (#11941)

* maint: move WETH contract to correct folders (#11870)

Moves WETH98 over to the universal/ folder where it belongs and
brings DelayedWETH up to the top of the dispute folder since there
is no longer any need for a weth/ subfolder.

* dependabot(gomod): bump github.com/prometheus/client_golang (#11946)

Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.20.3 to 1.20.4.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.20.3...v1.20.4)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add L2 genesis generation support to `op-deployer` (#11938)

Adds support for generating L2 genesis files to `op-deployer. The L2 initialization config is generated by merging in overrides as specified in the intent into a default config with sane values. The outputted genesis file is stored in the stage as a GZIP-compressed, base64-encoded string.

* OPSM: DeployOPChain assertions (#11943)

* chore: add BaseDeployIO for the deploy input and output contracts

* test: add assertions to DeployOPChain

* chore: semver lock

* pr feedback

* feat: remove dgf impl from DeployOpChain and OPSM (#11942)

* fix: Remove `--l2-chain-id` default (#11951)

* feat: Add ASR proxy to OPStackManager (#11952)

* feat: Add ASR proxy to OPStackManager

* feat: Add AnchorStateRegistry blueprint

* ci: run slow Cannon test once per day (#11947)

Updates CI to run the (very) slow Cannon go-lint-and-test suite
once per day instead of running it on merge since it adds at least
5 minutes to CI.

* fix: move IERC20Solady into vendor folder (#11945)

An additional "dependency" folder was added in a recent PR, this
is the same purpose as the "vendor" folder so the interface added
in that PR can simply be moved to the "vendor" folder instead.

* ci: bump semgrep-scan to xlarge (#11948)

We're still having resource issues with a large image. Going to
bump this to xlarge to see if that will fix it.

* test: invariant tests for OptimismSuperchainERC20 (#11776)

* chore: configure medusa with basic supERC20 self-bridging (#19)

- used --foundry-compile-all to ensure the test contract under
  `test/properties` is compiled (otherwise it is not compiled and medusa
  crashes when it can't find it's compiled representation)
- set src,test,script to test/properties/medusa to not waste time
  compiling contracts that are not required for the medusa campaign
- used an atomic bridge, which doesnt allow for testing of several of
  the proposed invariants

fix: delete dead code
test: give the fuzzer a head start
docs: fix properties order
test: document & implement assertions 22, 23  and 24
fix: fixes from self-review
test: guide the fuzzer a little bit less
  previously: initial mint, bound on transfer amount: 146625 calls in 200s
  now: no initial mint, no bound on transfer amount: 176835 calls in 200s
  it doesn't seem to slow the fuzzer down
fix: fixes after lovely feedback by disco
docs: merge both documents and categorized properties by their milestone
fix: fixes from parti's review
fix: feedback from disco
fix: feedback from doc
refactor: separate state transitions from pure properties
docs: update tested properties
refactor: move all assertions into properties contract
fix: move function without assertions back into handler
test: only use assertion mode
fix: improve justfile recipie for medusa

* feat: halmos symbolic tests (#21)

* feat: introduce OptimismSuperchainERC20

* fix: contract fixes

* feat: add snapshots and semver

* test: add supports interface tests

* test: add invariant test

* feat: add parameters to the RelayERC20 event

* fix: typo

* fix: from param description

* fix: event signature and interface pragma

* feat: add initializer

* feat: use unstructured storage and OZ v5

* feat: update superchain erc20 interfaces

* fix: adapt storage to ERC7201

* test: add initializable OZ v5 test

* fix: invariant docs

* fix: ERC165 implementation

* test: improve superc20 invariant (#11)

* fix: gas snapshot

* chore: configure medusa with basic supERC20 self-bridging

- used --foundry-compile-all to ensure the test contract under
  `test/properties` is compiled (otherwise it is not compiled and medusa
  crashes when it can't find it's compiled representation)
- set src,test,script to test/properties/medusa to not waste time
  compiling contracts that are not required for the medusa campaign
- used an atomic bridge, which doesnt allow for testing of several of
  the proposed invariants

* fix: delete dead code

* test: give the fuzzer a head start

* feat: create suite for sybolic tests with halmos

* test: setup and 3 properties with symbolic tests

* chore: remove todo comment

* docs: fix properties order

* test: document & implement assertions 22, 23  and 24

* fix: fixes from self-review

* test: guide the fuzzer a little bit less

previously: initial mint, bound on transfer amount: 146625 calls in 200s
now: no initial mint, no bound on transfer amount: 176835 calls in 200s

it doesn't seem to slow the fuzzer down

* feat: add property for burn

* refactor: remove symbolic address on mint property

* refactor: order the tests based on the property id

* feat: checkpoint

* chore: set xdomain sender on failing test

* chore: enhance mocks

* Revert "Merge branch 'chore/setup-medusa' into feat/halmos-symbolic-tests"

This reverts commit 945d6b6ad265ea5e3790d7ac9c5bf4d6586eb533, reversing
changes made to 5dcb3a89252e9e8fa9b54ba9012e714f7cc96395.

* refactor: remove symbolic addresses to make all of the test work

* chore: remove console logs

* feat: add properties file

* chore: polish

* refactor: enhance test on property 7 using direct try catch (now works)

* fix: review comments

* refactor: add symbolic addresses on test functions

* feat: create halmos toml

* chore: polish test contract and mock

* chore: update property

* refactor: move symbolic folder into properties one

* feat: create advanced tests helper contract

* refactor: enhance tests using symbolic addresses instead of concrete ones

* chore: remove 0 property natspec

* feat: add halmos profile and just script

* chore: rename symbolic folder to halmos

* feat: add halmos commands to justfile

* chore: reorder assertions on one test

* refactor: complete test property seven

* chore: mark properties as completed

* chore: add halmos-cheatcodes dependency

* chore: rename advancedtest->halmosbase

* chore: minimize mocked messenger

* chore: delete empty halmos file

* chore: revert changes to medusa.json

* docs: update changes to PROPERTIES.md from base branch

* test: sendERC20 destination fix

* chore: natspec fixes

---------

Co-authored-by: agusduha <[email protected]>
Co-authored-by: 0xng <[email protected]>
Co-authored-by: teddy <[email protected]>

* test: remaining protocol properties (#26)

* test: cross-user fuzzed bridges + actor setup

* test: fuzz properties 8 and 9

* test: properties 7 and 25

* fix: implement doc's feedback

* test: superc20 tob properties (#27)

* chore: add crytic/properties dependency

* test: extend protocol properties so it also covers ToB erc20 properties

* chore: small linter fixes

* docs: update property list

* test: handlers for remaining superc20 state transitions

* fix: disable ToB properties we are not using and guide the fuzzer a bit more

* fix: disable another ToB property not implemented by solady

* chore: remove zero-initializations

* fix: feedback from disco

* chore: separate fuzz campaign tests in guided vs unguided

* test: dont revert on successful unguided relay

* test: add fuzzed calls to burn and mint

* docs: document the separation of fuzz test functions

* chore: move the properties file to its own directory

* chore: consistently use fuzz_ and property_ + camelcase

* chore: fix typo

* chore: camelcase for handlers as well

* fix: revert change that broke halmos campaign compile :D

* test: fuzz non atomic bridging (#31)

* test: changed mocked messenger ABI for message sending but kept assertions the same

* docs: add new properties 26&27

* test: queue cross-chain messages and test related properties

* test: relay random messages from queue and check associated invariants

* chore: rename bridge->senderc20 method for consistency with relayerc20

* test: not-yet-deployed supertokens can get funds sent to them

* chore: medusa runs forever by default

doable since it also handles SIGINTs gracefully

* chore: document the reason behind relay zero and send zero inconsistencies

* fix: feedback from doc

* fix: walk around possible medusa issue

I'm getting an 'unknown opcode 0x4e' in ProtocolAtomic constructor when
calling the MockL2ToL2CrossDomainMessenger for the first time

* test: unguided handler for sendERC20

* fix: feedback from disco

* chore: remove halmos testsuite

* chore: foundry migration (#40)

* chore: track assertion failures

this is so foundry's invariant contract can check that an assertion
returned false in the handler, while still allowing `fail_on_revert =
false` so we can still take full advantage of medusa's fuzzer & coverage
reports

* fix: explicitly skip duplicate supertoken deployments

* chore: remove duplicated PROPERTIES.md file

* chore: expose data to foundry's external invariant checker

* test: run medusa fuzzing campaign from within foundry

* fix: eagerly check for duplicate deployments

* fix: feedback from doc

* chore: shoehorn medusa campaign into foundry dir structure

* chore: remove PROPERTIES.md file

* chore: delete medusa config

* docs: limited support for subdirectories in test/invariant

* chore: rename contracts to be more sneaky about medusa

* docs: rewrite invariant docs in a way compliant with autogen scripts

* chore: fixes from rebase

* fix: cleanup superc20 invariants (#46)

* chore: revert modifications from medusa campaign

* docs: extra docs on why ForTest contract is required

* doc: add list of all supertoken properties

* chore: run forge fmt

* ci: allow for testfiles to be deleted

* fix: run doc autogen script after rebase

---------

Co-authored-by: Disco <[email protected]>
Co-authored-by: agusduha <[email protected]>
Co-authored-by: 0xng <[email protected]>

* ci: job to check contracts build warnings (#11962)

Adds a new compiler job to check for contract build warnings.
Other existing build jobs don't compile the entire set of contracts
and we do want to be able to check for warnings across the board.

* ci: simplify contract build job inputs (#11965)

Simplifies the inputs to contracts-bedrock-build so that it
takes a single skip_pattern command instead of allowing the user
to specify any build command.

* ci: clean up golang job definitions (#11967)

Cleans up a number of golang job definitions. One PR for now
just so I can see this all work.

* ci: fix config error in cannon tests (#11969)

Fixes a configuration error in the scheduled-cannon-full-tests
job.

* op-node: lazy-dial the supervisor RPC (#11970)

* ci: simplify contracts bedrock tests job (#11966)

Simplifies the contracts-bedrock-tests job so that it takes more
parameters but makes the test command unified. Also replaces the
complex script for checking for modified fuzz tests and simply
heavily fuzzes all tests within any test files that have changed.

* ci: misc cleanups and simplifications (#11968)

Cleanups in a few places, removing unused jobs, etc.

* correct the comment (#11971)

* update op-e2e setup (#11857)

* fix: multiple fuzz flakes (#11981)

Fixes a couple of fuzz flakes that were found when fuzzing
heavily.

* maint: add interfaces for L2 bridge/messaging contracts (#11859)

First PR for adding interfaces for L2 contracts. Adds interfaces
for all of the bridging and message passing contracts.

* chore(op-service): use `errors.New` to replace `fmt.Errorf` with no parameters (#11796)

* fix(ci): semgrep cli breaking change (#11985)

Semgrep CLI tool recently removed the --time option which caused
CI to suddenly break.

* ci: correct perms for tag-service.yml (#11961)

GITHUB_TOKEN no longer gets write access by default so it needs to
be provided with write access explicitly.

* Add inspection commands, fix deployer bugs (#11964)

Adds `op-deployer inspection *` commands to expose the generated genesis and rollup configs via the CLI or Golang libraries. Also fixes a bug in deployment - I accidentally deleted the code that set the deployer nonce, so live chain deployments were reverting.

* refactor: Rename OPSM to OPSMProxy for clarity (#11972)

* chore(rename): Rename opsm to opsmProxy

* fix: Go bindings updated for proxy.

* fix: linting

* fix: pr comment nits.

* feat(op-e2e): Open channel closed after sequence window expiry test (#11993)

* feat(op-e2e): Open channel closed after sequence window expiry test

Adds a test to the proof actions that proves a block at the safe head
after the batcher has opened a channel, allowed the sequence window to
expire, and then attempted to close their open channel after the fact.

* buffer frame

* include extra tx

* feat(op-e2e): Channel timeout late submission test (#11995)

* feat(op-e2e): Channel timeout late submission test

* remove finalization of l1 chain

* ci: separate invariant runs from fuzz runs (#11982)

Using 10k invariant runs would be ridiculously slow.

* ci: Restore ci-builder docker release and remove invalid op-challenger-big-docker-release (#11997)

* maint(ci): clean up release job (#11996)

Cleans up the release job by turning it into a matrix.

* maint(ci): clean up scheduled docker publish (#11999)

Same idea again, cleaning up the scheduled docker publish with the
same technique as the previous PR.

* OPSM: More assertions (#11994)

* refactor: rename var for clarity

* test: add more assertions from ChainAssertions, and some new ones

* chore: ensure unique, clear, consistent revert string IDs

also sorts methods alphabetically for clarity

* fix: var name after rebase

* style: forge fmt

* revert proxyAdmin -> superchainProxyAdmin name change for now

* Update packages/contracts-bedrock/scripts/DeployImplementations.s.sol

Co-authored-by: Maurelian <[email protected]>

* chore: small tweaks from pr feedback

---------

Co-authored-by: Maurelian <[email protected]>

* op-challenger: Support MT-Cannon in run-trace (#11934)

* op-challenger: Support MT-Cannon in run-trace

* ..

* fix multi_test.go

* annotate metrics with mt-cannon

* preserve prestate encoding; use separate dir for mt-cannon

* Update op-challenger/cmd/run_trace.go

Co-authored-by: Adrian Sutton <[email protected]>

---------

Co-authored-by: Adrian Sutton <[email protected]>

* feat: add remaining L2 interfaces (#11984)

One more PR for adding L2 interfaces.

* feat: clean up TODOs and add CI check (#12005)

* maint: clean up TODO tags

Cleans up existing TODO tags, particularly those that referenced
old Linear issues. Updates the todo-checker script to allow
<#issue> as well as <issue>.

* feat(ci): add todo-issues check to main CI

Updates the main CI workflow to run the todo-issues check. For
now this check will ignore any bare TODOs. We can update the
script later to reject bare TODOs.

* contracts: Add more MIPS2 tests (#12003)

* contracts: Add more MIPS2 tests

* remove unused var

* cannon: Clean up fuzz test todos (#12009)

* cannon: Add memory assertions to FuzzStatePreimageRead

* cannon: Rework hint write fuzz test to assert hint expectations

* cannon: Update FuzzStatePreimageWrite to assert on expected preimageKey

* cannon: Remove validation skipping logic from test util

* cannon: Cleanup - simplify code

* cannon: Cleanup - dedupe code

* cannon: Clean up program patching (#11944)

* cannon: Cut todo, reorganize syscalls

* cannon: Rename patchGo to patchGoGC, add comments, cut TODO

* cannon: Only allow gc patching for single-threaded Cannon

* cannon: Cut patch flag from load-elf command altogether

* feat(ci): check contract semver matches natspec (#11992)

Adds a new check to CI that verifies that the semver string
defined in the contract matches the string defined in natspec.

* maint(ct): link to external mermaid diagrams in specs (#12012)

Updates the contracts README to use the mermaid diagrams in specs
to avoid duplicated documentation.

* op-program: Reproducible MT-Cannon prestate (#12011)

* op-program: Reproducible MT-Cannon prestate

* fix mt-cannon proof gen

* cannon: Fix makefile phony target (#12014)

* maint(ci): remove autogenerated invariant docs (#11988)

Removes autogenerated invariant docs from the contracts package.
These autogenerated docs create confusion about where invariants
should be defined (the answer is in the specs) and no one actually
looks at them anyway. Just adds an additional step into CI for
minimal benefit.

* vm-runner: User-provided mt-cannon absolute prestate URL (#12016)

* vm-runner: User-provided mt-cannon absolute prestate URL

* placate semgrep

* maint: fix dispute interfaces (#12010)

Fixes the existing dispute interfaces and makes them match the
same style that we're using for all other interfaces.

* op-challenger: Use a wrapper to specify the vm type for metrics (#12020)

* op-challenger: Use a wrapper to specify the vm type for metrics

Decouples the vm type from the trace type to give the run-trace subcommand more flexibility, allowing it to report separate metrics for cannon and mt-cannon.

Also adjust the run-trace loggers to consistently use `mt-cannon` as the type.

* Use constant.

Co-authored-by: Inphi <[email protected]>

---------

Co-authored-by: Inphi <[email protected]>

* SuperSystem: Add Emitter Contract - Basic Message Passing (#11956)

* Add Emitter Contract

* Emitter Contract and Bindings

* AddL2RPC without Stopping

* Rename testdata folder to contracts

* update generate.sh

* update solidity and gen script

* Update kurtosis library. (#12025)

CI is automatically using the latest version which has broken things. Update to match as a temporary fix until we can install a fixed versio…
Troublor pushed a commit to megaeth-labs/optimism that referenced this pull request Nov 28, 2024
* feat(op-program): Use `PebbleDB` for `DiskKV` (#11705)

* feat(op-program): Use `PebbleDB` for `DiskKV`

* close db

* fix `testFaultProofProgramScenario` tests

* switch to snappy compression

https://github.com/cockroachdb/pebble/issues/3434

* fix tempdir

* update compat release

* defer k/v until preimage server and hinter have both exited

* Revert "feat(op-program): Use `PebbleDB` for `DiskKV` (#11705)" (#11707)

This reverts commit 8ab4d3d8e20f69464d9f5191c110b63f4d5a3df6.

* op-service/txmgr: multiple fixes / improvements (#11614)

* - make immediate nonce-too-low error abort send (since it could never succeed otherwise)

- make txmgr resubmit a transaction when fee bumping fails in case it has been dropped from the mempool

- only bump fees when they really should be bumped

- set txmgr overall default send timeout of 10 minutes. It was infinite, which led to permanently
  stuck transaction in combination with the other bugs fixed in this PR.

* Update op-service/txmgr/txmgr_test.go

---------

Co-authored-by: Sebastian Stammler <[email protected]>

* chore(op-service): Remove `reth` receipts source (#11706)

* fix: op-challenger move.go cli command wasn't cancellable (#11716)

* feat: add ERC-5202 Blueprint library with initial tests (#11700)

https://eips.ethereum.org/EIPS/eip-5202

* chore: Fix lint error (#11714)

golangci-lint v1.60.2 seems to report a new error when performing a nil check and length != 0 on maps. We're not using this version in CI yet but fix the error to simplify the code and provide for a future upgrade.

* maint: no kontrol summaries in PRs (#11725)

Removes the need for kontrol summaries to be generated at PR time.
Summaries will now be generated during run-kontrol.sh instead.

* feat: check interface differences in CI (#11677)

Adds a new check script to contracts-bedrock that verifies that
interfaces being added to the repository accurately represent
the interface of the contract that the interface was generated
for.

* add comment to SingularBatch.Timestamp (#11720)

* op-program: Use PebbleDB for DiskKV (Reapply with fixes) (#11709)

* feat(op-program): Use `PebbleDB` for `DiskKV` (#11705)

* feat(op-program): Use `PebbleDB` for `DiskKV`

* close db

* fix `testFaultProofProgramScenario` tests

* switch to snappy compression

https://github.com/cockroachdb/pebble/issues/3434

* fix tempdir

* update compat release

* defer k/v until preimage server and hinter have both exited

* Only open preimage source when actually needing preimages.

Avoids concurrent access to the pebbledb.

* op-program: Handle interrupts in host

Ensures the preimage kv store is closed cleanly even when the process is sent an interrupt signal.
Enables non-blocking IO so that read calls return io.EOF when a file handle is closed rather than blocking forever.

* op-program: Restore file based kv store. Add pebble as an additional option.

* op-program: Add option to specify KV store format to use

* op-program: Switch pebble to perform sync writes.

* op-program: Rename disk kv to file kv

* op-program: Rename DBFormat to DataFormat for consistency.

---------

Co-authored-by: clabby <[email protected]>

* fix: SuperchainWETH fuzz flake with bad sender (#11728)

Fixes a number of places where SuperchainWETH fuzz tests can flake
as a result of using a sender address that is the ETHLiquidity or
SuperchainWETH contract.

* Fix copy-paste typo (#11731)

* maint: add interfaces for legacy contracts (#11625)

Adds interfaces for the contracts inside of /legacy. Interface is
not included for the LegacyMintableERC20 contract because that
interface has already been defined elsewhere.

* Slim down contracts-bedrock package (#11723)

* Slim down contracts-bedrock package

The contracts-bedrock package was over 2GB in size, mostly because it contained the Git repository. It also supported multiple platforms, which would lead to costly recompilation steps every time the image was used on a different platform (e.g., OSX).

The PR updates the Dockerfile to no longer ship the Git repo. It also updates the Debian base image to a more modern, slimmed down version. The new image is <1G in size.

* fix bakefile

* fix: properly check all interfaces (#11734)

Interfaces check script had a bug that would cause it to use the
wrong ABI when checking an interface. Each compiler artifact only
has a single ABI in it but this same ABI was being used for all
contract definitions found within that file. Since each separate
contract definition gets its own file anyway, this script now
properly verifies by finding the specific definition that matches
the filename.

* feat: update interface validation script to check semver (#11740)

Updates the interface validation script to verify that all
interface contracts are using Solidity ^0.8.0 exactly.

* challenger: Introduce StateConverter to abstract loading VM states (#11715)

* fix: flake tests (#11742)

* fix: add optimism mintable check on assume address helper

* fix: mock interfaces checks

* chore: remove unused import

---------

Co-authored-by: 0xng <[email protected]>

* repo: bump foundry (#11746)

Bumps foundry to the following commit: https://github.com/foundry-rs/foundry/commit/143abd6a768eeb52a5785240b763d72a56987b4a

Release: https://github.com/foundry-rs/foundry/releases/tag/nightly

This needs to be followed up with a rebuild of `ci-builder`

* Revert "challenger: Introduce StateConverter to abstract loading VM states (#…" (#11747)

This reverts commit 3410109155ae75915ff95dc0a1995ac0d3cac8b5.

* cannon: Run expensive tests in parallel (#11739)

* op-node: sequencer should clear inconsistent asyncGossip buffer on sequencer-start (#11724)

* op-node: sequencer should clear inconsistent asyncGossip buffer on sequencer-start

* op-node: test async-gossip clearing

* Update op-node/rollup/sequencing/sequencer.go

Co-authored-by: Adrian Sutton <[email protected]>

---------

Co-authored-by: Adrian Sutton <[email protected]>

* Reapply "challenger: Introduce StateConverter to abstract loading VM states" (#11752)

With fix to set a state converter when creating trace providers for test.

* contracts-bedrock: Add OPSM file I/O for superchain deployments (#11750)

* contracts-bedrock: Add OPSM file I/O for superchain deployments

* Update packages/contracts-bedrock/scripts/DeploySuperchain.s.sol

Co-authored-by: Matt Solomon <[email protected]>

* Update packages/contracts-bedrock/test/DeploySuperchain.t.sol

Co-authored-by: Matt Solomon <[email protected]>

* Address feedback from code review

* Linter

---------

Co-authored-by: Matt Solomon <[email protected]>

* maint: update solidity vscode extension (#11751)

* op-conductor: adds raft log snapshot configs (#11745)

* Refactors NewRaftConsensus param list into a config struct
* Adds configuration support for SnapshotInterval, SnapshotThreshold, TrailingLogs

* fix: initialization tests (#11674)

Fixes the initialization tests, existing tests were not properly
verifying that all of the initializable contracts were being
accounted for.

* Update VERSIONING.md (#11761)

* Fix contracts-bedrock-docker-publish build (#11755)

The build stage name was accidentally removed, which [broke](https://app.circleci.com/pipelines/github/ethereum-optimism/optimism/63237/workflows/e6a2d738-132f-4e10-9da2-c265b364c771/jobs/2627291) the job.

* op-node: op-node interop block verification (devnet-1 scope) (#11611)

* op-node: experimental interop block verification

* op-node: supervisor RPC init

* op-e2e/actions: test interop safety checks

* op-e2e/op-node: test fixes

* op-node: update comments

* op-node: unit-test interop deriver, trigger cross-safe updates on driver step, to poll for supervisor safety changes

* op-node: add more comments, fix flag description

* op-e2e: fix rebase, add missing argument

* cannon: Support binary serialisation for snapshots (#11718)

* cannon: Add serialize utils for binary formats and automatic binary/json detection.

* cannon: Support reading and writing states as binary or JSON

* cannon: Generate mt prestate as gzipped binary.

Use different versions for singlethreaded and multithreaded states.

* cannon: Improve comments for serialization

* cannon: Review feedback

* cannon: Introduce reader and writer helpers to simplify code.

* op-node: sanity-check the forkchoice updates (#11780)

* Use local logger in data source (#11756)

There may be other places where a global logger is used, but this instance is particularly important because one message warns the user of a misconfiguration that otherwise manifests in a seemingly unrelated bug (rollbacks on unsafe block consolidation).

* fix: small typo fixes to DeploySuperchain.s.sol. (#11758)

* fix: small typo fixes to DeploySuperchain.s.sol.

* fix: semgrep Javadoc-style comments are not allowed.

* style: remove extra space

---------

Co-authored-by: Matt Solomon <[email protected]>

* cannon: Port audit fixes (#11697)

* cannon: Require boolean exited field to be encoded as 0 or 1

* cannon: Port mmap solidity tests for MTCannon

* cannon: Port srav solidity tests

* cannon: Run semver-lock, snapshot tasks

* cannon: Cut extra validation on thread.exited

* cannon: Run semver lock

* cannon: Update IMIPS2 interface

* ci: pull cached artifacts for contracts tests (#11771)

Contracts tests don't need to recompile if we can just use the
artifacts instead.

* test: more blueprint tests (#11782)

* test: more blueprint tests

* address PR feedback

* op-chain-ops: prep / utils for interop genesis work (#11790)

* Add Maintenance Trigger for Cascading Updates (#11619)

* Update and cleanup CODEOWNERS with expert teams (#11786)

* Catch 'header not found' string in L2BlockRefByLabel (#11759)

* ci: speed up CI by up to 50% (#11794)

Introduces a number of improvements to CI that significantly
reduce overal CI time by up to 50% of the previous time.

* dependabot(gomod): bump github.com/prometheus/client_golang (#11764)

Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.20.2 to 1.20.3.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/v1.20.3/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.20.2...v1.20.3)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(challenger): `asterisc-kona` trace type (#11789)

* dependabot(gomod): bump golang.org/x/crypto from 0.26.0 to 0.27.0 (#11765)

* dependabot(gomod): bump golang.org/x/crypto from 0.26.0 to 0.27.0

Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.26.0 to 0.27.0.
- [Commits](https://github.com/golang/crypto/compare/v0.26.0...v0.27.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* deps: update

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mark Tyneway <[email protected]>

* Add Admin RPC for Adding New Chain Monitors (#11792)

* Add Admin RPC for Adding New Chain Monitors

* Update op-supervisor/supervisor/backend/db/db.go

---------

Co-authored-by: protolambda <[email protected]>

* semgrep: try to fix CI timeout (#11798)

* maint: move existing interfaces to folders (#11749)

Moves any existing interfaces that are not already inside of
their corresponding /interfaces folders into those folders.

* op-challenger: Support binary and JSON snapshots (#11754)

* op-challenger: Support loading json or binary cannon states.

* op-challenger: Use binary cannon snapshots

* op-challenger: Support downloading prestates in multiple formats.

* op-challenger: Verify newly downloaded snapshots.

* op-e2e: Update test to handle binary snapshots correctly.

* op-e2e: Remove unused parameter

* op-challenger: Add more varied data to the test cannon state.

* op-challenger: Add more varied data to the test cannon state.

* Remove hardcoded entrypoint (#11801)

Removes the `ENTRYPOINT` directive in the `contracts-bedrock` image. While convenient, using `ENTRYPOINT` makes building tooling on top of the image much harder since the entrypoint cannot be overridden without providing special flags to Docker. It is easier to use a dummy `CMD` instead that directs users to call specific tools when running the container. Functionally, this means users will run `docker run just <cmd>` instead of `docker run <cmd>` if they want to use the Justfile.

* Allow cheatcodes on DeploySuperchain.s.sol (#11802)

We need to add these calls otherwise calling `DeploySuperchain.s.sol` as a script with input/output files fails.

* op-program: Add recent op-program versions to reproducibility check (#11560)

* op-program: Add recent op-program versions to reproducibility check

* Add 1.3.1-rc.2

* ci: update contracts tests to split by file (#11797)

Contracts tests were being split by test name which meant that
Circle CI wouldn't be able to (eventually) be able to properly
split these files by timings. Updates the CI job to split by
file instead.

* fix `ReadPreimage` (#11805)

* avoid out of bound for TrackingPreimageOracleReader.ReadPreimage

* use p.GetPreimage

* op-program: Add a script to build cannon prestates for all tagged op-program releases. (#11559)

* op-dispute-mon: Identify unclaimed credits based on the withdrawal request timestamp (#11488)

* cannon: Fix path used when verifying a downloaded state (#11813)

* op-service: Make target destination when writing JSON/binary explicit (#11800)

Avoids being surprised by the special handling for - and empty string output paths.

* maint: add interface for L2OutputOracle (#11817)

First in a series of PRs adding interfaces for L2 contracts. Since
each of these changes involves touching a lot of other contracts
it seemed easier to split this up into several PRs for legibility.

* cannon: Autodetect VM type from state (#11803)

* cannon: Autodetect VM type from state in run command

* cannon: Autodetect VM type from state in witness command

* cannon: Remove vm type flag from run and witness

* cannon: Only peek the version byte

* cannon: Move all version handling to VersionedState, simplify a lot and forbid serializing multithreaded states to JSON

* cannon: Rename method

* op-challenger: Update cannon state parsing to use version detecting methods

* cannon: Move CreateVM to FPVMState for simplicity

Test read/write/create for VersionedState

* cannon: Readd detect_test

* cannon: Remove json names from multithreaded.State.

Multithreaded states always use binary serialization.

* cannon: Move vmtype to load_elf since it is no longer shared.

* cannon: Ensure metadata is available and sleepCheck used even if debug is disabled.

* op-challenger: Update canon state loading test to cover multiple state versions.

* op-challenger: Release agent resources once game is complete (#11820)

* Fix race condition in sequencer stopping logic (#11769)

* Fix race condition in sequencer stopping logic

* Add channel to signal that latestHead has been updated

* Fix test

* Store latest sealed separately, as latest gets cleared by engine.PayloadSuccessEvent

* Cleanup tests

* Add assertions on latest block ref variables

* Re-check if sequencer is active

* feat: Add nested directory data format for op-program kvstore (#11795)

* feat: Add nested directory data format for op-program kvstore

* Review feedback: Update error message

Co-authored-by: Adrian Sutton <[email protected]>

* op-program: Make directory preimage format the default.

---------

Co-authored-by: Adrian Sutton <[email protected]>
Co-authored-by: Adrian Sutton <[email protected]>

* Revert "op-program: Make directory preimage format the default." (#11823)

* Add broadcast API to Go forge scripts (#11826)

* Add broadcast API to Go forge scripts

Adds a hooks-based API to collect transactions broadcasted via `vm.broadcast(*)` in the Go-based Forge scripts. Users pass an `OnBroadcast` hook to the host, which will be called with a `Broadcast` struct with the following fields whenever a transaction needs to be emitted:

```go
type Broadcast struct {
	From     common.Address
	To       common.Address
	Calldata []byte
	Value    *big.Int
}
```

This API lets us layer on custom transaction management in the future which will be helpful for `op-deployer`.

As part of this PR, I changed the internal `callStack` data structure to contain pointers to `CallFrame`s rather than passing by value. I discovered a bug where the pranked sender was not being cleared in subsequent calls due to an ineffectual assignment error. I took a look at the implementation and there are many places where assignments to call frames within the stack happen after converting the value to a reference, so converting the stack to store pointers in the first place both simplified the code and eliminated a class of errors in the future. I updated the public API methods to return copies of the internal structs to prevent accidental mutation.

* Code review updates

* moar review updates

* fix bug with staticcall

* fix(op-batcher): initAltDA before initChannelConfig (#11816)

* fix(op-batcher): initAltDA before initChannelConfig

* chore(op-bastcher): fix comment

* op-node: read DACommitmentType from scr in LoadOPStackRollupConfig (#11830)

* op-node: read DACommitmentType from scr in LoadOPStackRollupConfig

* op-node: check for altda nil pointers before dereferencing

* op-node: leave altDA config nil if not existent in scr config

* OPSM: Begin implementing OP Stack Manager code and it's deployment (#11623)

* begin supporting specifying versions in OPSM

* add deploy logic

* deploy OPSM along with implementations

* scaffold opsm interface between scripts

* fixes

* mvp of DeployOPChain

* start working on an e2e opsm test, currently reverts

* fix tests

* test cleanup

* rename opsmSingleton to opsm

* chore: remove unused imports

* refactor: switch from 'new' to blueprints, 50% code size reduction

* fix semgrep

* feat: add OPSM interop tests

* test: add missing specs

* add DisputeGameFactory deployment

* chore: update snapshots

* fix opsm interop support

* chore: update snapshots

* Update packages/contracts-bedrock/test/DeployOPChain.t.sol

* fix: add L1StandardBridge setter and initialization

* chore: small clarification of deploy flow

* Update packages/contracts-bedrock/scripts/DeployImplementations.s.sol

Co-authored-by: Blaine Malone <[email protected]>

* chore: add todos

* fix: change bytes32 to string

* rename addrs to opChainAddrs for clarity

* test: fix assertion string numbering

* chore: update semver lock:

---------

Co-authored-by: Blaine Malone <[email protected]>

* op-chain-ops: fix Go forge script broadcast handling (#11832)

* fix: OptimismPortal fuzz flakes (#11818)

OptimismPortal fuzz tests were flaking because the base fee would
increase so much that there wouldn't be enough gas to burn for the
user to be able to buy the gas that they want. Introduces an
additional assumption that will prevent the elasticity multiplier
and max change denominator from being such that the maximum
change to the base fee won't cause us to run out of gas.

* cannon: Fix jalr stack tracking (#11831)

* ci: make semgrep-scan use a large docker image (#11834)

semgrep-scan kept failing with a medium docker image with 4g RAM.
Updating this image to large seems to fix the issue.

* maint: clarify interface fixes are manual (#11835)

* feat: ban deposits interop (#11712)

* interop: disable interop messages in force-deposits

Co-authored-by: Disco <[email protected]>

* interop: clean up config helpers

* op-node: fix/improve L1 info tx tests

* op-node: fix attributes test

* op-node: fix sequence-number usage in post-interop system deposit, fix tests

* op-contracts: L1Block interop: fix diff, remove duplicate test from renaming

* contracts: update metadata

* contracts: fix build warnings

* contracts: fix interface build

* script: ignore

* lint: fix

* test: .testdata directory

* tests: fix revert

---------

Co-authored-by: Disco <[email protected]>
Co-authored-by: protolambda <[email protected]>
Co-authored-by: Mark Tyneway <[email protected]>

* Improvements/bugfixes to Go forge scripts (#11838)

* Improvements/bugfixes to Go forge scripts

Adds some improvements to the Go forge scripts:

- Adds a `GasUsed` field to the `Broadcast` struct so that transaction broadcast utilities can use it for gas estimation. Gas estimation using the RPC will fail when sending transactions in parallel since the state can change significantly between calls.
- Fixes a bug in the `vm.broadcast` cheatcode where sender nonce were not increased for `vm.CALL`s. This led to a mismatch between the contract addresses generated by the Forge tooling, and what was actually being generated onchain.

* op-chain-ops: isolate broadcast functionality

* review updates

* wrap in broadcast check

* Add nonce tests

* Update op-chain-ops/script/script.go

Co-authored-by: protolambda <[email protected]>

* Fix test

* op-chain-ops: track broadcast nonce, add sanity checks

---------

Co-authored-by: protolambda <[email protected]>

* OPSM: remove structs from `DeploySuperchain` (#11833)

* refactor: remove structs from DeploySuperchainInput and DeploySuperchainOutput

* test: fix tests

* test: fix test

* chore: remove outdated struct references

* pr feedback

* chore: code comments

* maint: add more L1 interfaces (#11822)

Another PR adding contract interfaces. L1 contract interfaces are
way more involved than everything else so we're required to start
replacing the contracts with interfaces all over the place.

* ci: selectively build contracts (#11824)

Updates the contracts-bedrock-tests job to only build the specific
tests that are being tested as part of the test split for that
job. Also merges the other contracts-bedrock-build with
build-devnet-allocs since this is a bottleneck now. Overall impact
is that CI time is now 7-10 minutes.

* Add entrypoint to deploy against existing Superchain (#11791)

* Add entrypoint to deploy against existing Superchain

Creates a separate entrypoint in the deploy script to allow an L2 to be deployed against an existing set of Superchain contracts. The deployment assumes that the Superchain contracts have been deployed correctly. The L2 still gets its own ProxyAdmin, AddressManager, and Safe. The API is additive and backwards-compatible.

* Update packages/contracts-bedrock/scripts/deploy/Deploy.s.sol

Co-authored-by: Maurelian <[email protected]>

* remove redundant call

---------

Co-authored-by: Maurelian <[email protected]>

* test: fix test and variable naming conventions (#11845)

* feat: concurrent alt-da requests (#11698)

* feat: initial goroutine blob submission implementation

test(batcher): add e2e test for concurrent altda requests

doc: add explanation comment for FakeDAServer

chore: fix if condition in altda sendTransaction path

feat: add maxConcurrentDaRequests config flag + semaphore

refactor: batcher to use errgroup for da instead of separate semaphore/waitgroup

fix: nil pointer bug after using wrong function after rebase

fix: defn of maxConcurrentDaRequests=0

fix: TestBatcherConcurrentAltDARequests

chore: remove unneeded if statement around time.Sleep

refactor: use TryGo instead of Go to make logic local and easier to read

chore: clean up some comments in batcher

chore: make batcher shutdown cancel pending altda requests by using shutdownCtx instead of killCtx

* chore(batcher): make altda wg wait + log only when useAltDa is true

* refactor: batcher altda submission code into its own function

* test: refactor batcher e2e test to only count batcher txs

* chore: log errors from wait functions

* chore: refactor and minimize time that e2e batcher system tests can run

* chore: lower timeout duration in test

* fix(batcher): maxConcurentDARequests was not being initialized

* feat: run extra fuzz rounds for new fuzz tests (#11748)

Adds a new script that can run extra fuzz test iterations when
new fuzz tests are added. Can be used in CI or locally to make
sure that new fuzz tests aren't flaky.

* Release op-contracts/v1.6.0 (#11760)

* op-contracts/v1.6.0-rc.1 release (#11528)

* Fix deploy-config absolute prestate

* chore: update semver-lock

---------

Co-authored-by: smartcontracts <[email protected]>
Co-authored-by: Kelvin Fichter <[email protected]>

* proofs Add a proofs-tools docker image  (#11825)

* op-challenger: Add a "big" op-challenger docker image including asterisc and kona

* proofs-tools: Rename op-challenger-deps to proofs-tools and use tagged asterisc and kona sources.

* proofs-tools: Use more recent version of challenger for testing

* proofs-tools: Remove TODO

* proofs-tools: Only build for amd64 - kona doesn't support arm64.

* proofs-tools: Add README

* proofs-tools: Use challenger v1.1.0

* maint: add remaining L1 contract interfaces (#11848)

Adds interfaces for all remaining L1 contracts. L2 contracts are
next!

* feat: Run `op-program` in `op-e2e` action tests (#11846)

* feat: Run `op-program` in `op-e2e` action tests

* configurable forks

* golint / op-program test

* use correct endpoint

* fix: add IBeacon to interface check ignore (#11860)

IBeacon should've thrown an error but didn't, need to investigate
why that was the case. For now I've added it to the ignore list.

* proofs-tools: Fix circleci config to run hold job on proofs-tools release tags (#11856)

* maint: add comment to OptimismPortal2 proof submitters mapping (#11853)

Adds a comment to OptimismPortal2 that further explains the
proofSubmitters mapping.

* fix: add extra context to check interfaces script logs (#11861)

Updates the output of the check-interfaces script to be more clear
about cases when removing items from the EXCLUDE_CONTRACTS list is
acceptable and how to verify that an item is unnecessary.

* feat: Helper for dumping `fp-tests` fixtures in `op-program` action tests (#11855)

* feat: Helper for dumping `fp-tests` fixtures in `op-program` action tests

* adrian review

* proofs-tools: Update ci-docker-tag-op-stack-release.sh regex (#11862)

* chore: export process frames (#11864)

* chore: Cleanup proofs actions (#11858)

* chore: Cleanup proofs actions

* tidy

* lint

* adrian review

* move `RunFaultProofProgram` onto the `L2FaultProofEnv` type

* proofs-tools: Include openssl and certs (#11865)

* cannon: Fix GC emulation of Go programs (#11704)

* cannon: Fix GC emulation of Go programs

Improves Linux/MIPS32 emulation for Go programs that utilize the garbage
collector and goroutine scheduling.

This adds support for the following syscalls:

- getpid - used by the go scheduler
- clock_gettime - used by the go scheduler and for GC assists and to properly emulate
  time related operations such as `time.Sleep`.

Note on GC assists:

The Go GC relies on `clock_gettime` for GC "assists", whereby a mutator can perform a little bit
of GC without waiting for the scheduler to do so.
A monotonic clock (runtime.nanotime) is used to compute the current goroutine's compute budget.
By modeling a MIPS32 CPU that runs at some clock speed (ex: 10 MHz), we can provide a consistent
emulation of monotonic time needed by the Go runtime.
All other clock_gettime flags are handled as unimplemented syscalls.

* fix unsupported syscalls test

* fix some review comments

* address review comments

* update snapshots

* fuzz invalid memory proof

* reduce test runtime

* tweak realtime emulation

* reduce test runtime

* set a high timeout for heavy fuzz tests

* simplify fuzz

* fix heavy tests

* Fix the error usage in cannon (#11368)

* chore(op-program): Turn off `fsync` on pebble KV store (#11863)

* chore: Cleanup proofs actions

* tidy

* lint

* adrian review

* move `RunFaultProofProgram` onto the `L2FaultProofEnv` type

* chore(op-program): Turn off `fsync` on pebble KV store

* Add SendAsync to TxMgr (#11843)

* Add SendAsync to TxMgr

Adds a SendAsync method to TxMgr. I'd like to use this for `op-deployer`, which needs to send multiple transactions in parallel but with predictable nonces. `SendAsync` returns a channel that resolves with the result of each send, but synchronously increases the nonce and prepares the first send prior to returning.

* review updates + tests

* feat: introduce OptimismSuperchainERC20Factory (#11617)

* test: add L2 standard bridge interop unit tests (#13)

* test: add L2 standard bridge interop unit tests

* fix: add tests natspec

* fix: unit tests fixes

* fix: super to legacy tests failing

* fix: mock and expect mint and burn

* fix: add generic factory interface (#14)

* test: add L2 standard bridge interop unit tests

* fix: add tests natspec

* fix: add generic factory interface

* feat: modify OptimismMintableERC20Factory for convert (#17)

* test: add L2 standard bridge interop unit tests

* fix: add tests natspec

* fix: add generic factory interface

* feat: modify OptimismMintableERC20Factory for convert

* fix: use only a public function for create3

* feat: rollback interop factory, modify legacy one

* fix: delete local token return variable

* fix: PR fixes

* feat: add superchain erc20 factory implementation (#23)

* feat: add superchain erc20 factory implementation

* fix: remove createX comments

* test: add superchain erc20 factory tests (#25)

* test: add superchain erc20 factory tests

* test: add erc20 asserts

* test: fix expect emit

* fix: remove comments

* feat: add constructor to superchain ERC20 beacon (#34)

* test: remove factory predeploy etch

----------

Co-authored-by: 0xng <[email protected]>
Co-authored-by: 0xParticle <[email protected]>
Co-authored-by: gotzenx <[email protected]>

* fix: set an arbitrary address for superchain erc20 impl

* fix: deploy a proxy for the beacon on genesis (#45)


---------

Co-authored-by: 0xng <[email protected]>

* fix: conflicts and imports

* fix: interfaces

* chore: add .testdata

* fix: adding back .testdata to gitignore

* fix: new conflicts from ci improvements

---------

Co-authored-by: 0xng <[email protected]>
Co-authored-by: 0xParticle <[email protected]>
Co-authored-by: gotzenx <[email protected]>
Co-authored-by: Disco <[email protected]>

* fix: do not delete test data directory (#11869)

Our "just clean" command was deleting the entirety of .testdata
which gets in several scripts now. We don't actually want to
delete the entirety of .testdata, we want to delete anything
inside of it (except for the gitkeep file).

* codeowners: move go-reviewers team at the end (#11877)

* txmgr: improve code sharing between Send and SendAsync (#11876)

* Revert "txmgr: improve code sharing between Send and SendAsync (#11876)" (#11883)

This reverts commit 87af6f0d033996b0cad2437f75fe8bc626a2b5d5.

* Add op-deployer proof-of-concept (#11804)

This PR adds a proof-of-concept for `op-deployer`, a CLI tool that allows declarative management of live OP Stack chains. This POC supports initializing the declarative chain config (called an "intent") and deploying the Superchain smart contracts using the OP Stack Manager.

An example intent for a Sepolia chain looks like this:

```toml
l1ChainID = 11155111
useFaultProofs = true
useAltDA = false
fundDevAccounts = true
contractArtifactsURL = "file:///Users/matthewslipper/dev/optimism/packages/contracts-bedrock/forge-artifacts"

[superchainRoles]
  proxyAdminOwner = "0xb9cdf788704088a4c0191d045c151fcbe2db14a4"
  protocolVersionsOwner = "0xb910764be39c84d572ff17713c615b5bfd7df650"
  guardian = "0x8c7e4a51acb17719d225bd17598b8a94b46c8767"
```

When deployed, it produces a state file that looks like this:

```json
{
  "version": 1,
  "appliedIntent": {
    "l1ChainID": 11155111,
    "superchainRoles": {
      "proxyAdminOwner": "0xb9cdf788704088a4c0191d045c151fcbe2db14a4",
      "protocolVersionsOwner": "0xb910764be39c84d572ff17713c615b5bfd7df650",
      "guardian": "0x8c7e4a51acb17719d225bd17598b8a94b46c8767"
    },
    "useFaultProofs": true,
    "useAltDA": false,
    "fundDevAccounts": true,
    "contractArtifactsURL": "file:///Users/matthewslipper/dev/optimism/packages/contracts-bedrock/forge-artifacts",
    "chains": null
  },
  "superchainDeployment": {
    "proxyAdminAddress": "0x54a6088c04a7782e69b5031579a1973a9e3c1a8c",
    "superchainConfigProxyAddress": "0xc969afc4799a9350f9f05b60748bc62f2829b03a",
    "superchainConfigImplAddress": "0x08426b74350e7cba5b52be4909c542d28b6b3962",
    "protocolVersionsProxyAddress": "0x212a023892803c7570eb317c77672c8391bf3dde",
    "protocolVersionsImplAddress": "0x2633ac74edb7ae1f1b5656e042285015f9ee477d"
  }
}
```

To use `op-deployer`, run `op-deployer init --dev --l1-chain-id <chain-id>`. This will initialize a deployment intent using the development keys in the repo. Then, run `op-deployer apply --l1-rpc-url <l1-rpc> --private-key <deployer-private-key>` to apply the deployment.

- The contracts deployment is performed by the local Go/Forge tooling.
- Upgrades of the contracts (i.e. modifying them after deploying the contracts afresh) is not currently supported. This will be supported in the future.
- The rest of the pipeline (i.e., deploying L2s and generating genesis files) is not included in this PR to keep it smaller and allow us to get buy-in on the fundamental concepts behind `op-deployer` before further implementation.

* fix(ci): skip files without modified functions (#11891)

Updates test-heavy-fuzz-modified-tests to skip any files that
don't have any modified fuzz tests.

* fix(ci): tweak heavy fuzz run parameters (#11894)

Tweaks various parameters for the heavy fuzz run tests to prevent
the test from taking too long. We can run a daily super heavy fuzz
run instead to catch any rare flakes.

* discard candidate when ahead (#11874)

* discard candidate when ahead

* also discard result.Unsafe for consistency

* remove unnecessary type convertion for FakeGenesis

* Revert "also discard result.Unsafe for consistency"

This reverts commit d2288d4a01bb4176fd1a3c6e1901646c7bb404c7.

* remove type cast

* codeowners: own op-e2e/actions/proofs by proofs team (#11895)

* maint: add interfaces for governance contracts (#11878)

Adds interfaces for the two governance contracts.

* maint: rename Safe folder to safe (#11882)

Renames the Safe folder (uppercase) to safe (lowercase) in line
with all other folders.

* opsm: remove remaining structs (#11854)

* refactor: remove structs from DeployImplementations

* refactor: remove structs from DeployOPChain

* test: fix tests

* Update packages/contracts-bedrock/test/DeployOPChain.t.sol

Co-authored-by: Blaine Malone <[email protected]>

* Update packages/contracts-bedrock/test/DeployOPChain.t.sol

Co-authored-by: Blaine Malone <[email protected]>

* test: add missing assertions

* fix: update fuzz test timeout

---------

Co-authored-by: Blaine Malone <[email protected]>
Co-authored-by: Kelvin Fichter <[email protected]>

* feat: Add channel timeout tests for `op-program` (#11885)

* feat: Add channel timeout tests for `op-program`

* typo

* assert error

* fix comment

* feat: Add garbage frame tests for `op-program` (#11896)

* feat: Add channel timeout tests for `op-program`

* typo

* assert error

* fix comment

* feat: Add garbage frame tests for `op-program`

* assert error

* fix comment

* feat: mintable with permit (#11868)

* contracts-bedrock: add permit functionality to mintable erc20

Adds `permit` functionality to `OptimismMintableERC20` tokens
that are deployed by the `OptimismMintableERC20Factory`.

* feat: max approve permit2 in ERC20Mintable

This commit max approves permit2 automatically for all holders of the
ERC20 bridge token. This enables all users on OP stack chains to skip an
approval step for actions on protocols utilizing permit2 e.g. Uniswap

* fix: constants first

* semver-lock: update

* snapshots: fix

* contracts: add natspec

* semver-lock: update

* contracts-bedrock: fix nits

* snapshots: update

---------

Co-authored-by: Mark Toda <[email protected]>

* add sequence window expiry test (#11897)

* fix: incorrect import in ManageDrippie.s.sol (#11898)

Fixes an incorrect import inside of ManageDrippie.s.sol. Seems to
work just fine when forge install is executed but not otherwise.

* op-e2e: Setup mt-cannon for tests (#11881)

* op-e2e: Use mt-cannon

Introduces a `USE_MT_CANNON` env to optionally enables MT-Cannon in
op-e2e integration tests

* a couple of fixes

* fix todo

* op-program: Inject prefetcher instead of setting code in config (#11902)

* op-program: Support injecting a Prefetcher creator rather than setting code on the Config object.

* op-program: Use an interface for the Prefetcher instead of requiring a concrete type.

* feat: `op-program` actor test API improvements (#11903)

* feat: `op-program` actor test API improvements

* lint

* sort fix

* rebase

* op-program: Record the kv format used. (#11900)

Automatically use the correct format if it has been recorded.

Change the default format to directory. Compatibility with op-challenger is preserved because it now uses the automatic format detection, defaulting to file if not specified (e.g for kona-host).

* feat: Scaffolding for DeployAuthSystemInput (#11889)

* feat: Scaffolding for DeployAuthSystemInput

* fix: Remove undefined import

* feat: Address feedback

* interop: interopgen v2 using OPSM (#11702)

* op-chain-ops/interopgen: OPSM powered interop genesis

* ci: make forge scripts available to op-e2e

* op-chain-ops: address interopgen review comments

* cannon: Handle preimage bounds checks consistently (#11911)

* cannon: Handle preimage bounds checks consistently

* cannon: Cleanup stray comment

* feat: Scaffolding for DeployAuthSystemInput (#11890)

* feat: Scaffolding for DeployAuthSystemInput

* feat: Scaffolding for DeployAuthSystem Output

* feat: Address feedback and remove comments

* Interop: SuperSystem for E2E Tests (#11850)

* op-e2e: interop test setup (work in progress)

* op-e2e: interop test setup

* organization and comment updates

* refactor creation code into WIP system2

* save secrets per L2

* Add SuperSystem Interface ; Add Users and Transactions

* Further Refactoring ; Fix Test

* Add Supervisor

* Add Supervisor Client

* Comment out Proposer

* Add AddL2RPC to Supervisor Client

* Fully link Supervisor and OP Node in E2E Test

* correct RPC call supervisor_checkBlock

* Make EOF acceptable for backend check

* final structure names

* Change unused functions to _ for linter

* fix import order

* Add Github Issue Numbers to TODOs

* tynes comments: add World Resource as configurable

---------

Co-authored-by: protolambda <[email protected]>

* feat: Front OPSM with Proxy and Initialize (#11875)

* fix: getting stack underflow error.

* feat: adding proxy infront of OPStackManager.

* fix: PR comments, we're landing on using the initialize function over setRelease.

* fix: rename function.

* fix: nit

* fix: infering proxy admin from superchain config.

* fix: ran command: just pre-pr-no-build

* fix: nits

* fix: using CommonBase in DeployImplementations.s.sol.

* op-chain-ops: pass superchain proxy admin address as input to deployments script

---------

Co-authored-by: Matt Solomon <[email protected]>
Co-authored-by: protolambda <[email protected]>

* fix: Additional DeployImplementations.s.sol tests (#11914)

* fix: Additional testing for inferring proxy admin from superchain config.

* Apply suggestions from code review

---------

Co-authored-by: Matt Solomon <[email protected]>

* Use the deterministic deployer when broadcasting with CREATE2 (#11915)

* op-e2e: Separate helpers for proofs action tests into a new package (#11920)

* op-e2e: Move action test helpers for proofs to a separate package.

* op-e2e: Use helpers package under proofs rather than a completely separate package tree for helpers.

* cannon: Implement thread-safe ll and sc operations (#11906)

* cannon: Extract RMW op handling from shared logic

* cannon: Add more test cases of LL/SC behavior

* cannon: Cut ll/sc-related logic from common mips code

* cannon: Setup mips helpers to return memory modification info

* cannon: Add new fields to track reserved memory

* cannon: Add a boolean field indicating whether an ll reservation is active

* cannon: Implement ll/sc for MTCannon

* cannon: Add modified sysRead tests for MTCannon

* cannon: Test store operations cleare memory reservations

* cannon: Update SysClockGettime to clear ll memory reservation

* cannon: Fix slither warning - initialize variable

* cannon: Bump MIP2.sol version

* cannon: Run semver, snapshot tasks

* cannon: Cut unused log msg

* cannon: Add new error to MIPS interfaces

* cannon: Cut stale TODO

* Add integration test for apply (#11910)

* Add integration test for apply

Adds an integration test for OP Deployer's `apply` method. This test uses Kurtosis to spin up an in-memory L1, deploy the contracts using OP Deployer, then asserts that there is code at all reported addresses.

* Review updates

* circleci: Enable mt-cannon in develop-fault-proofs (#11928)

* feat: add SuperchainERC20 baseline (#11675)

* feat: add superchain erc20 baseline (#37)

* feat: add superchain erc20 baseline

* feat: make superchain ERC20 simpler

* fix: small version fix and tests

* test: fix test name

* test: remove unused import

* feat: making baseline abstract

* fix: interfaces to comply with the new interface checker

* fix: import paths and empty line

* fix: lint line

---------

Co-authored-by: 0xng <[email protected]>
Co-authored-by: 0xng <[email protected]>

* feat(op-service): add SuperchainWETH and ETHLiquidity to predeploys/addresses.go (#11927)

* Port deployers, add end-to-end contract deployments (#11922)

This PR ports over the deployers in `interopgen` into `op-deployer`, and updates `op-deployer` to support end-to end contract deployments for both the Superchain and individual OP Chains.

This PR includes a couple of bugfixes for things I discovered along the way:

1. The script host is updated to bump the nonce of the address calling the CREATE2 deployer when broadcasting. This fixes a chain/simulation mismatch that blocked contracts from being deployed.
2. The DeployImplementations contract used a fixed CREATE2 salt, which caused problems on repeated deployments. I updated the contract to pull the nonce from the environment as we do elsewhere.

Builds on https://github.com/ethereum-optimism/optimism/pull/11910.

* cannon: Handle unaligned futex addresses (#11929)

* cannon: Update tests for futex unaligned memory behavior

* cannon: Align futex-related addresses when they are set

* cannon: Run lint and semver tasks

* cannon: Add wakeup traversal tests with unaligend addresses

* cannon: Don't panic if ThreadState.FutexAddr is unaligned

* cannon: Run semver lock task

* cannon: Cleanup stray whitespace

* Add Logging ; Fix Broken Maintenance Context (#11931)

* Add Logging ; Fix Broken Maintenance Context

* Remove unneeded timing ; use Testlogger

* feat(op-e2e): Expose `L1Replica` + `L2Engine` + `BlobsStore` endpoints (#11926)

* feat(op-e2e): Expose `L1Replica` + `L2Engine` + `BlobsStore` endpoints

* mutex

* deterministic blob indexing

* proto review

* lint

* op-node: handle crit error events, lift event-system out of driver (#11932)

* op-e2e: Fix compile error (#11933)

* op-e2e: Fix compile error

* ci: Make go-lint a dependency of bedrock-go-tests to prevent merging if it fails.

* op-e2e: Separate actions tests into different packages (#11921)

* op-e2e: Move most action tests into a package based on what they test

* op-e2e: Move batch_queue_test.go to derivation package

* op-e2e: Move eip4844_test.go to batcher package

* op-e2e: Move actions helper code to helpers package

* update makefile

* op-e2e: Fix typo

---------

Co-authored-by: clabby <[email protected]>

* feat(op-e2e): Kona FPP actions test adapter (#11936)

* feat(op-e2e): Kona FPP actions test adapter

* rebase

* lint

* review

* fix result check

* op-e2e: Organize e2e system tests in subdirs (#11939)

* op-e2e: organize system tests

* op-e2e: update CI make targets

* op-e2e: fix artifacts file paths

* op-e2e: Fix paths.

* op-e2e: Fix paths again

---------

Co-authored-by: Adrian Sutton <[email protected]>

* OPSM: miscellaneous fixes and improvements (#11935)

* chore: fix comment

* feat: add assertions

* fix: use method instead of new

* refactor: make salt into an input

* refactor: unify checkOutput function signatures

* chore: update snapshots

* test: fix testContractAuth

* test: fix checkOutput signatures

* fix: update go DeployImplementationsInput struct with salt

* pr feedback

* chore: semver lock

* Disable go patches for cannon MT (#11937)

* Disable go patches for cannon MT.

Fix the prestate file list for devnet to use the binary cannon MT prestates.

* Update Makefile

---------

Co-authored-by: Inphi <[email protected]>

* feat: Scaffolding for DeployAuthSystem Script (#11908)

* feat: Scaffolding for DeployAuthSystem Script

* feat: Remove redundant documentation

* Update DeployAuthSystem.s.sol

* op-batcher: Add String methods to txRef (#11904)

* feat: Rewrite FP contract distinctions as table (#11940)

* feat: Rewrite FP contract distinctions as table

* feat: clarify handling of non-MCP contracts

* feat: Update pending mcp statuses

* op-e2e: fix fuzz cgo build (#11941)

* maint: move WETH contract to correct folders (#11870)

Moves WETH98 over to the universal/ folder where it belongs and
brings DelayedWETH up to the top of the dispute folder since there
is no longer any need for a weth/ subfolder.

* dependabot(gomod): bump github.com/prometheus/client_golang (#11946)

Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.20.3 to 1.20.4.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.20.3...v1.20.4)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add L2 genesis generation support to `op-deployer` (#11938)

Adds support for generating L2 genesis files to `op-deployer. The L2 initialization config is generated by merging in overrides as specified in the intent into a default config with sane values. The outputted genesis file is stored in the stage as a GZIP-compressed, base64-encoded string.

* OPSM: DeployOPChain assertions (#11943)

* chore: add BaseDeployIO for the deploy input and output contracts

* test: add assertions to DeployOPChain

* chore: semver lock

* pr feedback

* feat: remove dgf impl from DeployOpChain and OPSM (#11942)

* fix: Remove `--l2-chain-id` default (#11951)

* feat: Add ASR proxy to OPStackManager (#11952)

* feat: Add ASR proxy to OPStackManager

* feat: Add AnchorStateRegistry blueprint

* ci: run slow Cannon test once per day (#11947)

Updates CI to run the (very) slow Cannon go-lint-and-test suite
once per day instead of running it on merge since it adds at least
5 minutes to CI.

* fix: move IERC20Solady into vendor folder (#11945)

An additional "dependency" folder was added in a recent PR, this
is the same purpose as the "vendor" folder so the interface added
in that PR can simply be moved to the "vendor" folder instead.

* ci: bump semgrep-scan to xlarge (#11948)

We're still having resource issues with a large image. Going to
bump this to xlarge to see if that will fix it.

* test: invariant tests for OptimismSuperchainERC20 (#11776)

* chore: configure medusa with basic supERC20 self-bridging (#19)

- used --foundry-compile-all to ensure the test contract under
  `test/properties` is compiled (otherwise it is not compiled and medusa
  crashes when it can't find it's compiled representation)
- set src,test,script to test/properties/medusa to not waste time
  compiling contracts that are not required for the medusa campaign
- used an atomic bridge, which doesnt allow for testing of several of
  the proposed invariants

fix: delete dead code
test: give the fuzzer a head start
docs: fix properties order
test: document & implement assertions 22, 23  and 24
fix: fixes from self-review
test: guide the fuzzer a little bit less
  previously: initial mint, bound on transfer amount: 146625 calls in 200s
  now: no initial mint, no bound on transfer amount: 176835 calls in 200s
  it doesn't seem to slow the fuzzer down
fix: fixes after lovely feedback by disco
docs: merge both documents and categorized properties by their milestone
fix: fixes from parti's review
fix: feedback from disco
fix: feedback from doc
refactor: separate state transitions from pure properties
docs: update tested properties
refactor: move all assertions into properties contract
fix: move function without assertions back into handler
test: only use assertion mode
fix: improve justfile recipie for medusa

* feat: halmos symbolic tests (#21)

* feat: introduce OptimismSuperchainERC20

* fix: contract fixes

* feat: add snapshots and semver

* test: add supports interface tests

* test: add invariant test

* feat: add parameters to the RelayERC20 event

* fix: typo

* fix: from param description

* fix: event signature and interface pragma

* feat: add initializer

* feat: use unstructured storage and OZ v5

* feat: update superchain erc20 interfaces

* fix: adapt storage to ERC7201

* test: add initializable OZ v5 test

* fix: invariant docs

* fix: ERC165 implementation

* test: improve superc20 invariant (#11)

* fix: gas snapshot

* chore: configure medusa with basic supERC20 self-bridging

- used --foundry-compile-all to ensure the test contract under
  `test/properties` is compiled (otherwise it is not compiled and medusa
  crashes when it can't find it's compiled representation)
- set src,test,script to test/properties/medusa to not waste time
  compiling contracts that are not required for the medusa campaign
- used an atomic bridge, which doesnt allow for testing of several of
  the proposed invariants

* fix: delete dead code

* test: give the fuzzer a head start

* feat: create suite for sybolic tests with halmos

* test: setup and 3 properties with symbolic tests

* chore: remove todo comment

* docs: fix properties order

* test: document & implement assertions 22, 23  and 24

* fix: fixes from self-review

* test: guide the fuzzer a little bit less

previously: initial mint, bound on transfer amount: 146625 calls in 200s
now: no initial mint, no bound on transfer amount: 176835 calls in 200s

it doesn't seem to slow the fuzzer down

* feat: add property for burn

* refactor: remove symbolic address on mint property

* refactor: order the tests based on the property id

* feat: checkpoint

* chore: set xdomain sender on failing test

* chore: enhance mocks

* Revert "Merge branch 'chore/setup-medusa' into feat/halmos-symbolic-tests"

This reverts commit 945d6b6ad265ea5e3790d7ac9c5bf4d6586eb533, reversing
changes made to 5dcb3a89252e9e8fa9b54ba9012e714f7cc96395.

* refactor: remove symbolic addresses to make all of the test work

* chore: remove console logs

* feat: add properties file

* chore: polish

* refactor: enhance test on property 7 using direct try catch (now works)

* fix: review comments

* refactor: add symbolic addresses on test functions

* feat: create halmos toml

* chore: polish test contract and mock

* chore: update property

* refactor: move symbolic folder into properties one

* feat: create advanced tests helper contract

* refactor: enhance tests using symbolic addresses instead of concrete ones

* chore: remove 0 property natspec

* feat: add halmos profile and just script

* chore: rename symbolic folder to halmos

* feat: add halmos commands to justfile

* chore: reorder assertions on one test

* refactor: complete test property seven

* chore: mark properties as completed

* chore: add halmos-cheatcodes dependency

* chore: rename advancedtest->halmosbase

* chore: minimize mocked messenger

* chore: delete empty halmos file

* chore: revert changes to medusa.json

* docs: update changes to PROPERTIES.md from base branch

* test: sendERC20 destination fix

* chore: natspec fixes

---------

Co-authored-by: agusduha <[email protected]>
Co-authored-by: 0xng <[email protected]>
Co-authored-by: teddy <[email protected]>

* test: remaining protocol properties (#26)

* test: cross-user fuzzed bridges + actor setup

* test: fuzz properties 8 and 9

* test: properties 7 and 25

* fix: implement doc's feedback

* test: superc20 tob properties (#27)

* chore: add crytic/properties dependency

* test: extend protocol properties so it also covers ToB erc20 properties

* chore: small linter fixes

* docs: update property list

* test: handlers for remaining superc20 state transitions

* fix: disable ToB properties we are not using and guide the fuzzer a bit more

* fix: disable another ToB property not implemented by solady

* chore: remove zero-initializations

* fix: feedback from disco

* chore: separate fuzz campaign tests in guided vs unguided

* test: dont revert on successful unguided relay

* test: add fuzzed calls to burn and mint

* docs: document the separation of fuzz test functions

* chore: move the properties file to its own directory

* chore: consistently use fuzz_ and property_ + camelcase

* chore: fix typo

* chore: camelcase for handlers as well

* fix: revert change that broke halmos campaign compile :D

* test: fuzz non atomic bridging (#31)

* test: changed mocked messenger ABI for message sending but kept assertions the same

* docs: add new properties 26&27

* test: queue cross-chain messages and test related properties

* test: relay random messages from queue and check associated invariants

* chore: rename bridge->senderc20 method for consistency with relayerc20

* test: not-yet-deployed supertokens can get funds sent to them

* chore: medusa runs forever by default

doable since it also handles SIGINTs gracefully

* chore: document the reason behind relay zero and send zero inconsistencies

* fix: feedback from doc

* fix: walk around possible medusa issue

I'm getting an 'unknown opcode 0x4e' in ProtocolAtomic constructor when
calling the MockL2ToL2CrossDomainMessenger for the first time

* test: unguided handler for sendERC20

* fix: feedback from disco

* chore: remove halmos testsuite

* chore: foundry migration (#40)

* chore: track assertion failures

this is so foundry's invariant contract can check that an assertion
returned false in the handler, while still allowing `fail_on_revert =
false` so we can still take full advantage of medusa's fuzzer & coverage
reports

* fix: explicitly skip duplicate supertoken deployments

* chore: remove duplicated PROPERTIES.md file

* chore: expose data to foundry's external invariant checker

* test: run medusa fuzzing campaign from within foundry

* fix: eagerly check for duplicate deployments

* fix: feedback from doc

* chore: shoehorn medusa campaign into foundry dir structure

* chore: remove PROPERTIES.md file

* chore: delete medusa config

* docs: limited support for subdirectories in test/invariant

* chore: rename contracts to be more sneaky about medusa

* docs: rewrite invariant docs in a way compliant with autogen scripts

* chore: fixes from rebase

* fix: cleanup superc20 invariants (#46)

* chore: revert modifications from medusa campaign

* docs: extra docs on why ForTest contract is required

* doc: add list of all supertoken properties

* chore: run forge fmt

* ci: allow for testfiles to be deleted

* fix: run doc autogen script after rebase

---------

Co-authored-by: Disco <[email protected]>
Co-authored-by: agusduha <[email protected]>
Co-authored-by: 0xng <[email protected]>

* ci: job to check contracts build warnings (#11962)

Adds a new compiler job to check for contract build warnings.
Other existing build jobs don't compile the entire set of contracts
and we do want to be able to check for warnings across the board.

* ci: simplify contract build job inputs (#11965)

Simplifies the inputs to contracts-bedrock-build so that it
takes a single skip_pattern command instead of allowing the user
to specify any build command.

* ci: clean up golang job definitions (#11967)

Cleans up a number of golang job definitions. One PR for now
just so I can see this all work.

* ci: fix config error in cannon tests (#11969)

Fixes a configuration error in the scheduled-cannon-full-tests
job.

* op-node: lazy-dial the supervisor RPC (#11970)

* ci: simplify contracts bedrock tests job (#11966)

Simplifies the contracts-bedrock-tests job so that it takes more
parameters but makes the test command unified. Also replaces the
complex script for checking for modified fuzz tests and simply
heavily fuzzes all tests within any test files that have changed.

* ci: misc cleanups and simplifications (#11968)

Cleanups in a few places, removing unused jobs, etc.

* correct the comment (#11971)

* update op-e2e setup (#11857)

* fix: multiple fuzz flakes (#11981)

Fixes a couple of fuzz flakes that were found when fuzzing
heavily.

* maint: add interfaces for L2 bridge/messaging contracts (#11859)

First PR for adding interfaces for L2 contracts. Adds interfaces
for all of the bridging and message passing contracts.

* chore(op-service): use `errors.New` to replace `fmt.Errorf` with no parameters (#11796)

* fix(ci): semgrep cli breaking change (#11985)

Semgrep CLI tool recently removed the --time option which caused
CI to suddenly break.

* ci: correct perms for tag-service.yml (#11961)

GITHUB_TOKEN no longer gets write access by default so it needs to
be provided with write access explicitly.

* Add inspection commands, fix deployer bugs (#11964)

Adds `op-deployer inspection *` commands to expose the generated genesis and rollup configs via the CLI or Golang libraries. Also fixes a bug in deployment - I accidentally deleted the code that set the deployer nonce, so live chain deployments were reverting.

* refactor: Rename OPSM to OPSMProxy for clarity (#11972)

* chore(rename): Rename opsm to opsmProxy

* fix: Go bindings updated for proxy.

* fix: linting

* fix: pr comment nits.

* feat(op-e2e): Open channel closed after sequence window expiry test (#11993)

* feat(op-e2e): Open channel closed after sequence window expiry test

Adds a test to the proof actions that proves a block at the safe head
after the batcher has opened a channel, allowed the sequence window to
expire, and then attempted to close their open channel after the fact.

* buffer frame

* include extra tx

* feat(op-e2e): Channel timeout late submission test (#11995)

* feat(op-e2e): Channel timeout late submission test

* remove finalization of l1 chain

* ci: separate invariant runs from fuzz runs (#11982)

Using 10k invariant runs would be ridiculously slow.

* ci: Restore ci-builder docker release and remove invalid op-challenger-big-docker-release (#11997)

* maint(ci): clean up release job (#11996)

Cleans up the release job by turning it into a matrix.

* maint(ci): clean up scheduled docker publish (#11999)

Same idea again, cleaning up the scheduled docker publish with the
same technique as the previous PR.

* OPSM: More assertions (#11994)

* refactor: rename var for clarity

* test: add more assertions from ChainAssertions, and some new ones

* chore: ensure unique, clear, consistent revert string IDs

also sorts methods alphabetically for clarity

* fix: var name after rebase

* style: forge fmt

* revert proxyAdmin -> superchainProxyAdmin name change for now

* Update packages/contracts-bedrock/scripts/DeployImplementations.s.sol

Co-authored-by: Maurelian <[email protected]>

* chore: small tweaks from pr feedback

---------

Co-authored-by: Maurelian <[email protected]>

* op-challenger: Support MT-Cannon in run-trace (#11934)

* op-challenger: Support MT-Cannon in run-trace

* ..

* fix multi_test.go

* annotate metrics with mt-cannon

* preserve prestate encoding; use separate dir for mt-cannon

* Update op-challenger/cmd/run_trace.go

Co-authored-by: Adrian Sutton <[email protected]>

---------

Co-authored-by: Adrian Sutton <[email protected]>

* feat: add remaining L2 interfaces (#11984)

One more PR for adding L2 interfaces.

* feat: clean up TODOs and add CI check (#12005)

* maint: clean up TODO tags

Cleans up existing TODO tags, particularly those that referenced
old Linear issues. Updates the todo-checker script to allow
<#issue> as well as <issue>.

* feat(ci): add todo-issues check to main CI

Updates the main CI workflow to run the todo-issues check. For
now this check will ignore any bare TODOs. We can update the
script later to reject bare TODOs.

* contracts: Add more MIPS2 tests (#12003)

* contracts: Add more MIPS2 tests

* remove unused var

* cannon: Clean up fuzz test todos (#12009)

* cannon: Add memory assertions to FuzzStatePreimageRead

* cannon: Rework hint write fuzz test to assert hint expectations

* cannon: Update FuzzStatePreimageWrite to assert on expected preimageKey

* cannon: Remove validation skipping logic from test util

* cannon: Cleanup - simplify code

* cannon: Cleanup - dedupe code

* cannon: Clean up program patching (#11944)

* cannon: Cut todo, reorganize syscalls

* cannon: Rename patchGo to patchGoGC, add comments, cut TODO

* cannon: Only allow gc patching for single-threaded Cannon

* cannon: Cut patch flag from load-elf command altogether

* feat(ci): check contract semver matches natspec (#11992)

Adds a new check to CI that verifies that the semver string
defined in the contract matches the string defined in natspec.

* maint(ct): link to external mermaid diagrams in specs (#12012)

Updates the contracts README to use the mermaid diagrams in specs
to avoid duplicated documentation.

* op-program: Reproducible MT-Cannon prestate (#12011)

* op-program: Reproducible MT-Cannon prestate

* fix mt-cannon proof gen

* cannon: Fix makefile phony target (#12014)

* maint(ci): remove autogenerated invariant docs (#11988)

Removes autogenerated invariant docs from the contracts package.
These autogenerated docs create confusion about where invariants
should be defined (the answer is in the specs) and no one actually
looks at them anyway. Just adds an additional step into CI for
minimal benefit.

* vm-runner: User-prov…
Troublor pushed a commit to megaeth-labs/optimism that referenced this pull request Dec 6, 2024
* feat(op-program): Use `PebbleDB` for `DiskKV` (#11705)

* feat(op-program): Use `PebbleDB` for `DiskKV`

* close db

* fix `testFaultProofProgramScenario` tests

* switch to snappy compression

https://github.com/cockroachdb/pebble/issues/3434

* fix tempdir

* update compat release

* defer k/v until preimage server and hinter have both exited

* Revert "feat(op-program): Use `PebbleDB` for `DiskKV` (#11705)" (#11707)

This reverts commit 8ab4d3d8e20f69464d9f5191c110b63f4d5a3df6.

* op-service/txmgr: multiple fixes / improvements (#11614)

* - make immediate nonce-too-low error abort send (since it could never succeed otherwise)

- make txmgr resubmit a transaction when fee bumping fails in case it has been dropped from the mempool

- only bump fees when they really should be bumped

- set txmgr overall default send timeout of 10 minutes. It was infinite, which led to permanently
  stuck transaction in combination with the other bugs fixed in this PR.

* Update op-service/txmgr/txmgr_test.go

---------

Co-authored-by: Sebastian Stammler <[email protected]>

* chore(op-service): Remove `reth` receipts source (#11706)

* fix: op-challenger move.go cli command wasn't cancellable (#11716)

* feat: add ERC-5202 Blueprint library with initial tests (#11700)

https://eips.ethereum.org/EIPS/eip-5202

* chore: Fix lint error (#11714)

golangci-lint v1.60.2 seems to report a new error when performing a nil check and length != 0 on maps. We're not using this version in CI yet but fix the error to simplify the code and provide for a future upgrade.

* maint: no kontrol summaries in PRs (#11725)

Removes the need for kontrol summaries to be generated at PR time.
Summaries will now be generated during run-kontrol.sh instead.

* feat: check interface differences in CI (#11677)

Adds a new check script to contracts-bedrock that verifies that
interfaces being added to the repository accurately represent
the interface of the contract that the interface was generated
for.

* add comment to SingularBatch.Timestamp (#11720)

* op-program: Use PebbleDB for DiskKV (Reapply with fixes) (#11709)

* feat(op-program): Use `PebbleDB` for `DiskKV` (#11705)

* feat(op-program): Use `PebbleDB` for `DiskKV`

* close db

* fix `testFaultProofProgramScenario` tests

* switch to snappy compression

https://github.com/cockroachdb/pebble/issues/3434

* fix tempdir

* update compat release

* defer k/v until preimage server and hinter have both exited

* Only open preimage source when actually needing preimages.

Avoids concurrent access to the pebbledb.

* op-program: Handle interrupts in host

Ensures the preimage kv store is closed cleanly even when the process is sent an interrupt signal.
Enables non-blocking IO so that read calls return io.EOF when a file handle is closed rather than blocking forever.

* op-program: Restore file based kv store. Add pebble as an additional option.

* op-program: Add option to specify KV store format to use

* op-program: Switch pebble to perform sync writes.

* op-program: Rename disk kv to file kv

* op-program: Rename DBFormat to DataFormat for consistency.

---------

Co-authored-by: clabby <[email protected]>

* fix: SuperchainWETH fuzz flake with bad sender (#11728)

Fixes a number of places where SuperchainWETH fuzz tests can flake
as a result of using a sender address that is the ETHLiquidity or
SuperchainWETH contract.

* Fix copy-paste typo (#11731)

* maint: add interfaces for legacy contracts (#11625)

Adds interfaces for the contracts inside of /legacy. Interface is
not included for the LegacyMintableERC20 contract because that
interface has already been defined elsewhere.

* Slim down contracts-bedrock package (#11723)

* Slim down contracts-bedrock package

The contracts-bedrock package was over 2GB in size, mostly because it contained the Git repository. It also supported multiple platforms, which would lead to costly recompilation steps every time the image was used on a different platform (e.g., OSX).

The PR updates the Dockerfile to no longer ship the Git repo. It also updates the Debian base image to a more modern, slimmed down version. The new image is <1G in size.

* fix bakefile

* fix: properly check all interfaces (#11734)

Interfaces check script had a bug that would cause it to use the
wrong ABI when checking an interface. Each compiler artifact only
has a single ABI in it but this same ABI was being used for all
contract definitions found within that file. Since each separate
contract definition gets its own file anyway, this script now
properly verifies by finding the specific definition that matches
the filename.

* feat: update interface validation script to check semver (#11740)

Updates the interface validation script to verify that all
interface contracts are using Solidity ^0.8.0 exactly.

* challenger: Introduce StateConverter to abstract loading VM states (#11715)

* fix: flake tests (#11742)

* fix: add optimism mintable check on assume address helper

* fix: mock interfaces checks

* chore: remove unused import

---------

Co-authored-by: 0xng <[email protected]>

* repo: bump foundry (#11746)

Bumps foundry to the following commit: https://github.com/foundry-rs/foundry/commit/143abd6a768eeb52a5785240b763d72a56987b4a

Release: https://github.com/foundry-rs/foundry/releases/tag/nightly

This needs to be followed up with a rebuild of `ci-builder`

* Revert "challenger: Introduce StateConverter to abstract loading VM states (#…" (#11747)

This reverts commit 3410109155ae75915ff95dc0a1995ac0d3cac8b5.

* cannon: Run expensive tests in parallel (#11739)

* op-node: sequencer should clear inconsistent asyncGossip buffer on sequencer-start (#11724)

* op-node: sequencer should clear inconsistent asyncGossip buffer on sequencer-start

* op-node: test async-gossip clearing

* Update op-node/rollup/sequencing/sequencer.go

Co-authored-by: Adrian Sutton <[email protected]>

---------

Co-authored-by: Adrian Sutton <[email protected]>

* Reapply "challenger: Introduce StateConverter to abstract loading VM states" (#11752)

With fix to set a state converter when creating trace providers for test.

* contracts-bedrock: Add OPSM file I/O for superchain deployments (#11750)

* contracts-bedrock: Add OPSM file I/O for superchain deployments

* Update packages/contracts-bedrock/scripts/DeploySuperchain.s.sol

Co-authored-by: Matt Solomon <[email protected]>

* Update packages/contracts-bedrock/test/DeploySuperchain.t.sol

Co-authored-by: Matt Solomon <[email protected]>

* Address feedback from code review

* Linter

---------

Co-authored-by: Matt Solomon <[email protected]>

* maint: update solidity vscode extension (#11751)

* op-conductor: adds raft log snapshot configs (#11745)

* Refactors NewRaftConsensus param list into a config struct
* Adds configuration support for SnapshotInterval, SnapshotThreshold, TrailingLogs

* fix: initialization tests (#11674)

Fixes the initialization tests, existing tests were not properly
verifying that all of the initializable contracts were being
accounted for.

* Update VERSIONING.md (#11761)

* Fix contracts-bedrock-docker-publish build (#11755)

The build stage name was accidentally removed, which [broke](https://app.circleci.com/pipelines/github/ethereum-optimism/optimism/63237/workflows/e6a2d738-132f-4e10-9da2-c265b364c771/jobs/2627291) the job.

* op-node: op-node interop block verification (devnet-1 scope) (#11611)

* op-node: experimental interop block verification

* op-node: supervisor RPC init

* op-e2e/actions: test interop safety checks

* op-e2e/op-node: test fixes

* op-node: update comments

* op-node: unit-test interop deriver, trigger cross-safe updates on driver step, to poll for supervisor safety changes

* op-node: add more comments, fix flag description

* op-e2e: fix rebase, add missing argument

* cannon: Support binary serialisation for snapshots (#11718)

* cannon: Add serialize utils for binary formats and automatic binary/json detection.

* cannon: Support reading and writing states as binary or JSON

* cannon: Generate mt prestate as gzipped binary.

Use different versions for singlethreaded and multithreaded states.

* cannon: Improve comments for serialization

* cannon: Review feedback

* cannon: Introduce reader and writer helpers to simplify code.

* op-node: sanity-check the forkchoice updates (#11780)

* Use local logger in data source (#11756)

There may be other places where a global logger is used, but this instance is particularly important because one message warns the user of a misconfiguration that otherwise manifests in a seemingly unrelated bug (rollbacks on unsafe block consolidation).

* fix: small typo fixes to DeploySuperchain.s.sol. (#11758)

* fix: small typo fixes to DeploySuperchain.s.sol.

* fix: semgrep Javadoc-style comments are not allowed.

* style: remove extra space

---------

Co-authored-by: Matt Solomon <[email protected]>

* cannon: Port audit fixes (#11697)

* cannon: Require boolean exited field to be encoded as 0 or 1

* cannon: Port mmap solidity tests for MTCannon

* cannon: Port srav solidity tests

* cannon: Run semver-lock, snapshot tasks

* cannon: Cut extra validation on thread.exited

* cannon: Run semver lock

* cannon: Update IMIPS2 interface

* ci: pull cached artifacts for contracts tests (#11771)

Contracts tests don't need to recompile if we can just use the
artifacts instead.

* test: more blueprint tests (#11782)

* test: more blueprint tests

* address PR feedback

* op-chain-ops: prep / utils for interop genesis work (#11790)

* Add Maintenance Trigger for Cascading Updates (#11619)

* Update and cleanup CODEOWNERS with expert teams (#11786)

* Catch 'header not found' string in L2BlockRefByLabel (#11759)

* ci: speed up CI by up to 50% (#11794)

Introduces a number of improvements to CI that significantly
reduce overal CI time by up to 50% of the previous time.

* dependabot(gomod): bump github.com/prometheus/client_golang (#11764)

Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.20.2 to 1.20.3.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/v1.20.3/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.20.2...v1.20.3)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(challenger): `asterisc-kona` trace type (#11789)

* dependabot(gomod): bump golang.org/x/crypto from 0.26.0 to 0.27.0 (#11765)

* dependabot(gomod): bump golang.org/x/crypto from 0.26.0 to 0.27.0

Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.26.0 to 0.27.0.
- [Commits](https://github.com/golang/crypto/compare/v0.26.0...v0.27.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* deps: update

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mark Tyneway <[email protected]>

* Add Admin RPC for Adding New Chain Monitors (#11792)

* Add Admin RPC for Adding New Chain Monitors

* Update op-supervisor/supervisor/backend/db/db.go

---------

Co-authored-by: protolambda <[email protected]>

* semgrep: try to fix CI timeout (#11798)

* maint: move existing interfaces to folders (#11749)

Moves any existing interfaces that are not already inside of
their corresponding /interfaces folders into those folders.

* op-challenger: Support binary and JSON snapshots (#11754)

* op-challenger: Support loading json or binary cannon states.

* op-challenger: Use binary cannon snapshots

* op-challenger: Support downloading prestates in multiple formats.

* op-challenger: Verify newly downloaded snapshots.

* op-e2e: Update test to handle binary snapshots correctly.

* op-e2e: Remove unused parameter

* op-challenger: Add more varied data to the test cannon state.

* op-challenger: Add more varied data to the test cannon state.

* Remove hardcoded entrypoint (#11801)

Removes the `ENTRYPOINT` directive in the `contracts-bedrock` image. While convenient, using `ENTRYPOINT` makes building tooling on top of the image much harder since the entrypoint cannot be overridden without providing special flags to Docker. It is easier to use a dummy `CMD` instead that directs users to call specific tools when running the container. Functionally, this means users will run `docker run just <cmd>` instead of `docker run <cmd>` if they want to use the Justfile.

* Allow cheatcodes on DeploySuperchain.s.sol (#11802)

We need to add these calls otherwise calling `DeploySuperchain.s.sol` as a script with input/output files fails.

* op-program: Add recent op-program versions to reproducibility check (#11560)

* op-program: Add recent op-program versions to reproducibility check

* Add 1.3.1-rc.2

* ci: update contracts tests to split by file (#11797)

Contracts tests were being split by test name which meant that
Circle CI wouldn't be able to (eventually) be able to properly
split these files by timings. Updates the CI job to split by
file instead.

* fix `ReadPreimage` (#11805)

* avoid out of bound for TrackingPreimageOracleReader.ReadPreimage

* use p.GetPreimage

* op-program: Add a script to build cannon prestates for all tagged op-program releases. (#11559)

* op-dispute-mon: Identify unclaimed credits based on the withdrawal request timestamp (#11488)

* cannon: Fix path used when verifying a downloaded state (#11813)

* op-service: Make target destination when writing JSON/binary explicit (#11800)

Avoids being surprised by the special handling for - and empty string output paths.

* maint: add interface for L2OutputOracle (#11817)

First in a series of PRs adding interfaces for L2 contracts. Since
each of these changes involves touching a lot of other contracts
it seemed easier to split this up into several PRs for legibility.

* cannon: Autodetect VM type from state (#11803)

* cannon: Autodetect VM type from state in run command

* cannon: Autodetect VM type from state in witness command

* cannon: Remove vm type flag from run and witness

* cannon: Only peek the version byte

* cannon: Move all version handling to VersionedState, simplify a lot and forbid serializing multithreaded states to JSON

* cannon: Rename method

* op-challenger: Update cannon state parsing to use version detecting methods

* cannon: Move CreateVM to FPVMState for simplicity

Test read/write/create for VersionedState

* cannon: Readd detect_test

* cannon: Remove json names from multithreaded.State.

Multithreaded states always use binary serialization.

* cannon: Move vmtype to load_elf since it is no longer shared.

* cannon: Ensure metadata is available and sleepCheck used even if debug is disabled.

* op-challenger: Update canon state loading test to cover multiple state versions.

* op-challenger: Release agent resources once game is complete (#11820)

* Fix race condition in sequencer stopping logic (#11769)

* Fix race condition in sequencer stopping logic

* Add channel to signal that latestHead has been updated

* Fix test

* Store latest sealed separately, as latest gets cleared by engine.PayloadSuccessEvent

* Cleanup tests

* Add assertions on latest block ref variables

* Re-check if sequencer is active

* feat: Add nested directory data format for op-program kvstore (#11795)

* feat: Add nested directory data format for op-program kvstore

* Review feedback: Update error message

Co-authored-by: Adrian Sutton <[email protected]>

* op-program: Make directory preimage format the default.

---------

Co-authored-by: Adrian Sutton <[email protected]>
Co-authored-by: Adrian Sutton <[email protected]>

* Revert "op-program: Make directory preimage format the default." (#11823)

* Add broadcast API to Go forge scripts (#11826)

* Add broadcast API to Go forge scripts

Adds a hooks-based API to collect transactions broadcasted via `vm.broadcast(*)` in the Go-based Forge scripts. Users pass an `OnBroadcast` hook to the host, which will be called with a `Broadcast` struct with the following fields whenever a transaction needs to be emitted:

```go
type Broadcast struct {
	From     common.Address
	To       common.Address
	Calldata []byte
	Value    *big.Int
}
```

This API lets us layer on custom transaction management in the future which will be helpful for `op-deployer`.

As part of this PR, I changed the internal `callStack` data structure to contain pointers to `CallFrame`s rather than passing by value. I discovered a bug where the pranked sender was not being cleared in subsequent calls due to an ineffectual assignment error. I took a look at the implementation and there are many places where assignments to call frames within the stack happen after converting the value to a reference, so converting the stack to store pointers in the first place both simplified the code and eliminated a class of errors in the future. I updated the public API methods to return copies of the internal structs to prevent accidental mutation.

* Code review updates

* moar review updates

* fix bug with staticcall

* fix(op-batcher): initAltDA before initChannelConfig (#11816)

* fix(op-batcher): initAltDA before initChannelConfig

* chore(op-bastcher): fix comment

* op-node: read DACommitmentType from scr in LoadOPStackRollupConfig (#11830)

* op-node: read DACommitmentType from scr in LoadOPStackRollupConfig

* op-node: check for altda nil pointers before dereferencing

* op-node: leave altDA config nil if not existent in scr config

* OPSM: Begin implementing OP Stack Manager code and it's deployment (#11623)

* begin supporting specifying versions in OPSM

* add deploy logic

* deploy OPSM along with implementations

* scaffold opsm interface between scripts

* fixes

* mvp of DeployOPChain

* start working on an e2e opsm test, currently reverts

* fix tests

* test cleanup

* rename opsmSingleton to opsm

* chore: remove unused imports

* refactor: switch from 'new' to blueprints, 50% code size reduction

* fix semgrep

* feat: add OPSM interop tests

* test: add missing specs

* add DisputeGameFactory deployment

* chore: update snapshots

* fix opsm interop support

* chore: update snapshots

* Update packages/contracts-bedrock/test/DeployOPChain.t.sol

* fix: add L1StandardBridge setter and initialization

* chore: small clarification of deploy flow

* Update packages/contracts-bedrock/scripts/DeployImplementations.s.sol

Co-authored-by: Blaine Malone <[email protected]>

* chore: add todos

* fix: change bytes32 to string

* rename addrs to opChainAddrs for clarity

* test: fix assertion string numbering

* chore: update semver lock:

---------

Co-authored-by: Blaine Malone <[email protected]>

* op-chain-ops: fix Go forge script broadcast handling (#11832)

* fix: OptimismPortal fuzz flakes (#11818)

OptimismPortal fuzz tests were flaking because the base fee would
increase so much that there wouldn't be enough gas to burn for the
user to be able to buy the gas that they want. Introduces an
additional assumption that will prevent the elasticity multiplier
and max change denominator from being such that the maximum
change to the base fee won't cause us to run out of gas.

* cannon: Fix jalr stack tracking (#11831)

* ci: make semgrep-scan use a large docker image (#11834)

semgrep-scan kept failing with a medium docker image with 4g RAM.
Updating this image to large seems to fix the issue.

* maint: clarify interface fixes are manual (#11835)

* feat: ban deposits interop (#11712)

* interop: disable interop messages in force-deposits

Co-authored-by: Disco <[email protected]>

* interop: clean up config helpers

* op-node: fix/improve L1 info tx tests

* op-node: fix attributes test

* op-node: fix sequence-number usage in post-interop system deposit, fix tests

* op-contracts: L1Block interop: fix diff, remove duplicate test from renaming

* contracts: update metadata

* contracts: fix build warnings

* contracts: fix interface build

* script: ignore

* lint: fix

* test: .testdata directory

* tests: fix revert

---------

Co-authored-by: Disco <[email protected]>
Co-authored-by: protolambda <[email protected]>
Co-authored-by: Mark Tyneway <[email protected]>

* Improvements/bugfixes to Go forge scripts (#11838)

* Improvements/bugfixes to Go forge scripts

Adds some improvements to the Go forge scripts:

- Adds a `GasUsed` field to the `Broadcast` struct so that transaction broadcast utilities can use it for gas estimation. Gas estimation using the RPC will fail when sending transactions in parallel since the state can change significantly between calls.
- Fixes a bug in the `vm.broadcast` cheatcode where sender nonce were not increased for `vm.CALL`s. This led to a mismatch between the contract addresses generated by the Forge tooling, and what was actually being generated onchain.

* op-chain-ops: isolate broadcast functionality

* review updates

* wrap in broadcast check

* Add nonce tests

* Update op-chain-ops/script/script.go

Co-authored-by: protolambda <[email protected]>

* Fix test

* op-chain-ops: track broadcast nonce, add sanity checks

---------

Co-authored-by: protolambda <[email protected]>

* OPSM: remove structs from `DeploySuperchain` (#11833)

* refactor: remove structs from DeploySuperchainInput and DeploySuperchainOutput

* test: fix tests

* test: fix test

* chore: remove outdated struct references

* pr feedback

* chore: code comments

* maint: add more L1 interfaces (#11822)

Another PR adding contract interfaces. L1 contract interfaces are
way more involved than everything else so we're required to start
replacing the contracts with interfaces all over the place.

* ci: selectively build contracts (#11824)

Updates the contracts-bedrock-tests job to only build the specific
tests that are being tested as part of the test split for that
job. Also merges the other contracts-bedrock-build with
build-devnet-allocs since this is a bottleneck now. Overall impact
is that CI time is now 7-10 minutes.

* Add entrypoint to deploy against existing Superchain (#11791)

* Add entrypoint to deploy against existing Superchain

Creates a separate entrypoint in the deploy script to allow an L2 to be deployed against an existing set of Superchain contracts. The deployment assumes that the Superchain contracts have been deployed correctly. The L2 still gets its own ProxyAdmin, AddressManager, and Safe. The API is additive and backwards-compatible.

* Update packages/contracts-bedrock/scripts/deploy/Deploy.s.sol

Co-authored-by: Maurelian <[email protected]>

* remove redundant call

---------

Co-authored-by: Maurelian <[email protected]>

* test: fix test and variable naming conventions (#11845)

* feat: concurrent alt-da requests (#11698)

* feat: initial goroutine blob submission implementation

test(batcher): add e2e test for concurrent altda requests

doc: add explanation comment for FakeDAServer

chore: fix if condition in altda sendTransaction path

feat: add maxConcurrentDaRequests config flag + semaphore

refactor: batcher to use errgroup for da instead of separate semaphore/waitgroup

fix: nil pointer bug after using wrong function after rebase

fix: defn of maxConcurrentDaRequests=0

fix: TestBatcherConcurrentAltDARequests

chore: remove unneeded if statement around time.Sleep

refactor: use TryGo instead of Go to make logic local and easier to read

chore: clean up some comments in batcher

chore: make batcher shutdown cancel pending altda requests by using shutdownCtx instead of killCtx

* chore(batcher): make altda wg wait + log only when useAltDa is true

* refactor: batcher altda submission code into its own function

* test: refactor batcher e2e test to only count batcher txs

* chore: log errors from wait functions

* chore: refactor and minimize time that e2e batcher system tests can run

* chore: lower timeout duration in test

* fix(batcher): maxConcurentDARequests was not being initialized

* feat: run extra fuzz rounds for new fuzz tests (#11748)

Adds a new script that can run extra fuzz test iterations when
new fuzz tests are added. Can be used in CI or locally to make
sure that new fuzz tests aren't flaky.

* Release op-contracts/v1.6.0 (#11760)

* op-contracts/v1.6.0-rc.1 release (#11528)

* Fix deploy-config absolute prestate

* chore: update semver-lock

---------

Co-authored-by: smartcontracts <[email protected]>
Co-authored-by: Kelvin Fichter <[email protected]>

* proofs Add a proofs-tools docker image  (#11825)

* op-challenger: Add a "big" op-challenger docker image including asterisc and kona

* proofs-tools: Rename op-challenger-deps to proofs-tools and use tagged asterisc and kona sources.

* proofs-tools: Use more recent version of challenger for testing

* proofs-tools: Remove TODO

* proofs-tools: Only build for amd64 - kona doesn't support arm64.

* proofs-tools: Add README

* proofs-tools: Use challenger v1.1.0

* maint: add remaining L1 contract interfaces (#11848)

Adds interfaces for all remaining L1 contracts. L2 contracts are
next!

* feat: Run `op-program` in `op-e2e` action tests (#11846)

* feat: Run `op-program` in `op-e2e` action tests

* configurable forks

* golint / op-program test

* use correct endpoint

* fix: add IBeacon to interface check ignore (#11860)

IBeacon should've thrown an error but didn't, need to investigate
why that was the case. For now I've added it to the ignore list.

* proofs-tools: Fix circleci config to run hold job on proofs-tools release tags (#11856)

* maint: add comment to OptimismPortal2 proof submitters mapping (#11853)

Adds a comment to OptimismPortal2 that further explains the
proofSubmitters mapping.

* fix: add extra context to check interfaces script logs (#11861)

Updates the output of the check-interfaces script to be more clear
about cases when removing items from the EXCLUDE_CONTRACTS list is
acceptable and how to verify that an item is unnecessary.

* feat: Helper for dumping `fp-tests` fixtures in `op-program` action tests (#11855)

* feat: Helper for dumping `fp-tests` fixtures in `op-program` action tests

* adrian review

* proofs-tools: Update ci-docker-tag-op-stack-release.sh regex (#11862)

* chore: export process frames (#11864)

* chore: Cleanup proofs actions (#11858)

* chore: Cleanup proofs actions

* tidy

* lint

* adrian review

* move `RunFaultProofProgram` onto the `L2FaultProofEnv` type

* proofs-tools: Include openssl and certs (#11865)

* cannon: Fix GC emulation of Go programs (#11704)

* cannon: Fix GC emulation of Go programs

Improves Linux/MIPS32 emulation for Go programs that utilize the garbage
collector and goroutine scheduling.

This adds support for the following syscalls:

- getpid - used by the go scheduler
- clock_gettime - used by the go scheduler and for GC assists and to properly emulate
  time related operations such as `time.Sleep`.

Note on GC assists:

The Go GC relies on `clock_gettime` for GC "assists", whereby a mutator can perform a little bit
of GC without waiting for the scheduler to do so.
A monotonic clock (runtime.nanotime) is used to compute the current goroutine's compute budget.
By modeling a MIPS32 CPU that runs at some clock speed (ex: 10 MHz), we can provide a consistent
emulation of monotonic time needed by the Go runtime.
All other clock_gettime flags are handled as unimplemented syscalls.

* fix unsupported syscalls test

* fix some review comments

* address review comments

* update snapshots

* fuzz invalid memory proof

* reduce test runtime

* tweak realtime emulation

* reduce test runtime

* set a high timeout for heavy fuzz tests

* simplify fuzz

* fix heavy tests

* Fix the error usage in cannon (#11368)

* chore(op-program): Turn off `fsync` on pebble KV store (#11863)

* chore: Cleanup proofs actions

* tidy

* lint

* adrian review

* move `RunFaultProofProgram` onto the `L2FaultProofEnv` type

* chore(op-program): Turn off `fsync` on pebble KV store

* Add SendAsync to TxMgr (#11843)

* Add SendAsync to TxMgr

Adds a SendAsync method to TxMgr. I'd like to use this for `op-deployer`, which needs to send multiple transactions in parallel but with predictable nonces. `SendAsync` returns a channel that resolves with the result of each send, but synchronously increases the nonce and prepares the first send prior to returning.

* review updates + tests

* feat: introduce OptimismSuperchainERC20Factory (#11617)

* test: add L2 standard bridge interop unit tests (#13)

* test: add L2 standard bridge interop unit tests

* fix: add tests natspec

* fix: unit tests fixes

* fix: super to legacy tests failing

* fix: mock and expect mint and burn

* fix: add generic factory interface (#14)

* test: add L2 standard bridge interop unit tests

* fix: add tests natspec

* fix: add generic factory interface

* feat: modify OptimismMintableERC20Factory for convert (#17)

* test: add L2 standard bridge interop unit tests

* fix: add tests natspec

* fix: add generic factory interface

* feat: modify OptimismMintableERC20Factory for convert

* fix: use only a public function for create3

* feat: rollback interop factory, modify legacy one

* fix: delete local token return variable

* fix: PR fixes

* feat: add superchain erc20 factory implementation (#23)

* feat: add superchain erc20 factory implementation

* fix: remove createX comments

* test: add superchain erc20 factory tests (#25)

* test: add superchain erc20 factory tests

* test: add erc20 asserts

* test: fix expect emit

* fix: remove comments

* feat: add constructor to superchain ERC20 beacon (#34)

* test: remove factory predeploy etch

----------

Co-authored-by: 0xng <[email protected]>
Co-authored-by: 0xParticle <[email protected]>
Co-authored-by: gotzenx <[email protected]>

* fix: set an arbitrary address for superchain erc20 impl

* fix: deploy a proxy for the beacon on genesis (#45)


---------

Co-authored-by: 0xng <[email protected]>

* fix: conflicts and imports

* fix: interfaces

* chore: add .testdata

* fix: adding back .testdata to gitignore

* fix: new conflicts from ci improvements

---------

Co-authored-by: 0xng <[email protected]>
Co-authored-by: 0xParticle <[email protected]>
Co-authored-by: gotzenx <[email protected]>
Co-authored-by: Disco <[email protected]>

* fix: do not delete test data directory (#11869)

Our "just clean" command was deleting the entirety of .testdata
which gets in several scripts now. We don't actually want to
delete the entirety of .testdata, we want to delete anything
inside of it (except for the gitkeep file).

* codeowners: move go-reviewers team at the end (#11877)

* txmgr: improve code sharing between Send and SendAsync (#11876)

* Revert "txmgr: improve code sharing between Send and SendAsync (#11876)" (#11883)

This reverts commit 87af6f0d033996b0cad2437f75fe8bc626a2b5d5.

* Add op-deployer proof-of-concept (#11804)

This PR adds a proof-of-concept for `op-deployer`, a CLI tool that allows declarative management of live OP Stack chains. This POC supports initializing the declarative chain config (called an "intent") and deploying the Superchain smart contracts using the OP Stack Manager.

An example intent for a Sepolia chain looks like this:

```toml
l1ChainID = 11155111
useFaultProofs = true
useAltDA = false
fundDevAccounts = true
contractArtifactsURL = "file:///Users/matthewslipper/dev/optimism/packages/contracts-bedrock/forge-artifacts"

[superchainRoles]
  proxyAdminOwner = "0xb9cdf788704088a4c0191d045c151fcbe2db14a4"
  protocolVersionsOwner = "0xb910764be39c84d572ff17713c615b5bfd7df650"
  guardian = "0x8c7e4a51acb17719d225bd17598b8a94b46c8767"
```

When deployed, it produces a state file that looks like this:

```json
{
  "version": 1,
  "appliedIntent": {
    "l1ChainID": 11155111,
    "superchainRoles": {
      "proxyAdminOwner": "0xb9cdf788704088a4c0191d045c151fcbe2db14a4",
      "protocolVersionsOwner": "0xb910764be39c84d572ff17713c615b5bfd7df650",
      "guardian": "0x8c7e4a51acb17719d225bd17598b8a94b46c8767"
    },
    "useFaultProofs": true,
    "useAltDA": false,
    "fundDevAccounts": true,
    "contractArtifactsURL": "file:///Users/matthewslipper/dev/optimism/packages/contracts-bedrock/forge-artifacts",
    "chains": null
  },
  "superchainDeployment": {
    "proxyAdminAddress": "0x54a6088c04a7782e69b5031579a1973a9e3c1a8c",
    "superchainConfigProxyAddress": "0xc969afc4799a9350f9f05b60748bc62f2829b03a",
    "superchainConfigImplAddress": "0x08426b74350e7cba5b52be4909c542d28b6b3962",
    "protocolVersionsProxyAddress": "0x212a023892803c7570eb317c77672c8391bf3dde",
    "protocolVersionsImplAddress": "0x2633ac74edb7ae1f1b5656e042285015f9ee477d"
  }
}
```

To use `op-deployer`, run `op-deployer init --dev --l1-chain-id <chain-id>`. This will initialize a deployment intent using the development keys in the repo. Then, run `op-deployer apply --l1-rpc-url <l1-rpc> --private-key <deployer-private-key>` to apply the deployment.

- The contracts deployment is performed by the local Go/Forge tooling.
- Upgrades of the contracts (i.e. modifying them after deploying the contracts afresh) is not currently supported. This will be supported in the future.
- The rest of the pipeline (i.e., deploying L2s and generating genesis files) is not included in this PR to keep it smaller and allow us to get buy-in on the fundamental concepts behind `op-deployer` before further implementation.

* fix(ci): skip files without modified functions (#11891)

Updates test-heavy-fuzz-modified-tests to skip any files that
don't have any modified fuzz tests.

* fix(ci): tweak heavy fuzz run parameters (#11894)

Tweaks various parameters for the heavy fuzz run tests to prevent
the test from taking too long. We can run a daily super heavy fuzz
run instead to catch any rare flakes.

* discard candidate when ahead (#11874)

* discard candidate when ahead

* also discard result.Unsafe for consistency

* remove unnecessary type convertion for FakeGenesis

* Revert "also discard result.Unsafe for consistency"

This reverts commit d2288d4a01bb4176fd1a3c6e1901646c7bb404c7.

* remove type cast

* codeowners: own op-e2e/actions/proofs by proofs team (#11895)

* maint: add interfaces for governance contracts (#11878)

Adds interfaces for the two governance contracts.

* maint: rename Safe folder to safe (#11882)

Renames the Safe folder (uppercase) to safe (lowercase) in line
with all other folders.

* opsm: remove remaining structs (#11854)

* refactor: remove structs from DeployImplementations

* refactor: remove structs from DeployOPChain

* test: fix tests

* Update packages/contracts-bedrock/test/DeployOPChain.t.sol

Co-authored-by: Blaine Malone <[email protected]>

* Update packages/contracts-bedrock/test/DeployOPChain.t.sol

Co-authored-by: Blaine Malone <[email protected]>

* test: add missing assertions

* fix: update fuzz test timeout

---------

Co-authored-by: Blaine Malone <[email protected]>
Co-authored-by: Kelvin Fichter <[email protected]>

* feat: Add channel timeout tests for `op-program` (#11885)

* feat: Add channel timeout tests for `op-program`

* typo

* assert error

* fix comment

* feat: Add garbage frame tests for `op-program` (#11896)

* feat: Add channel timeout tests for `op-program`

* typo

* assert error

* fix comment

* feat: Add garbage frame tests for `op-program`

* assert error

* fix comment

* feat: mintable with permit (#11868)

* contracts-bedrock: add permit functionality to mintable erc20

Adds `permit` functionality to `OptimismMintableERC20` tokens
that are deployed by the `OptimismMintableERC20Factory`.

* feat: max approve permit2 in ERC20Mintable

This commit max approves permit2 automatically for all holders of the
ERC20 bridge token. This enables all users on OP stack chains to skip an
approval step for actions on protocols utilizing permit2 e.g. Uniswap

* fix: constants first

* semver-lock: update

* snapshots: fix

* contracts: add natspec

* semver-lock: update

* contracts-bedrock: fix nits

* snapshots: update

---------

Co-authored-by: Mark Toda <[email protected]>

* add sequence window expiry test (#11897)

* fix: incorrect import in ManageDrippie.s.sol (#11898)

Fixes an incorrect import inside of ManageDrippie.s.sol. Seems to
work just fine when forge install is executed but not otherwise.

* op-e2e: Setup mt-cannon for tests (#11881)

* op-e2e: Use mt-cannon

Introduces a `USE_MT_CANNON` env to optionally enables MT-Cannon in
op-e2e integration tests

* a couple of fixes

* fix todo

* op-program: Inject prefetcher instead of setting code in config (#11902)

* op-program: Support injecting a Prefetcher creator rather than setting code on the Config object.

* op-program: Use an interface for the Prefetcher instead of requiring a concrete type.

* feat: `op-program` actor test API improvements (#11903)

* feat: `op-program` actor test API improvements

* lint

* sort fix

* rebase

* op-program: Record the kv format used. (#11900)

Automatically use the correct format if it has been recorded.

Change the default format to directory. Compatibility with op-challenger is preserved because it now uses the automatic format detection, defaulting to file if not specified (e.g for kona-host).

* feat: Scaffolding for DeployAuthSystemInput (#11889)

* feat: Scaffolding for DeployAuthSystemInput

* fix: Remove undefined import

* feat: Address feedback

* interop: interopgen v2 using OPSM (#11702)

* op-chain-ops/interopgen: OPSM powered interop genesis

* ci: make forge scripts available to op-e2e

* op-chain-ops: address interopgen review comments

* cannon: Handle preimage bounds checks consistently (#11911)

* cannon: Handle preimage bounds checks consistently

* cannon: Cleanup stray comment

* feat: Scaffolding for DeployAuthSystemInput (#11890)

* feat: Scaffolding for DeployAuthSystemInput

* feat: Scaffolding for DeployAuthSystem Output

* feat: Address feedback and remove comments

* Interop: SuperSystem for E2E Tests (#11850)

* op-e2e: interop test setup (work in progress)

* op-e2e: interop test setup

* organization and comment updates

* refactor creation code into WIP system2

* save secrets per L2

* Add SuperSystem Interface ; Add Users and Transactions

* Further Refactoring ; Fix Test

* Add Supervisor

* Add Supervisor Client

* Comment out Proposer

* Add AddL2RPC to Supervisor Client

* Fully link Supervisor and OP Node in E2E Test

* correct RPC call supervisor_checkBlock

* Make EOF acceptable for backend check

* final structure names

* Change unused functions to _ for linter

* fix import order

* Add Github Issue Numbers to TODOs

* tynes comments: add World Resource as configurable

---------

Co-authored-by: protolambda <[email protected]>

* feat: Front OPSM with Proxy and Initialize (#11875)

* fix: getting stack underflow error.

* feat: adding proxy infront of OPStackManager.

* fix: PR comments, we're landing on using the initialize function over setRelease.

* fix: rename function.

* fix: nit

* fix: infering proxy admin from superchain config.

* fix: ran command: just pre-pr-no-build

* fix: nits

* fix: using CommonBase in DeployImplementations.s.sol.

* op-chain-ops: pass superchain proxy admin address as input to deployments script

---------

Co-authored-by: Matt Solomon <[email protected]>
Co-authored-by: protolambda <[email protected]>

* fix: Additional DeployImplementations.s.sol tests (#11914)

* fix: Additional testing for inferring proxy admin from superchain config.

* Apply suggestions from code review

---------

Co-authored-by: Matt Solomon <[email protected]>

* Use the deterministic deployer when broadcasting with CREATE2 (#11915)

* op-e2e: Separate helpers for proofs action tests into a new package (#11920)

* op-e2e: Move action test helpers for proofs to a separate package.

* op-e2e: Use helpers package under proofs rather than a completely separate package tree for helpers.

* cannon: Implement thread-safe ll and sc operations (#11906)

* cannon: Extract RMW op handling from shared logic

* cannon: Add more test cases of LL/SC behavior

* cannon: Cut ll/sc-related logic from common mips code

* cannon: Setup mips helpers to return memory modification info

* cannon: Add new fields to track reserved memory

* cannon: Add a boolean field indicating whether an ll reservation is active

* cannon: Implement ll/sc for MTCannon

* cannon: Add modified sysRead tests for MTCannon

* cannon: Test store operations cleare memory reservations

* cannon: Update SysClockGettime to clear ll memory reservation

* cannon: Fix slither warning - initialize variable

* cannon: Bump MIP2.sol version

* cannon: Run semver, snapshot tasks

* cannon: Cut unused log msg

* cannon: Add new error to MIPS interfaces

* cannon: Cut stale TODO

* Add integration test for apply (#11910)

* Add integration test for apply

Adds an integration test for OP Deployer's `apply` method. This test uses Kurtosis to spin up an in-memory L1, deploy the contracts using OP Deployer, then asserts that there is code at all reported addresses.

* Review updates

* circleci: Enable mt-cannon in develop-fault-proofs (#11928)

* feat: add SuperchainERC20 baseline (#11675)

* feat: add superchain erc20 baseline (#37)

* feat: add superchain erc20 baseline

* feat: make superchain ERC20 simpler

* fix: small version fix and tests

* test: fix test name

* test: remove unused import

* feat: making baseline abstract

* fix: interfaces to comply with the new interface checker

* fix: import paths and empty line

* fix: lint line

---------

Co-authored-by: 0xng <[email protected]>
Co-authored-by: 0xng <[email protected]>

* feat(op-service): add SuperchainWETH and ETHLiquidity to predeploys/addresses.go (#11927)

* Port deployers, add end-to-end contract deployments (#11922)

This PR ports over the deployers in `interopgen` into `op-deployer`, and updates `op-deployer` to support end-to end contract deployments for both the Superchain and individual OP Chains.

This PR includes a couple of bugfixes for things I discovered along the way:

1. The script host is updated to bump the nonce of the address calling the CREATE2 deployer when broadcasting. This fixes a chain/simulation mismatch that blocked contracts from being deployed.
2. The DeployImplementations contract used a fixed CREATE2 salt, which caused problems on repeated deployments. I updated the contract to pull the nonce from the environment as we do elsewhere.

Builds on https://github.com/ethereum-optimism/optimism/pull/11910.

* cannon: Handle unaligned futex addresses (#11929)

* cannon: Update tests for futex unaligned memory behavior

* cannon: Align futex-related addresses when they are set

* cannon: Run lint and semver tasks

* cannon: Add wakeup traversal tests with unaligend addresses

* cannon: Don't panic if ThreadState.FutexAddr is unaligned

* cannon: Run semver lock task

* cannon: Cleanup stray whitespace

* Add Logging ; Fix Broken Maintenance Context (#11931)

* Add Logging ; Fix Broken Maintenance Context

* Remove unneeded timing ; use Testlogger

* feat(op-e2e): Expose `L1Replica` + `L2Engine` + `BlobsStore` endpoints (#11926)

* feat(op-e2e): Expose `L1Replica` + `L2Engine` + `BlobsStore` endpoints

* mutex

* deterministic blob indexing

* proto review

* lint

* op-node: handle crit error events, lift event-system out of driver (#11932)

* op-e2e: Fix compile error (#11933)

* op-e2e: Fix compile error

* ci: Make go-lint a dependency of bedrock-go-tests to prevent merging if it fails.

* op-e2e: Separate actions tests into different packages (#11921)

* op-e2e: Move most action tests into a package based on what they test

* op-e2e: Move batch_queue_test.go to derivation package

* op-e2e: Move eip4844_test.go to batcher package

* op-e2e: Move actions helper code to helpers package

* update makefile

* op-e2e: Fix typo

---------

Co-authored-by: clabby <[email protected]>

* feat(op-e2e): Kona FPP actions test adapter (#11936)

* feat(op-e2e): Kona FPP actions test adapter

* rebase

* lint

* review

* fix result check

* op-e2e: Organize e2e system tests in subdirs (#11939)

* op-e2e: organize system tests

* op-e2e: update CI make targets

* op-e2e: fix artifacts file paths

* op-e2e: Fix paths.

* op-e2e: Fix paths again

---------

Co-authored-by: Adrian Sutton <[email protected]>

* OPSM: miscellaneous fixes and improvements (#11935)

* chore: fix comment

* feat: add assertions

* fix: use method instead of new

* refactor: make salt into an input

* refactor: unify checkOutput function signatures

* chore: update snapshots

* test: fix testContractAuth

* test: fix checkOutput signatures

* fix: update go DeployImplementationsInput struct with salt

* pr feedback

* chore: semver lock

* Disable go patches for cannon MT (#11937)

* Disable go patches for cannon MT.

Fix the prestate file list for devnet to use the binary cannon MT prestates.

* Update Makefile

---------

Co-authored-by: Inphi <[email protected]>

* feat: Scaffolding for DeployAuthSystem Script (#11908)

* feat: Scaffolding for DeployAuthSystem Script

* feat: Remove redundant documentation

* Update DeployAuthSystem.s.sol

* op-batcher: Add String methods to txRef (#11904)

* feat: Rewrite FP contract distinctions as table (#11940)

* feat: Rewrite FP contract distinctions as table

* feat: clarify handling of non-MCP contracts

* feat: Update pending mcp statuses

* op-e2e: fix fuzz cgo build (#11941)

* maint: move WETH contract to correct folders (#11870)

Moves WETH98 over to the universal/ folder where it belongs and
brings DelayedWETH up to the top of the dispute folder since there
is no longer any need for a weth/ subfolder.

* dependabot(gomod): bump github.com/prometheus/client_golang (#11946)

Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.20.3 to 1.20.4.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.20.3...v1.20.4)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add L2 genesis generation support to `op-deployer` (#11938)

Adds support for generating L2 genesis files to `op-deployer. The L2 initialization config is generated by merging in overrides as specified in the intent into a default config with sane values. The outputted genesis file is stored in the stage as a GZIP-compressed, base64-encoded string.

* OPSM: DeployOPChain assertions (#11943)

* chore: add BaseDeployIO for the deploy input and output contracts

* test: add assertions to DeployOPChain

* chore: semver lock

* pr feedback

* feat: remove dgf impl from DeployOpChain and OPSM (#11942)

* fix: Remove `--l2-chain-id` default (#11951)

* feat: Add ASR proxy to OPStackManager (#11952)

* feat: Add ASR proxy to OPStackManager

* feat: Add AnchorStateRegistry blueprint

* ci: run slow Cannon test once per day (#11947)

Updates CI to run the (very) slow Cannon go-lint-and-test suite
once per day instead of running it on merge since it adds at least
5 minutes to CI.

* fix: move IERC20Solady into vendor folder (#11945)

An additional "dependency" folder was added in a recent PR, this
is the same purpose as the "vendor" folder so the interface added
in that PR can simply be moved to the "vendor" folder instead.

* ci: bump semgrep-scan to xlarge (#11948)

We're still having resource issues with a large image. Going to
bump this to xlarge to see if that will fix it.

* test: invariant tests for OptimismSuperchainERC20 (#11776)

* chore: configure medusa with basic supERC20 self-bridging (#19)

- used --foundry-compile-all to ensure the test contract under
  `test/properties` is compiled (otherwise it is not compiled and medusa
  crashes when it can't find it's compiled representation)
- set src,test,script to test/properties/medusa to not waste time
  compiling contracts that are not required for the medusa campaign
- used an atomic bridge, which doesnt allow for testing of several of
  the proposed invariants

fix: delete dead code
test: give the fuzzer a head start
docs: fix properties order
test: document & implement assertions 22, 23  and 24
fix: fixes from self-review
test: guide the fuzzer a little bit less
  previously: initial mint, bound on transfer amount: 146625 calls in 200s
  now: no initial mint, no bound on transfer amount: 176835 calls in 200s
  it doesn't seem to slow the fuzzer down
fix: fixes after lovely feedback by disco
docs: merge both documents and categorized properties by their milestone
fix: fixes from parti's review
fix: feedback from disco
fix: feedback from doc
refactor: separate state transitions from pure properties
docs: update tested properties
refactor: move all assertions into properties contract
fix: move function without assertions back into handler
test: only use assertion mode
fix: improve justfile recipie for medusa

* feat: halmos symbolic tests (#21)

* feat: introduce OptimismSuperchainERC20

* fix: contract fixes

* feat: add snapshots and semver

* test: add supports interface tests

* test: add invariant test

* feat: add parameters to the RelayERC20 event

* fix: typo

* fix: from param description

* fix: event signature and interface pragma

* feat: add initializer

* feat: use unstructured storage and OZ v5

* feat: update superchain erc20 interfaces

* fix: adapt storage to ERC7201

* test: add initializable OZ v5 test

* fix: invariant docs

* fix: ERC165 implementation

* test: improve superc20 invariant (#11)

* fix: gas snapshot

* chore: configure medusa with basic supERC20 self-bridging

- used --foundry-compile-all to ensure the test contract under
  `test/properties` is compiled (otherwise it is not compiled and medusa
  crashes when it can't find it's compiled representation)
- set src,test,script to test/properties/medusa to not waste time
  compiling contracts that are not required for the medusa campaign
- used an atomic bridge, which doesnt allow for testing of several of
  the proposed invariants

* fix: delete dead code

* test: give the fuzzer a head start

* feat: create suite for sybolic tests with halmos

* test: setup and 3 properties with symbolic tests

* chore: remove todo comment

* docs: fix properties order

* test: document & implement assertions 22, 23  and 24

* fix: fixes from self-review

* test: guide the fuzzer a little bit less

previously: initial mint, bound on transfer amount: 146625 calls in 200s
now: no initial mint, no bound on transfer amount: 176835 calls in 200s

it doesn't seem to slow the fuzzer down

* feat: add property for burn

* refactor: remove symbolic address on mint property

* refactor: order the tests based on the property id

* feat: checkpoint

* chore: set xdomain sender on failing test

* chore: enhance mocks

* Revert "Merge branch 'chore/setup-medusa' into feat/halmos-symbolic-tests"

This reverts commit 945d6b6ad265ea5e3790d7ac9c5bf4d6586eb533, reversing
changes made to 5dcb3a89252e9e8fa9b54ba9012e714f7cc96395.

* refactor: remove symbolic addresses to make all of the test work

* chore: remove console logs

* feat: add properties file

* chore: polish

* refactor: enhance test on property 7 using direct try catch (now works)

* fix: review comments

* refactor: add symbolic addresses on test functions

* feat: create halmos toml

* chore: polish test contract and mock

* chore: update property

* refactor: move symbolic folder into properties one

* feat: create advanced tests helper contract

* refactor: enhance tests using symbolic addresses instead of concrete ones

* chore: remove 0 property natspec

* feat: add halmos profile and just script

* chore: rename symbolic folder to halmos

* feat: add halmos commands to justfile

* chore: reorder assertions on one test

* refactor: complete test property seven

* chore: mark properties as completed

* chore: add halmos-cheatcodes dependency

* chore: rename advancedtest->halmosbase

* chore: minimize mocked messenger

* chore: delete empty halmos file

* chore: revert changes to medusa.json

* docs: update changes to PROPERTIES.md from base branch

* test: sendERC20 destination fix

* chore: natspec fixes

---------

Co-authored-by: agusduha <[email protected]>
Co-authored-by: 0xng <[email protected]>
Co-authored-by: teddy <[email protected]>

* test: remaining protocol properties (#26)

* test: cross-user fuzzed bridges + actor setup

* test: fuzz properties 8 and 9

* test: properties 7 and 25

* fix: implement doc's feedback

* test: superc20 tob properties (#27)

* chore: add crytic/properties dependency

* test: extend protocol properties so it also covers ToB erc20 properties

* chore: small linter fixes

* docs: update property list

* test: handlers for remaining superc20 state transitions

* fix: disable ToB properties we are not using and guide the fuzzer a bit more

* fix: disable another ToB property not implemented by solady

* chore: remove zero-initializations

* fix: feedback from disco

* chore: separate fuzz campaign tests in guided vs unguided

* test: dont revert on successful unguided relay

* test: add fuzzed calls to burn and mint

* docs: document the separation of fuzz test functions

* chore: move the properties file to its own directory

* chore: consistently use fuzz_ and property_ + camelcase

* chore: fix typo

* chore: camelcase for handlers as well

* fix: revert change that broke halmos campaign compile :D

* test: fuzz non atomic bridging (#31)

* test: changed mocked messenger ABI for message sending but kept assertions the same

* docs: add new properties 26&27

* test: queue cross-chain messages and test related properties

* test: relay random messages from queue and check associated invariants

* chore: rename bridge->senderc20 method for consistency with relayerc20

* test: not-yet-deployed supertokens can get funds sent to them

* chore: medusa runs forever by default

doable since it also handles SIGINTs gracefully

* chore: document the reason behind relay zero and send zero inconsistencies

* fix: feedback from doc

* fix: walk around possible medusa issue

I'm getting an 'unknown opcode 0x4e' in ProtocolAtomic constructor when
calling the MockL2ToL2CrossDomainMessenger for the first time

* test: unguided handler for sendERC20

* fix: feedback from disco

* chore: remove halmos testsuite

* chore: foundry migration (#40)

* chore: track assertion failures

this is so foundry's invariant contract can check that an assertion
returned false in the handler, while still allowing `fail_on_revert =
false` so we can still take full advantage of medusa's fuzzer & coverage
reports

* fix: explicitly skip duplicate supertoken deployments

* chore: remove duplicated PROPERTIES.md file

* chore: expose data to foundry's external invariant checker

* test: run medusa fuzzing campaign from within foundry

* fix: eagerly check for duplicate deployments

* fix: feedback from doc

* chore: shoehorn medusa campaign into foundry dir structure

* chore: remove PROPERTIES.md file

* chore: delete medusa config

* docs: limited support for subdirectories in test/invariant

* chore: rename contracts to be more sneaky about medusa

* docs: rewrite invariant docs in a way compliant with autogen scripts

* chore: fixes from rebase

* fix: cleanup superc20 invariants (#46)

* chore: revert modifications from medusa campaign

* docs: extra docs on why ForTest contract is required

* doc: add list of all supertoken properties

* chore: run forge fmt

* ci: allow for testfiles to be deleted

* fix: run doc autogen script after rebase

---------

Co-authored-by: Disco <[email protected]>
Co-authored-by: agusduha <[email protected]>
Co-authored-by: 0xng <[email protected]>

* ci: job to check contracts build warnings (#11962)

Adds a new compiler job to check for contract build warnings.
Other existing build jobs don't compile the entire set of contracts
and we do want to be able to check for warnings across the board.

* ci: simplify contract build job inputs (#11965)

Simplifies the inputs to contracts-bedrock-build so that it
takes a single skip_pattern command instead of allowing the user
to specify any build command.

* ci: clean up golang job definitions (#11967)

Cleans up a number of golang job definitions. One PR for now
just so I can see this all work.

* ci: fix config error in cannon tests (#11969)

Fixes a configuration error in the scheduled-cannon-full-tests
job.

* op-node: lazy-dial the supervisor RPC (#11970)

* ci: simplify contracts bedrock tests job (#11966)

Simplifies the contracts-bedrock-tests job so that it takes more
parameters but makes the test command unified. Also replaces the
complex script for checking for modified fuzz tests and simply
heavily fuzzes all tests within any test files that have changed.

* ci: misc cleanups and simplifications (#11968)

Cleanups in a few places, removing unused jobs, etc.

* correct the comment (#11971)

* update op-e2e setup (#11857)

* fix: multiple fuzz flakes (#11981)

Fixes a couple of fuzz flakes that were found when fuzzing
heavily.

* maint: add interfaces for L2 bridge/messaging contracts (#11859)

First PR for adding interfaces for L2 contracts. Adds interfaces
for all of the bridging and message passing contracts.

* chore(op-service): use `errors.New` to replace `fmt.Errorf` with no parameters (#11796)

* fix(ci): semgrep cli breaking change (#11985)

Semgrep CLI tool recently removed the --time option which caused
CI to suddenly break.

* ci: correct perms for tag-service.yml (#11961)

GITHUB_TOKEN no longer gets write access by default so it needs to
be provided with write access explicitly.

* Add inspection commands, fix deployer bugs (#11964)

Adds `op-deployer inspection *` commands to expose the generated genesis and rollup configs via the CLI or Golang libraries. Also fixes a bug in deployment - I accidentally deleted the code that set the deployer nonce, so live chain deployments were reverting.

* refactor: Rename OPSM to OPSMProxy for clarity (#11972)

* chore(rename): Rename opsm to opsmProxy

* fix: Go bindings updated for proxy.

* fix: linting

* fix: pr comment nits.

* feat(op-e2e): Open channel closed after sequence window expiry test (#11993)

* feat(op-e2e): Open channel closed after sequence window expiry test

Adds a test to the proof actions that proves a block at the safe head
after the batcher has opened a channel, allowed the sequence window to
expire, and then attempted to close their open channel after the fact.

* buffer frame

* include extra tx

* feat(op-e2e): Channel timeout late submission test (#11995)

* feat(op-e2e): Channel timeout late submission test

* remove finalization of l1 chain

* ci: separate invariant runs from fuzz runs (#11982)

Using 10k invariant runs would be ridiculously slow.

* ci: Restore ci-builder docker release and remove invalid op-challenger-big-docker-release (#11997)

* maint(ci): clean up release job (#11996)

Cleans up the release job by turning it into a matrix.

* maint(ci): clean up scheduled docker publish (#11999)

Same idea again, cleaning up the scheduled docker publish with the
same technique as the previous PR.

* OPSM: More assertions (#11994)

* refactor: rename var for clarity

* test: add more assertions from ChainAssertions, and some new ones

* chore: ensure unique, clear, consistent revert string IDs

also sorts methods alphabetically for clarity

* fix: var name after rebase

* style: forge fmt

* revert proxyAdmin -> superchainProxyAdmin name change for now

* Update packages/contracts-bedrock/scripts/DeployImplementations.s.sol

Co-authored-by: Maurelian <[email protected]>

* chore: small tweaks from pr feedback

---------

Co-authored-by: Maurelian <[email protected]>

* op-challenger: Support MT-Cannon in run-trace (#11934)

* op-challenger: Support MT-Cannon in run-trace

* ..

* fix multi_test.go

* annotate metrics with mt-cannon

* preserve prestate encoding; use separate dir for mt-cannon

* Update op-challenger/cmd/run_trace.go

Co-authored-by: Adrian Sutton <[email protected]>

---------

Co-authored-by: Adrian Sutton <[email protected]>

* feat: add remaining L2 interfaces (#11984)

One more PR for adding L2 interfaces.

* feat: clean up TODOs and add CI check (#12005)

* maint: clean up TODO tags

Cleans up existing TODO tags, particularly those that referenced
old Linear issues. Updates the todo-checker script to allow
<#issue> as well as <issue>.

* feat(ci): add todo-issues check to main CI

Updates the main CI workflow to run the todo-issues check. For
now this check will ignore any bare TODOs. We can update the
script later to reject bare TODOs.

* contracts: Add more MIPS2 tests (#12003)

* contracts: Add more MIPS2 tests

* remove unused var

* cannon: Clean up fuzz test todos (#12009)

* cannon: Add memory assertions to FuzzStatePreimageRead

* cannon: Rework hint write fuzz test to assert hint expectations

* cannon: Update FuzzStatePreimageWrite to assert on expected preimageKey

* cannon: Remove validation skipping logic from test util

* cannon: Cleanup - simplify code

* cannon: Cleanup - dedupe code

* cannon: Clean up program patching (#11944)

* cannon: Cut todo, reorganize syscalls

* cannon: Rename patchGo to patchGoGC, add comments, cut TODO

* cannon: Only allow gc patching for single-threaded Cannon

* cannon: Cut patch flag from load-elf command altogether

* feat(ci): check contract semver matches natspec (#11992)

Adds a new check to CI that verifies that the semver string
defined in the contract matches the string defined in natspec.

* maint(ct): link to external mermaid diagrams in specs (#12012)

Updates the contracts README to use the mermaid diagrams in specs
to avoid duplicated documentation.

* op-program: Reproducible MT-Cannon prestate (#12011)

* op-program: Reproducible MT-Cannon prestate

* fix mt-cannon proof gen

* cannon: Fix makefile phony target (#12014)

* maint(ci): remove autogenerated invariant docs (#11988)

Removes autogenerated invariant docs from the contracts package.
These autogenerated docs create confusion about where invariants
should be defined (the answer is in the specs) and no one actually
looks at them anyway. Just adds an additional step into CI for
minimal benefit.

* vm-runner: User-prov…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant