• Maurelian's avatar
    Introduce forked upgrade testing (#13323) · fa60a286
    Maurelian authored
    * 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 c70e8d7fd6f65319050b06df4eeb78461a682260.
    
    * 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: default avatarMatt Solomon <matt@mattsolomon.dev>
    
    * 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 cab685617fd9db6961debe503f81042575b848f7.
    
    * feat: clearer env var name for NO_MATCH_CONTRACTS
    
    * fix gas snapshot
    
    * fix test_constructor_succeeds tests after disableInit rebase
    
    * lint
    
    ---------
    Co-authored-by: default avatarMatt Solomon <matt@mattsolomon.dev>
    fa60a286
PermissionedDisputeGame.t.sol 12.1 KB