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

devnet-sdk: Go in-process backend #14915

Merged
merged 2 commits into from
Mar 27, 2025
Merged

devnet-sdk: Go in-process backend #14915

merged 2 commits into from
Mar 27, 2025

Conversation

protolambda
Copy link
Contributor

@protolambda protolambda commented Mar 17, 2025

Description

Implements an in-process Go based backend of the devnet-sdk, for faster test iteration / development cycles / efficient CI.

Features:

  • interop deployment
  • L1 fake-beacon CL + geth EL
  • L2 op-node CL + op-geth EL, per L2 chain
  • L2 op-proposer
  • L2 op-batcher
  • L2 op-supervisor

And composable, so each type of chain / node can be added as desired.

This also adds getter methods to the batcher and proposer services, to retrieve their RPC endpoints.

In separate PRs we'll swap interopgen for op-deployer usage (see #15059), and support the op-challenger (see #15057)

Tests

Includes a system test, that runs the system, and sees if both L2s reach block 20, as sanity-check.

Additional context

Metadata

Fix #14909

Copy link

codecov bot commented Mar 17, 2025

Codecov Report

Attention: Patch coverage is 93.61393% with 44 lines in your changes missing coverage. Please review.

Project coverage is 42.41%. Comparing base (67eea1e) to head (fd888e8).
Report is 5 commits behind head on develop.

Files with missing lines Patch % Lines
devnet-sdk/systemgo/keyring.go 0.00% 8 Missing ⚠️
devnet-sdk/systemext/addrbook.go 0.00% 6 Missing ⚠️
devnet-sdk/systemgo/interopgen.go 95.04% 6 Missing ⚠️
devnet-sdk/systemgo/l2_proposer.go 92.00% 5 Missing and 1 partial ⚠️
op-batcher/batcher/service.go 0.00% 5 Missing ⚠️
op-proposer/proposer/service.go 0.00% 5 Missing ⚠️
devnet-sdk/systemgo/l1_nodes.go 96.00% 2 Missing and 1 partial ⚠️
devnet-sdk/systemgo/l2_cl.go 97.22% 2 Missing and 1 partial ⚠️
devnet-sdk/systemgo/orchestrator.go 81.81% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #14915      +/-   ##
===========================================
- Coverage    46.19%   42.41%   -3.78%     
===========================================
  Files         1171     1010     -161     
  Lines       100291    90723    -9568     
===========================================
- Hits         46325    38483    -7842     
+ Misses       50628    49077    -1551     
+ Partials      3338     3163     -175     
Flag Coverage Δ
cannon-go-tests-32 ?
cannon-go-tests-64 ?
contracts-bedrock-tests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
devnet-sdk/system2/l2_network.go 75.00% <ø> (ø)
devnet-sdk/systemgo/keys.go 100.00% <100.00%> (ø)
devnet-sdk/systemgo/l2_batcher.go 100.00% <100.00%> (ø)
devnet-sdk/systemgo/l2_el.go 100.00% <100.00%> (ø)
devnet-sdk/systemgo/supervisor.go 100.00% <100.00%> (ø)
devnet-sdk/systemgo/system.go 100.00% <100.00%> (ø)
devnet-sdk/systemgo/orchestrator.go 81.81% <81.81%> (ø)
devnet-sdk/systemgo/l1_nodes.go 96.00% <96.00%> (ø)
devnet-sdk/systemgo/l2_cl.go 97.22% <97.22%> (ø)
op-batcher/batcher/service.go 0.00% <0.00%> (ø)
... and 5 more

... and 175 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@protolambda protolambda force-pushed the devnet-sdk-go-system branch from ca5bc88 to 6fe687f Compare March 19, 2025 22:24
@protolambda protolambda changed the base branch from develop to devnet-sdk-interfaces March 19, 2025 22:24
@protolambda protolambda changed the title devnet-sdk: system interface draft devnet-sdk: Go in-process backend Mar 19, 2025
@protolambda
Copy link
Contributor Author

This PR tracks the Go in-process implementation of the devnet-SDK system now.

The devnet-SDK interfaces work is in #14955 (base of this PR)

@protolambda protolambda force-pushed the devnet-sdk-go-system branch 2 times, most recently from 3955b2c to 3457374 Compare March 20, 2025 13:37
Base automatically changed from devnet-sdk-interfaces to develop March 20, 2025 15:06
@protolambda protolambda force-pushed the devnet-sdk-go-system branch from 92d0c2a to dfb0a2f Compare March 20, 2025 15:50
@protolambda protolambda force-pushed the devnet-sdk-go-system branch from f4e1a96 to 1b9e881 Compare March 27, 2025 00:29
@protolambda protolambda force-pushed the devnet-sdk-go-system branch from 1b9e881 to 6395172 Compare March 27, 2025 00:33
@protolambda protolambda marked this pull request as ready for review March 27, 2025 00:44
@protolambda protolambda requested review from a team as code owners March 27, 2025 00:44
Copy link
Contributor

@ajsutton ajsutton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the key thing is to work out how to integrate this with the systest acquirer process so that if a kurtosis devnet isn't specified the test just spins up a suitable network. But there seems to be quite a difference in the level of detail tests provide to validate networks and what's required to spin up a new chain with this. I suspect providing defaults would work well but it will be interesting to integrate and see how to make it work in practice.

But I think this looks good generally.

@protolambda protolambda added the A-devnet-sdk Area: devnet-sdk label Mar 27, 2025
@protolambda protolambda enabled auto-merge March 27, 2025 13:26
@protolambda protolambda added this pull request to the merge queue Mar 27, 2025
Merged via the queue into develop with commit d5cb9a2 Mar 27, 2025
50 checks passed
@protolambda protolambda deleted the devnet-sdk-go-system branch March 27, 2025 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-devnet-sdk Area: devnet-sdk
Projects
None yet
Development

Successfully merging this pull request may close these issues.

devnet-SDK: support in-process Go system variant (like op-e2e)
5 participants