From 0c50e12256dd64ad538b1605a2794846e7f2f919 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Avila=20Gast=C3=B3n?= <72628438+avilagaston9@users.noreply.github.com> Date: Thu, 15 Aug 2024 11:38:40 -0300 Subject: [PATCH] refactor: add ethereum-package as a submodule (#1276) --- .gitmodules | 3 +++ Makefile | 8 +++----- README.md | 10 ++++------ ethereum-package | 1 + 4 files changed, 11 insertions(+), 11 deletions(-) create mode 100644 .gitmodules create mode 160000 ethereum-package diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..687ff31dd --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "ethereum-package"] + path = ethereum-package + url = https://github.com/lambdaclass/ethereum-package.git diff --git a/Makefile b/Makefile index a6f62a7b3..758d47531 100644 --- a/Makefile +++ b/Makefile @@ -45,7 +45,7 @@ $(OUTPUT_DIR)/libp2p_port: $(PORT_SOURCES) $(PROTOBUF_GO_FILES) GRAFANA_DASHBOARDS_DIR = ./metrics/grafana/provisioning/dashboards # Root directory of ethereum-package -KURTOSIS_DIR ?= ../ethereum-package +KURTOSIS_DIR ?= ./ethereum-package # Grafana configuration directory for dashboards KURTOSIS_GRAFANA_DASHBOARDS_DIR ?= $(KURTOSIS_DIR)/static_files/grafana-config/dashboards # Secret cookie for the lambdaconsesus IEX node built for usage with kurtosis @@ -58,11 +58,9 @@ KURTOSIS_SERVICE ?= cl-3-lambda-geth # 💻 kurtosis.setup: @ Setup the kurtosis environment kurtosis.setup: kurtosis.setup.ethereum-package kurtosis.setup.grafana kurtosis.setup.lambdaconsensus -#💻 kurtosis.setup.ethereum-package: @ Clones the lambda ethereum-package and check out the current active branch +#💻 kurtosis.setup.ethereum-package: @ Downloads the lambda ethereum-package content kurtosis.setup.ethereum-package: - git clone https://github.com/lambdaclass/ethereum-package.git $(KURTOSIS_DIR) && \ - cd $(KURTOSIS_DIR) && \ - git checkout lecc-integration + git submodule update --init --recursive # 💻 kurtosis.setup.grafana: @ Copies the grafana dashboards to the ethereum-package folder under grafana-config kurtosis.setup.grafana: diff --git a/README.md b/README.md index baa2d7f33..8d20cdf25 100644 --- a/README.md +++ b/README.md @@ -224,7 +224,7 @@ As stated in the `ethereum-package` README: After kurtosis is installed, we need to do three setup steps. -1. Clone the lambdaclass ethereum-package fork and checkout a particular branch +1. Download the lambdaclass ethereum-package fork submodule's content. 2. Copy our Grafana custom dashboards to be able to look at them 3. Build the Docker image of the service @@ -238,11 +238,10 @@ or executed each at a time ```bash make kurtosis.setup.ethereum-package -# git clone https://github.com/lambdaclass/ethereum-package.git ../ethereum-package && \ -# cd ../ethereum-package && git checkout lecc-integration +# git submodule update --init --recursive make kurtosis.setup.grafana -# cp -r ./metrics/grafana/provisioning/dashboards/* ../ethereum-package/static_files/grafana-config/dashboards/lambdaconsensus +# cp -r ./metrics/grafana/provisioning/dashboards/* ./ethereum-package/static_files/grafana-config/dashboards/lambdaconsensus make kurtosis.setup.lambdaconsensus # docker build --build-arg IEX_ARGS="--sname lambdaconsensus --cookie secret" -t lambda_ethereum_consensus . @@ -254,7 +253,6 @@ make kurtosis.setup.lambdaconsensus After that, we will be ready to tweak the configuration. ```bash -# assumming you are still in the lambda_ethereum_consensus repo, you can modify the configuration through vim network_params.yaml ``` @@ -283,7 +281,7 @@ For starting the local environment after the setup run: make kurtosis.start # which executes -kurtosis run --enclave lambdanet ../ethereum-package --args-file network_params.yaml +kurtosis run --enclave lambdanet ./ethereum-package --args-file network_params.yaml ``` Then, you can connect to the service (running docker instance) with the following: diff --git a/ethereum-package b/ethereum-package new file mode 160000 index 000000000..4771642bf --- /dev/null +++ b/ethereum-package @@ -0,0 +1 @@ +Subproject commit 4771642bf4816d4ea5a6da9fd279a452af9cb22a