anton-rs / op-up

Composable OP Stack Orchestration
https://stack.anton.systems
MIT License
41 stars 2 forks source link

feat: l2-geth and op-node containers πŸ‘¨β€πŸš€ #70

Closed merklefruit closed 1 year ago

merklefruit commented 1 year ago

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 commented 1 year ago

Current dependencies on/for this PR:

This comment was auto-generated by Graphite.