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: Run cdk-erigon with cdk config files transparently for the user #88

Open
wants to merge 16 commits into
base: develop
Choose a base branch
from

Conversation

vcastellm
Copy link
Contributor

@vcastellm vcastellm commented Sep 20, 2024

Description

Using the Rust CLI it's now possible to run cdk-erigon that it's present in system's path in a single step providing only the node config file and the genesis file.

cdk --config ../kurtosis-cdk/genesis/cdk-node-config.toml --chain ../kurtosis-cdk/genesis/genesis.json erigon

Avoiding the necessity of using multiple configuration files and different configuration for cdk-node and cdk-erigon

image

NOTE: This Rust code is the first iteration into the CLI and can be much improved and refactored in subsequent PRs

@vcastellm vcastellm requested a review from a team September 25, 2024 08:04
Render the config files in tmp and run erigon passing the path of the
config file.
@vcastellm vcastellm marked this pull request as ready for review September 25, 2024 08:08
Copy link
Contributor

@joanestebanr joanestebanr left a comment

Choose a reason for hiding this comment

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

I don't see how to build the rust client, maybe it needs an entry on Makefile?

@vcastellm
Copy link
Contributor Author

vcastellm commented Sep 25, 2024

I don't see how to build the rust client, maybe it needs an entry on Makefile?

It's quite straightforward, in Rust there's the concept of "build scripts" arbitrary commands that can be executed at build time, in this case we use this one https://github.com/0xPolygon/cdk/blob/main/crates/cdk/build.rs, it builds cdk-node at build time so both binaries are built and run with just:

cargo run

Or just build with:

cargo build

Better entry on README


Updated the readme with new instructions using make

config/example-config.toml Outdated Show resolved Hide resolved
config/example-config.toml Outdated Show resolved Hide resolved
crates/cdk-config/src/aggregator.rs Outdated Show resolved Hide resolved
crates/cdk/src/main.rs Show resolved Hide resolved
crates/cdk/src/config_render.rs Outdated Show resolved Hide resolved
crates/cdk/src/config_render.rs Outdated Show resolved Hide resolved
@vcastellm vcastellm requested a review from a team October 2, 2024 13:30
Copy link

sonarcloud bot commented Oct 3, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants