-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
op-chain-ops/script: turn any Go struct/interface into a precompile with ABI encoding/decoding #11444
Conversation
1763bd5
to
f7bd253
Compare
…ith ABI encoding/decoding
f7bd253
to
11be530
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice reflection magic, this looks good to me, the only suggestion is more comments so that other people can more easily maintain but fine with merging as is
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of the ABI specifics went over my head, but I was able to look over the reflection aspects.
There are some string-manipulations that seem fragile, I left a comment on the one that stuck out to me. But for the sake of driving this forward with the Forge Scripts in Go, I think this is good to go on to the next stage. If we see issues when using this, we can come back and improve things.
…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] <support@github.com> 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] <support@github.com> 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] <support@github.com> 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] <support@github.com> 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] <support@github.com> 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 <k@oplabs.co> * 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] <support@github.com> 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] <support@github.com> 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 <mark.tyneway@gmail.com> * 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 <seb@oplabs.co> * 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 <proto@protolambda.com> Co-authored-by: tchardin <tdotchardin@gmail.com> * 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] <support@github.com> 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 <meredith.a.baxter@gmail.com> --------- Co-authored-by: mbaxter <meredith.a.baxter@gmail.com> * 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 <meredith@oplabs.co> * 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 <meredith@oplabs.co> * 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 <meredith@oplabs.co> * 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 <mlaw2501@gmail.com> * 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 <mlaw2501@gmail.com> * 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] <support@github.com> 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 <john@oplabs.co> * Update packages/contracts-bedrock/STYLE_GUIDE.md --------- Co-authored-by: Maurelian <john@oplabs.co> * 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 <proto@protolambda.com> 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 <adrian@oplabs.co> * 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] <support@github.com> 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] <support@github.com> 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 <ben@clab.by> * 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 <seb@oplabs.co> * 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 <adrian@oplabs.co> Co-authored-by: refcell <abigger87@gmail.com> * 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 <matt@mattsolomon.dev> * docs: update Co-authored-by: Matt Solomon <matt@mattsolomon.dev> * readme: update Co-authored-by: Matt Solomon <matt@mattsolomon.dev> * docs: update Co-authored-by: Matt Solomon <matt@mattsolomon.dev> * docs: update Co-authored-by: Matt Solomon <matt@mattsolomon.dev> * docs: update Co-authored-by: Maurelian <john@oplabs.co> * versions: use latest * ci: fix * CONTRIBUTING: update * ci: fix * lint: fix --------- Co-authored-by: protolambda <proto@protolambda.com> Co-authored-by: Matt Solomon <matt@mattsolomon.dev> Co-authored-by: Maurelian <john@oplabs.co> * 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 <amadimichaeld@gmail.com> * 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 <seb@oplabs.co> * 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 <me@dany.al> Co-authored-by: protolambda <proto@protolambda.com> Co-authored-by: Sebastian Stammler <seb@oplabs.co> * 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] <support@github.com> * deps: update --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com> * 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 <adrian@oplabs.co> * 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] <support@github.com> 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] <support@github.com> 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 <ng@defi.sucks> Co-authored-by: Disco <131301107+0xDiscotech@users.noreply.github.com> * 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 <matt@mattsolomon.dev> * 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 <matt@mattsolomon.dev> * Update packages/contracts-bedrock/test/kontrol/README.md Co-authored-by: Matt Solomon <matt@mattsolomon.dev> * Update packages/contracts-bedrock/test/kontrol/README.md Co-authored-by: Matt Solomon <matt@mattsolomon.dev> * Update packages/contracts-bedrock/test/kontrol/README.md Co-authored-by: Matt Solomon <matt@mattsolomon.dev> * Update packages/contracts-bedrock/test/kontrol/README.md Co-authored-by: Matt Solomon <matt@mattsolomon.dev> * 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 <juanconrod@protonmail.com> Co-authored-by: Matt Solomon <matt@mattsolomon.dev> * 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 <matt@mattsolomon.dev> --------- Co-authored-by: Matt Solomon <matt@mattsolomon.dev> * 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 <adrian@oplabs.co> * 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 <adrian@oplabs.co> --------- Co-authored-by: inphi <mlaw2501@gmail.com> --------- Co-authored-by: Adrian Sutton <adrian@oplabs.co> * 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 <adrian@oplabs.co> Co-authored-by: clabby <ben@clab.by> * 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 <adrian@oplabs.co> Co-authored-by: refcell <abigger87@gmail.com> * 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 <abigger87@gmail.com> * 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 <mlaw2501@gmail.com> * 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 <ben@clab.by> Co-authored-by: refcell <abigger87@gmail.com> * 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 <seb@oplabs.co> * 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 <seb@oplabs.co> Co-authored-by: Adrian Sutton <adrian@oplabs.co> * 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 <proto@protolambda.com> * 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 <adrian@symphonious.net> * 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 <adrian@symphonious.net> * 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] <support@github.com> 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 <mlaw2501@gmail.com> --------- Co-authored-by: Inphi <mlaw2501@gmail.com> * 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) …
This is so cool! |
…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] <support@github.com> 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] <support@github.com> 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] <support@github.com> 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] <support@github.com> 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] <support@github.com> 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 <k@oplabs.co> * 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] <support@github.com> 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] <support@github.com> 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 <mark.tyneway@gmail.com> * 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 <seb@oplabs.co> * 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 <proto@protolambda.com> Co-authored-by: tchardin <tdotchardin@gmail.com> * 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] <support@github.com> 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 <meredith.a.baxter@gmail.com> --------- Co-authored-by: mbaxter <meredith.a.baxter@gmail.com> * 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 <meredith@oplabs.co> * 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 <meredith@oplabs.co> * 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 <meredith@oplabs.co> * 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 <mlaw2501@gmail.com> * 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 <mlaw2501@gmail.com> * 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] <support@github.com> 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 <john@oplabs.co> * Update packages/contracts-bedrock/STYLE_GUIDE.md --------- Co-authored-by: Maurelian <john@oplabs.co> * 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 <proto@protolambda.com> 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 <adrian@oplabs.co> * 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] <support@github.com> 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] <support@github.com> 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 <ben@clab.by> * 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 <seb@oplabs.co> * 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 <adrian@oplabs.co> Co-authored-by: refcell <abigger87@gmail.com> * 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 <matt@mattsolomon.dev> * docs: update Co-authored-by: Matt Solomon <matt@mattsolomon.dev> * readme: update Co-authored-by: Matt Solomon <matt@mattsolomon.dev> * docs: update Co-authored-by: Matt Solomon <matt@mattsolomon.dev> * docs: update Co-authored-by: Matt Solomon <matt@mattsolomon.dev> * docs: update Co-authored-by: Maurelian <john@oplabs.co> * versions: use latest * ci: fix * CONTRIBUTING: update * ci: fix * lint: fix --------- Co-authored-by: protolambda <proto@protolambda.com> Co-authored-by: Matt Solomon <matt@mattsolomon.dev> Co-authored-by: Maurelian <john@oplabs.co> * 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 <amadimichaeld@gmail.com> * 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 <seb@oplabs.co> * 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 <me@dany.al> Co-authored-by: protolambda <proto@protolambda.com> Co-authored-by: Sebastian Stammler <seb@oplabs.co> * 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] <support@github.com> * deps: update --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com> * 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 <adrian@oplabs.co> * 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] <support@github.com> 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] <support@github.com> 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 <ng@defi.sucks> Co-authored-by: Disco <131301107+0xDiscotech@users.noreply.github.com> * 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 <matt@mattsolomon.dev> * 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 <matt@mattsolomon.dev> * Update packages/contracts-bedrock/test/kontrol/README.md Co-authored-by: Matt Solomon <matt@mattsolomon.dev> * Update packages/contracts-bedrock/test/kontrol/README.md Co-authored-by: Matt Solomon <matt@mattsolomon.dev> * Update packages/contracts-bedrock/test/kontrol/README.md Co-authored-by: Matt Solomon <matt@mattsolomon.dev> * Update packages/contracts-bedrock/test/kontrol/README.md Co-authored-by: Matt Solomon <matt@mattsolomon.dev> * 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 <juanconrod@protonmail.com> Co-authored-by: Matt Solomon <matt@mattsolomon.dev> * 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 <matt@mattsolomon.dev> --------- Co-authored-by: Matt Solomon <matt@mattsolomon.dev> * 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 <adrian@oplabs.co> * 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 <adrian@oplabs.co> --------- Co-authored-by: inphi <mlaw2501@gmail.com> --------- Co-authored-by: Adrian Sutton <adrian@oplabs.co> * 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 <adrian@oplabs.co> Co-authored-by: clabby <ben@clab.by> * 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 <adrian@oplabs.co> Co-authored-by: refcell <abigger87@gmail.com> * 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 <abigger87@gmail.com> * 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 <mlaw2501@gmail.com> * 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 <ben@clab.by> Co-authored-by: refcell <abigger87@gmail.com> * 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 <seb@oplabs.co> * 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 <seb@oplabs.co> Co-authored-by: Adrian Sutton <adrian@oplabs.co> * 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 <proto@protolambda.com> * 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 <adrian@symphonious.net> * 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 <adrian@symphonious.net> * 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] <support@github.com> 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 <mlaw2501@gmail.com> --------- Co-authored-by: Inphi <mlaw2501@gmail.com> * 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] <support@github.com> 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 <shandongzhejiang@icloud.com> * 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…
…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] <support@github.com> 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] <support@github.com> 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] <support@github.com> 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] <support@github.com> 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] <support@github.com> 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 <k@oplabs.co> * 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] <support@github.com> 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] <support@github.com> 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 <mark.tyneway@gmail.com> * 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 <seb@oplabs.co> * 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 <proto@protolambda.com> Co-authored-by: tchardin <tdotchardin@gmail.com> * 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] <support@github.com> 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 <meredith.a.baxter@gmail.com> --------- Co-authored-by: mbaxter <meredith.a.baxter@gmail.com> * 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 <meredith@oplabs.co> * 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 <meredith@oplabs.co> * 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 <meredith@oplabs.co> * 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 <mlaw2501@gmail.com> * 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 <mlaw2501@gmail.com> * 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] <support@github.com> 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 <john@oplabs.co> * Update packages/contracts-bedrock/STYLE_GUIDE.md --------- Co-authored-by: Maurelian <john@oplabs.co> * 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 <proto@protolambda.com> 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 <adrian@oplabs.co> * 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] <support@github.com> 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] <support@github.com> 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 <ben@clab.by> * 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 <seb@oplabs.co> * 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 <adrian@oplabs.co> Co-authored-by: refcell <abigger87@gmail.com> * 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 <matt@mattsolomon.dev> * docs: update Co-authored-by: Matt Solomon <matt@mattsolomon.dev> * readme: update Co-authored-by: Matt Solomon <matt@mattsolomon.dev> * docs: update Co-authored-by: Matt Solomon <matt@mattsolomon.dev> * docs: update Co-authored-by: Matt Solomon <matt@mattsolomon.dev> * docs: update Co-authored-by: Maurelian <john@oplabs.co> * versions: use latest * ci: fix * CONTRIBUTING: update * ci: fix * lint: fix --------- Co-authored-by: protolambda <proto@protolambda.com> Co-authored-by: Matt Solomon <matt@mattsolomon.dev> Co-authored-by: Maurelian <john@oplabs.co> * 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 <amadimichaeld@gmail.com> * 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 <seb@oplabs.co> * 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 <me@dany.al> Co-authored-by: protolambda <proto@protolambda.com> Co-authored-by: Sebastian Stammler <seb@oplabs.co> * 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] <support@github.com> * deps: update --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mark Tyneway <mark.tyneway@gmail.com> * 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 <adrian@oplabs.co> * 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] <support@github.com> 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] <support@github.com> 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 <ng@defi.sucks> Co-authored-by: Disco <131301107+0xDiscotech@users.noreply.github.com> * 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 <matt@mattsolomon.dev> * 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 <matt@mattsolomon.dev> * Update packages/contracts-bedrock/test/kontrol/README.md Co-authored-by: Matt Solomon <matt@mattsolomon.dev> * Update packages/contracts-bedrock/test/kontrol/README.md Co-authored-by: Matt Solomon <matt@mattsolomon.dev> * Update packages/contracts-bedrock/test/kontrol/README.md Co-authored-by: Matt Solomon <matt@mattsolomon.dev> * Update packages/contracts-bedrock/test/kontrol/README.md Co-authored-by: Matt Solomon <matt@mattsolomon.dev> * 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 <juanconrod@protonmail.com> Co-authored-by: Matt Solomon <matt@mattsolomon.dev> * 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 <matt@mattsolomon.dev> --------- Co-authored-by: Matt Solomon <matt@mattsolomon.dev> * 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 <adrian@oplabs.co> * 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 <adrian@oplabs.co> --------- Co-authored-by: inphi <mlaw2501@gmail.com> --------- Co-authored-by: Adrian Sutton <adrian@oplabs.co> * 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 <adrian@oplabs.co> Co-authored-by: clabby <ben@clab.by> * 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 <adrian@oplabs.co> Co-authored-by: refcell <abigger87@gmail.com> * 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 <abigger87@gmail.com> * 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 <mlaw2501@gmail.com> * 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 <ben@clab.by> Co-authored-by: refcell <abigger87@gmail.com> * 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 <seb@oplabs.co> * 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 <seb@oplabs.co> Co-authored-by: Adrian Sutton <adrian@oplabs.co> * 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 <proto@protolambda.com> * 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 <adrian@symphonious.net> * 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 <adrian@symphonious.net> * 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] <support@github.com> 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 <mlaw2501@gmail.com> --------- Co-authored-by: Inphi <mlaw2501@gmail.com> * 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] <support@github.com> 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 <shandongzhejiang@icloud.com> * 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…
Description
This lets you turn any Go object into a precompile with automatic ABI handling.
This is a lot like the Geth RPC server, where you can put some public methods on an object, and it turns into JSON-RPC handled routes.
Using reflection, we turn struct fields and methods of an object automatically in a table of functions.
Each function is matched by the 4-byte selector, and automatically does the ABI decoding of inputs, and ABI-encoding of outputs.
This makes it trivially easy to put configs, cheat-functions, etc. into the Forge script environment.
Tests
Creates an example precompile object, with embedded struct and some different setters/getters, showing off the automatic ABI functionality.
Additional context
Part of a PR stack, to run Forge deployment scripts in Go.