optimism icon indicating copy to clipboard operation
optimism copied to clipboard

op-e2e: fix interop tests

Open roberto-bayardo opened this issue 1 year ago • 10 comments

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.

roberto-bayardo avatar Oct 12 '24 18:10 roberto-bayardo

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.

see 1 file with indirect coverage changes

codecov[bot] avatar Oct 12 '24 19:10 codecov[bot]

@mds1 Any idea why this is necessary?

tynes avatar Oct 14 '24 23:10 tynes

@maurelian has been working on integrating OPCM into this file recently so likely will know better than me

mds1 avatar Oct 15 '24 03:10 mds1

@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?

maurelian avatar Oct 15 '24 14:10 maurelian

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"

roberto-bayardo avatar Oct 15 '24 15:10 roberto-bayardo

Are you able to reproduce @maurelian by following my instructions?

roberto-bayardo avatar Oct 17 '24 14:10 roberto-bayardo

trying now.

maurelian avatar Oct 17 '24 14:10 maurelian

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

roberto-bayardo avatar Oct 17 '24 14:10 roberto-bayardo

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...

maurelian avatar Oct 17 '24 16:10 maurelian

@tynes noted that "just build" in the packages/contracts-bedrock/ does build that file. So maybe "make devnet-allocs" just needs to invoke that?

roberto-bayardo avatar Oct 17 '24 17:10 roberto-bayardo

This change seems stale, the tests run, closing.

protolambda avatar Dec 16 '24 12:12 protolambda