Giter Club home page Giter Club logo

kurtosis-cdk-erigon-node's Issues

Provide CDK-Erigon node version as a configuration parameter

We would like to be able to test different versions of the CDK-Erigon node easily. We could achieve this by adding a new cdk_erigon_version parameter once Dockerfile build-time variables are supported in Kurtosis ImageBuildSpec. By default, we would build the node from the most recent commit.

Implementation

def run(
     ...,
     cdk_erigon_node_version="zkevm",
     go_version="1.19"
):
    config = create_cdk_erigon_node_config(...)
    start_cdk_erigon_node(plan, cdk_erigon_node_version, go_version, config)

def start_cdk_erigon_node(plan, cdk_erigon_node_version, go_version, config):
    plan.add_service(
        name="cdk-erigon-node",
        config=ServiceConfig(
            image=ImageBuildSpec(
                image_name="cdk-erigon",
                build_context_dir=".",
                build_args={
                        "CDK_ERIGON_NODE_VERSION": cdk_erigon_node_version,
                        "GO_VERSION": go_version,
                }
            ),
            files={"/etc/cdk-erigon": config},
            ports={"http_rpc": PortSpec(8545, application_protocol="http")},
            cmd=["--config=/etc/cdk-erigon/config.yaml", "--maxpeers=0"],
        ),
    )
 
# https://github.com/0xPolygonHermez/cdk-erigon/blob/zkevm/go.mod#L3
ARG GO_VERSION=1.19
FROM golang:${GO_VERSION} as builder
...

# https://github.com/0xPolygonHermez/cdk-erigon/releases
ARG CDK_ERIGON_NODE_VERSION=zkevm
RUN git clone --branch ${CDK_ERIGON_NODE_VERSION} https://github.com/0xPolygonHermez/cdk-erigon . \
  && make cdk-erigon

...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.