-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Introduce forked upgrade testing #13323
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #13323 +/- ##
===========================================
- Coverage 47.59% 47.26% -0.34%
===========================================
Files 943 943
Lines 78827 78827
Branches 803 803
===========================================
- Hits 37515 37254 -261
- Misses 38509 38820 +311
+ Partials 2803 2753 -50
Flags with carried forward coverage won't be shown. Click here to find out more. |
49dfc33
to
180b5bc
Compare
7cedb35
to
6feb42f
Compare
43c4bf1
to
09045f2
Compare
Read guardian from chain rather than config
Properly uses the return opcode to halt the test.
…stry-2 Fix tests on forked networks
This reverts commit cab6856.
…stry-3 Skip UnexpectedRootClaim failures
@@ -1195,7 +1256,7 @@ workflows: | |||
- contracts-bedrock-tests: | |||
# Test everything except PreimageOracle.t.sol since it's slow. | |||
name: contracts-bedrock-tests | |||
test_list: find test -name "*.t.sol" -not -name "PreimageOracle.t.sol" |
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.
I introduced a bug here which caused ONLY the preimage oracle tests to run.
This PR enable running the foundry test suite against a fork of mainnet or sepolia.
Key changes:
Upgrade.s.sol
which can be etched in place ofDeploy.s.sol
, and instead of deploying new contracts, it retrieves them from the forked node, and saves them to the deployment artifact so that they will be tested.isForkTest
and functionskipIfForkTest()
these can be used to identify when in a fork, and skip the test or take other action if necessary.l2Genesis.setUp()
is skipped andSetup.L2()
returns early when in a fork test.just test-upgrade
command which sets the env vars necessary to run the test on a fork. This command runs only tests in thetest/dispute
andtest/L1
directory. This is necessary in order to keep the run time reasonable, and the majority of other tests are not relevant to forked upgrade testing.Limitations:
Encountered a total of 56 failing tests, 164 tests succeeded
.develop
, they will be skipped, and labelled withTODO(opcm upgrades):
so that they can be fixed in a child PR.