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

feat: l2-geth and op-node containers 👨‍🚀 #70

Merged
merged 7 commits into from
Oct 30, 2023
Merged

Conversation

merklefruit
Copy link
Contributor

@merklefruit merklefruit commented Oct 25, 2023

Stages

This PR adds the ability to build op-geth as L2Client and op-node as RollupClient.
The rollup node image is able to start correctly but there is a networking issue between it and other components.

More specifically, the rollup client can't reach the l1 ws endpoint:

failed permanently after 10 attempts: address unavailable (ws://opup-l1:8546)"
t=2023-10-29T17:48:32+0000 lvl=crit msg="Application failed"                  
    message="failed to setup: unable to create the rollup node: failed to init L1: 
	failed to get L1 RPC client: failed to dial L1 address (ws://opup-l1:8546): operation failed 
	permanently after 10 attempts: address unavailable (ws://opup-l1:8546)"

This is most likely because in order for containers to communicate through their service names they have to be part of the same Docker network. This will be addressed in a separate issue:

Composer

The build_image section has been modified with a new way to build images from scratch.
Here is what the new API looks like:

let context = BuildContext::from_dockerfile(dockerfile)
    // We can add build flags (key=value) that can be referenced in the Dockerfile
    .add_build_arg("TARGETARCH", "arm64")
    // or single files by specifying their source path and the destination 
    // path in the docker image context
    .add_file(monorepo.join("go.mod"), "go.mod")
    .add_file(monorepo.join("go.sum"), "go.sum")
    // same for directories (which will get copied recursively)
    .add_dir(monorepo.join("op-node"), "op-node");

self.rollup_exec.build_image(&image_name, context).await?;

@merklefruit merklefruit added C-critical Category: Modifies critical code A-composer Area: op-composer related labels Oct 25, 2023
@merklefruit merklefruit requested a review from refcell October 25, 2023 06:49
@merklefruit merklefruit self-assigned this Oct 25, 2023
@merklefruit merklefruit marked this pull request as draft October 25, 2023 07:47
@merklefruit merklefruit changed the title feat: l2-geth container 👨‍🚀 feat: l2-geth and op-node containers 👨‍🚀 Oct 29, 2023
@merklefruit merklefruit marked this pull request as ready for review October 29, 2023 18:10
@merklefruit
Copy link
Contributor Author

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.

@merklefruit merklefruit mentioned this pull request Oct 29, 2023
@refcell refcell merged commit bffa16c into main Oct 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-composer Area: op-composer related C-critical Category: Modifies critical code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants