Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Merge upstream #4

Merged
merged 1,148 commits into from
Jan 24, 2025
Merged

Merge upstream #4

merged 1,148 commits into from
Jan 24, 2025

Conversation

Rjected
Copy link
Member

@Rjected Rjected commented Jan 24, 2025

merges with upstream

AmadiMichael and others added 30 commits December 17, 2024 20:01
* Config: Enable Isthmus

* Contracts: Add isthmus

* set the isthmus time offset in genesis

* rollup.Config implements types.BlockType interface

---------

Co-authored-by: Vinod Damle <[email protected]>
* fix first-time JWT generation bug

* op-service: improve and test JWT secret loading code

---------

Co-authored-by: protolambda <[email protected]>
… name (ethereum-optimism#13461)

* find lone words, rm more unused imports, print file path and not file name

* fixes
)

* feat(op-deployer): add support for http locator

Given that the downloader code already supports it, we might as well offer the capability.

This is useful for pointing to local registries during development, without having to worry about SSL.

* update locator_test.go

http is now supported.
ftp can be used for unsupported scheme test.
* use disableInitializers

* use disableInitializers

* use disableInitializers

* use disableInitializers

* fixes

* assert the values of storage slot of proxies and implementation contracts

* fix initialize's visibility

* fixes

* fixes

* fixes

* semver bump
* cannon: Update futex-related tests - use 32-bit futex values

* cannon: Update go vm implementation - use 32-bit futex values

* cannon: Update sol 64-bit vm implementation - use 32-bit futex values

* cannon: Update sol 32-bit vm implementation - use 32-bit futex values

* cannon: Update MIPS64 version

* cannon: Update MIPS2 version

* cannon: Run semver lock

* cannon: Update semver comments to match actual version

* cannon: Run semver-lock

* cannon: Randomize futex value in register when testing

* cannon: Tweak comment

* cannon: Ignore the upper bytes in the futex value register

* cannon: Make FutexVal thread field 32-bit

* cannon: Run semver-lock

* cannon: Fix some inconsistencies, run semver-lock

* cannon: Rename testutil method
…3470)

* cannon: Fix parentheses in syscall noop handling

* cannon: Add cannon64 test case for the undefined syscall path
* add script that checks that proxied (non predeploy) contracts call `_disableInitializers` in their constructor

* add check that all initialize functions of proxied contracts (not predeploys) have the external and initializer modifiers

* add to ctb justfile but not in `just check` yet

* fixes

* use semgrep instead

* ...

* fixes

* fixes

* fixes

* fixes

* fixes

* fix comment on semgrep test

* fix semgrep test

* rename rule

* rename rule

* add exception
* feat: Basic upgrade test scaffolding

* Add Superchain Registry

* Fork from Registry

* feat: allowCheatcodes on setPreinstalls in L2Genesis

* feat: Refactory and clean up registry reads

* feat: cleanup Upgrade.s.sol

* fix: Move strings into function body

Upgrade has no constructor

* feat: Some cleanup

* feat: write optimismPortal2

* feat: Automatically run anvil on 8546

* feat: Add upgrade testing to Ci

* fix: use parameter to set UPGRADE_TEST env var

* feat: more cleanup

* fix: PR feedback

* tweak ci

* fix: justfile bug

* fix: Upgrade syntax errors

* add export MAINNET_RPC_URL to ci

* debug address in use

* feat: Allow cheatcodes for FFIInterface

* feat: use EIP1967Helper

* feat: improve comments in Setup.sol

* feat: add support for interop and optimized test setups

- Implemented the ability to use interop in test configurations.
- Added checks to skip tests when certain conditions for forked tests are met.
- Enhanced Setup with options for overriding L2 genesis and creating forks.
- Included additional logging for L1 setup processes.
- Enabled etching of deployed upgrade contracts for testing purposes.

* feat: Use ETH_RPC_URL as env var name

* test fixes for forking

* feat: anvil-fork-stop does not error

* feat: Do not mess with EVM env on a fork test

* feat: Take anvil out of the loop

* feat: Don't warp if forked

* fix: isForkTest not forkBlock

* lint

* feat: enforce forking from sepolia or mainnet

* fix(ctb): test fixes for a forked env

* Revert "feat: Take anvil out of the loop"

This reverts commit c70e8d7.

* feat: remove anvil-fork-stop

also add helpful comments on just commands

* fix: unsilence anvil

* fix snapshot and semgrep

* temp: slightly faster just-upgrade loop

* feat: pin fork block

* feat: change upgrade_test to test_upgrade in config.yml for consistency

* feat: cache forked state

* speculative: skip l2 work

* feat: skip benchmark tests if isFork

* feat: skip deploying L2 tokens when forking

* feat: add skipIfForkTest

* feat: limit upgrade testing to L1 contracts

* feat: move skipping logic into Setup.sol

* feat: Simplify ci config for upgrade tests

* gas snapshot

* delete ignored deploy artifact

* remove unused added vm call

* feat: remove modifications to skipped test paths

* feat: improve block number handling

* feat: Document adding a new contract

* fix: ci config syntax error

* better justfile comments

* feat: skip some tests and log messages when you do

* feat: skip SystemConfig tests with incompatible iface

* feat: add returnIfForkTest and fix a bunch of tests

* feat: more test fixes and tweaks

* gas snapshot

* feat: Add test-upgrade-rerun to justfile and ci config

* feat: Make PINNED_BLOCK_NUMBER be not a magic number

* fix: long standing bug unrelated to this work

the L1 xDM test was exercising the L2 xDM. Fork testing caught this
because it skips deploying L2 contracts.
Deploying the L2 contracts to the same network as the L1 contracts was
always a bit janky anyways.

* feat: PDG: cleaner fork test handling

* feat: remove unused import

* fix incorrect vm.roll/warp skipping logic

* fix: OptimismPortal2 tests

* fix gas snapshot

* fix: restore test_list to contracts-bedrock-tests job

* feat(ci): Split up the test-upgrade CI job

* fix(ci): remove erroneous param reference

* feat: Improve caching of forked state

* feat: use config syntax for inserting rpc url

* debug: cache key

* feat: Fix cache key checksum

* Apply suggestions from code review

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

* clarify comment about setup.setup forking

* feat: remove diff meant for upstack

* fix lint

* feat: make isForkTest private and add a getter

* debugging with annotations

* feat: fix test_findLatestGames_static_succeeds

* fix: OptimismPortal2 test_initialize_succeeds

Read guardian from chain rather than config

* feat: fix returnIfForkTest

Properly uses the return opcode to halt the test.

* fix: Portal tests for forking

* fix: DGF test for forking

* fix: Skip CGT tests on L1StandardBridge

* fix: Skip CGT tests on L1CrossDomainMessenger

* fix DGF testFuzz_create_succeeds

* fix: DGF testFuzz_create_sameUUID_reverts

* feat: remove debugging annotations

* fix: remove left over console

* fix: PermissionedDisputeGame tests

* fix: remove unused import

* fix: test_donateETH_succeeds for fork testing

* fix: isForkTest getter call

* feat: Temporarily skip UnexpectedRootClaim failures on forked upgrade tests

* Revert "feat: remove diff meant for upstack"

This reverts commit cab6856.

* feat: clearer env var name for NO_MATCH_CONTRACTS

* fix gas snapshot

* fix test_constructor_succeeds tests after disableInit rebase

* lint

---------

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

* op-service: RPC subscribe interface fix and utils

* op-service: fix subscribe args pass through
…`copy` (ethereum-optimism#13472)

* prefer .FillBytes() to .Bytes() and copy

The latter can result in an error if the number is less than 32 bytes in length (it gets padded incorrectly).

* add tests

* output to JSON

* add test case for OPM

* tidy up

* use const in test
* feat: Rename Upgrade.s.sol to ForkProd.s.sol

The updated name is more descriptive of what the code currently does. It
also reflects more accurately the current plan of applying the upgrade
outside of this script in a separate one, which may be named
`Upgrade.s.sol` and  will call `OPCM.upgrade()`.

* feat: fix artifcat name

* feat: ForkLive instead of ForkProd
The artifacts for v1.8.0 were generated from the tag `op-contracts-v180-artifacts-base`, which points to `proposal/contracts/v1.8.0` with the non-proxied OPCM backported.

The OPCM was deployed using the `opcm bootstrap` command. The PDG blueprints were updated using a custom script which you can find at the `op-contracts-v180-blueprints-script` [tag](ethereum-optimism@a709118).

As part of this PR, I also added a bunch of tests to assert that the semver versions of deployed contracts are correct. I'll add similar tests for mainnet once the gov vote passes.
…sm#13490)

We need a few things:
- some convenience functions for expanding user functions
- optional data to drive the template
- strict expansion (missingkley=error)
This enables us to parse the input provided to kurtosis for the
enclave creation, and retrieve some basic information to organize the
dynamic information we'll get from the enclave directly.

Namely, the name and network ID for each chain created.
…m#13495)

Our docker builds can be published to the local registry, so kurtosis
can access them.

We need something similar for contracts bundles for now. We'll bring
up a local http server for the duration of the kurtosis command run,
which will serve the contracts.
* show label on fault

* also show label for onExit
…ptimism#13498)

* op-program: Support multiple types of op-program releases

* include type in formatted release string
…hereum-optimism#13479)

* feat: Move OptimismMintableERC721 and Factory contracts to L2 dir

* feat: Remove outdated comment about 721 bridge refunds.

Either we deleted that code path, or it never existed in the 721 bridge
and we just copy pasted the comment form the ERC20 bridge.

* fix: semver
…mism#13496)

This will allow us to point kurtosis to these artifacts, and deploy
them from HEAD.

Right now I'm assuming we have some available "just" recipes for them.
We might decide to do things differently down the road.
* fix: more robust opcm checking upon deploy.

* Update packages/contracts-bedrock/scripts/deploy/ChainAssertions.sol

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

* Update packages/contracts-bedrock/scripts/deploy/ChainAssertions.sol

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

* fix: pr comments.

---------

Co-authored-by: Maurelian <[email protected]>
…m-optimism#13514)

This can be used in isolation to sanity check that a kurtosis-devnet
template expands properly, without having to run the entire workflow
(although it would fail early anyway).
* Update README.md

* Update README.md

* op-supervisor: fix typo in README.md

---------

Co-authored-by: protolambda <[email protected]>
…m#13493)

This enables us to retrieve information about artifacts and services,
for downstream consumption.
mslipper and others added 29 commits January 20, 2025 19:19
This will host the code that interacts with:
- the definition of a devnet (including generation of kurtosis inputs)
- an arbitrary devnet, regardless of whether it's kurtosis-backed or not

On the other hand, kurtosis-devnet remains focused solely on the
instantiation of a devnet on kurtosis.

As such, kurtosis-devnet can depend on devnet-sdk, but not the other
way around.
…gs (ethereum-optimism#13439)

* docker: Fix RedundantTargetPlatform warnings

* docker: Fix LegacyKeyValueFormat warnings
* op-deployer: Improve default hardfork choice

The deploy config was previously created with Holocene activated by default. This PR updates the hardfork selection logic to choose default hardforks based on the contracts version.

* CR updates
…#13866)

* op-node/rollup/derive: Reorganize baseBatchStage

Fixes ethereum-optimism#12567

* reword comment

Co-authored-by: George Knee <[email protected]>

---------

Co-authored-by: George Knee <[email protected]>
…dation of fromda entries (ethereum-optimism#13840)

* op-supervisor: return typed pairs of L1/L2 blocks, and support invalidation of fromda entries

* op-supervisor: support DA db block-invalidation and replacement

* op-supervisor: fix and cover edge-case of replacing a block at later L1 scope
* ci: Publish cannon prestates on develop and op-program releases.

* ci: Use new context

* ci: Remove comma

* fix branch name

* ci: Build all cannon prestates so they can be published

* ci: Not mt64 its just mt

* ci: Remove temporary settings

---------

Co-authored-by: raffaele-oplabs <[email protected]>
…thereum-optimism#13922)

* make interfaces for opcm contracts and use them in tests and scripts

* fix opcm interop deployment
* cannon: Simplify futex handling

* cannon: Cut envar and go ahead and implement new futex behavior directly

* cannon: Cut now unused onWaitComplete() method

* cannon: Update single-threaded mips call to getSyscallArgs

* cannon: Update contracts to match go vm

* cannon: Update solidity tests

* cannon: Reconcile MIPS.sol version with latest release (1.2.1)

* cannon: Update differential tests

* cannon: Cut wakeup field

* cannon: Remove thread futex fields

* cannon: Fix const name

* cannon: Add new cannon state versions

* cannon: Cut wakeup stats

* cannon: Fix ParseStateVersion(), add test

* cannon: Reenable evm validation in tests

* cannon: Temporarily use ad hoc cannon release

* cannon: Run semver lock

* cannon: Fix semver comment, run semver-lock

* cannon: Cut unused constants

* cannon: Use latest cannon release in op-stack-go dockerfile

---------

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

* txmgr: Add custom publish error message handling

Fixes ethereum-optimism#13739

* add prefix TXMGR to env var

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

---------

Co-authored-by: protolambda <[email protected]>
…thereum-optimism#13838)

Changes type to just []byte and uses empty array as not set for simplicity.
…hereum-optimism#13863)

* append -rc if not upgraded yet

* append -rc if not upgraded yet

* fix tests

* fix tests

* fixes

* try fix go tests

* fix contracts tests

* fixes

* fixes

* fixes

* fixes
* contracts-bedrock: remove GCT code

This commit removes the custom gas token code from the L2 contracts.
The interop contracts were tightly integrated into this code,
so the diff is quite large.

We cannot remove the getters from the `L1Block` contract because
chains did a genesis with `WETH` that calls out to the `L1Block`
contract. `WETH` is not proxied, so we cannot modify the bytecode
without an irregular state transition. Just going to leave the
functions on `L1Block` for simplicity.

Both the messenger and the bridge have the references to CGT removed.

* l1block: test coverage

* contracts-bedrock: more cleanup

* compiler error

* gas-snapshot

* contracts-bedrock: remove dead imports

* ctb: unused imports

* snapshots: update

* interfaces

* ctb: fix
We just requested the header by hash so can skip hashing the header to update the cache and just use the already known hash.
…um-optimism#13833)

* op-challenger: Migrate config over to supporting multiple L2s

* op-challenger: Update flags to support multiple L2s

* op-dispute-mon: Keep the single network flag logic
 (ethereum-optimism#13803)

* feat: upgrade ASR to new proxy and impl

* feat: semgrep fix for _ prefixed args

* feat: simplify vm.expectCommit call

* save newly deployed contracts in ForkLive

* self review changes

* feat: re-skip tests (unskip moved to later PR)

* feat: Check ImplemenationSet events

* feat: Add dispute game version assertions to check the upgrade

* fix unused imports

* review suggestions

* feat: Avoid some casting

* update snapshots

* refactor dispute game changes into deployAndSetNewGameImpl

* lint

* feat: Deploy using DeployUtils vm.getCode() instead of new

* feat: remove concrete contract imports

* semver lock

* feat: fix non-upgrader test

* lint
* op-deployer: Update dispute game absolute prestate

* publish using self hosted runner

* update ci builder

* revert config version

* Revert "op-deployer: Update dispute game absolute prestate"

This reverts commit 97cdbea.

* BUMP IT
…m-optimism#13850)

* op-program: Move towards using eth.ChainID instead of uint64

* op-program: Move oracle API over to ChainID

* Review feedback
@Rjected Rjected merged commit 47bf007 into develop Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.