op-e2e: fix interop tests
Description
op-e2e/interop tests are currently failing when run in a fresh repo because "make devnet-allocs" isn't generating all the necessary forge artifacts, specifically DeployOPChain.sol. This PR adds the appropriate dependency to generate it.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 64.42%. Comparing base (
9d9dc32) to head (5ce0449). Report is 566 commits behind head on develop.
Additional details and impacted files
@@ Coverage Diff @@
## develop #12438 +/- ##
===========================================
- Coverage 64.60% 64.42% -0.19%
===========================================
Files 52 52
Lines 4371 4371
===========================================
- Hits 2824 2816 -8
- Misses 1372 1381 +9
+ Partials 175 174 -1
| Flag | Coverage Δ | |
|---|---|---|
| cannon-go-tests | 64.42% <ø> (-0.19%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
@mds1 Any idea why this is necessary?
@maurelian has been working on integrating OPCM into this file recently so likely will know better than me
@roberto-bayardo what error are you seeing, and what are the steps to reproduce?
Can you try running forge clean in packages/contracts-bedrock to see if that addresses the issue?
it's easy to reproduce the issue. Just rm -Rf forge-artifacts, re-run "make devnet-allocs", then try to run the interop tests and they will fail because DeployOPChain artifacts won't be there.
Similarly you'll see the failure if you clone a brand new repo and then try to run e2e tests after "make devnet-allocs"
Are you able to reproduce @maurelian by following my instructions?
trying now.
This is what I see:
supersystem.go:166:
Error Trace: /Users/bayardo/src/github.com/ethereum-optimism/optimism/op-e2e/interop/supersystem.go:166
/Users/bayardo/src/github.com/ethereum-optimism/optimism/op-e2e/interop/supersystem.go:486
/Users/bayardo/src/github.com/ethereum-optimism/optimism/op-e2e/interop/supersystem.go:103
/Users/bayardo/src/github.com/ethereum-optimism/optimism/op-e2e/interop/interop_test.go:34
Error: Received unexpected error:
failed to deploy L2 1374639980032 to L1: failed to deploy L2 OP chain: failed to load DeployOPChain script: could not load script artifact: failed to open artifact "DeployOPChain.s.sol/DeployOPChain.json": open DeployOPChain.s.sol/DeployOPChain.json: no such file or directory
Test: TestInteropTrivial
Yes I am able to get exactly the same error.
Specifically on develop in a fresh repo I did:
make devnet-allocs
cd op-e2e
gotestsum --format standard-verbose -- -test.v ./interop/...
I think there should be another way to fix this though...
@tynes noted that "just build" in the packages/contracts-bedrock/ does build that file. So maybe "make devnet-allocs" just needs to invoke that?
This change seems stale, the tests run, closing.