Commit 7e82affa authored by Gyanendra Mishra's avatar Gyanendra Mishra Committed by GitHub

ci: support arm64 (#206)

this image is built on both amd64 and arm64, unlike the original. Will
replace with something built & maintained by EthPandaOps @parithosh
@barnabasbusa

This should unblock Guillaume from EF
parent 8b883aff
...@@ -24,7 +24,7 @@ setup_kurtosis: &setup_kurtosis ...@@ -24,7 +24,7 @@ setup_kurtosis: &setup_kurtosis
echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list
sudo apt update sudo apt update
sudo apt install kurtosis-cli sudo apt install kurtosis-cli
kurtosis config init dont-send-metrics kurtosis analytics disable
kurtosis engine restart kurtosis engine restart
...@@ -42,6 +42,15 @@ jobs: ...@@ -42,6 +42,15 @@ jobs:
- run: kurtosis run ${PWD} - run: kurtosis run ${PWD}
run_starlark_arm64:
executor: ubuntu_vm
resource_class: arm.medium
steps:
- <<: *setup_kurtosis
- checkout
- run: kurtosis run ${PWD}
check_latest_version: check_latest_version:
executor: ubuntu_vm executor: ubuntu_vm
steps: steps:
...@@ -217,3 +226,11 @@ workflows: ...@@ -217,3 +226,11 @@ workflows:
branches: branches:
ignore: ignore:
- main - main
- run_starlark_arm64:
context:
# This pulls in KurtosisBot's Github token, so that we can read from our private repos
- github-user
filters:
branches:
ignore:
- main
...@@ -219,15 +219,8 @@ To configure the package behaviour, you can modify your `network_params.json` fi ...@@ -219,15 +219,8 @@ To configure the package behaviour, you can modify your `network_params.json` fi
"launch_additional_services": true, "launch_additional_services": true,
// If set, the package will block until a finalized epoch has occurred. // If set, the package will block until a finalized epoch has occurred.
// If `waitForVerifications` is set to true, this extra wait will be skipped.
"wait_for_finalization": false, "wait_for_finalization": false,
// If set to true, the package will block until all verifications have passed
"wait_for_verifications": false,
// If set, after the merge, this will be the maximum number of epochs wait for the verifications to succeed.
"verifications_epoch_limit": 5,
// The global log level that all clients should log at // The global log level that all clients should log at
// Valid values are "error", "warn", "info", "debug", and "trace" // Valid values are "error", "warn", "info", "debug", and "trace"
// This value will be overridden by participant-specific values // This value will be overridden by participant-specific values
......
...@@ -12,7 +12,6 @@ beacon_metrics_gazer = import_module("github.com/kurtosis-tech/eth2-package/src/ ...@@ -12,7 +12,6 @@ beacon_metrics_gazer = import_module("github.com/kurtosis-tech/eth2-package/src/
light_beaconchain_explorer = import_module("github.com/kurtosis-tech/eth2-package/src/light_beaconchain/light_beaconchain_launcher.star") light_beaconchain_explorer = import_module("github.com/kurtosis-tech/eth2-package/src/light_beaconchain/light_beaconchain_launcher.star")
prometheus = import_module("github.com/kurtosis-tech/eth2-package/src/prometheus/prometheus_launcher.star") prometheus = import_module("github.com/kurtosis-tech/eth2-package/src/prometheus/prometheus_launcher.star")
grafana =import_module("github.com/kurtosis-tech/eth2-package/src/grafana/grafana_launcher.star") grafana =import_module("github.com/kurtosis-tech/eth2-package/src/grafana/grafana_launcher.star")
testnet_verifier = import_module("github.com/kurtosis-tech/eth2-package/src/testnet_verifier/testnet_verifier.star")
mev_boost_launcher_module = import_module("github.com/kurtosis-tech/eth2-package/src/mev_boost/mev_boost_launcher.star") mev_boost_launcher_module = import_module("github.com/kurtosis-tech/eth2-package/src/mev_boost/mev_boost_launcher.star")
mock_mev_launcher_module = import_module("github.com/kurtosis-tech/eth2-package/src/mock_mev/mock_mev_launcher.star") mock_mev_launcher_module = import_module("github.com/kurtosis-tech/eth2-package/src/mock_mev/mock_mev_launcher.star")
mev_relay_launcher_module = import_module("github.com/kurtosis-tech/eth2-package/src/mev_relay/mev_relay_launcher.star") mev_relay_launcher_module = import_module("github.com/kurtosis-tech/eth2-package/src/mev_relay/mev_relay_launcher.star")
...@@ -139,14 +138,6 @@ def run(plan, args = {}): ...@@ -139,14 +138,6 @@ def run(plan, args = {}):
grafana.launch_grafana(plan, grafana_datasource_config_template, grafana_dashboards_config_template, prometheus_private_url) grafana.launch_grafana(plan, grafana_datasource_config_template, grafana_dashboards_config_template, prometheus_private_url)
plan.print("Succesfully launched grafana") plan.print("Succesfully launched grafana")
if args_with_right_defaults.wait_for_verifications:
plan.print("Running synchrnous testnet verifier")
testnet_verifier.run_synchronous_testnet_verification(plan, args_with_right_defaults, all_el_client_contexts, all_cl_client_contexts)
plan.print("Verification succeeded")
else:
plan.print("Running asynchronous verification")
testnet_verifier.launch_testnet_verifier(plan, args_with_right_defaults, all_el_client_contexts, all_cl_client_contexts)
plan.print("Succesfully launched asynchronous verifier")
if args_with_right_defaults.wait_for_finalization: if args_with_right_defaults.wait_for_finalization:
plan.print("Waiting for the first finalized epoch") plan.print("Waiting for the first finalized epoch")
first_cl_client = all_cl_client_contexts[0] first_cl_client = all_cl_client_contexts[0]
...@@ -161,7 +152,6 @@ def run(plan, args = {}): ...@@ -161,7 +152,6 @@ def run(plan, args = {}):
plan.wait(recipe = epoch_recipe, field = "extract.finalized_epoch", assertion = "!=", target_value = "0", timeout = "40m", service_name = first_client_beacon_name) plan.wait(recipe = epoch_recipe, field = "extract.finalized_epoch", assertion = "!=", target_value = "0", timeout = "40m", service_name = first_client_beacon_name)
plan.print("First finalized epoch occurred successfully") plan.print("First finalized epoch occurred successfully")
grafana_info = struct( grafana_info = struct(
dashboard_path = GRAFANA_DASHBOARD_PATH_URL, dashboard_path = GRAFANA_DASHBOARD_PATH_URL,
user = GRAFANA_USER, user = GRAFANA_USER,
......
...@@ -28,8 +28,6 @@ ...@@ -28,8 +28,6 @@
}, },
"launch_additional_services": true, "launch_additional_services": true,
"wait_for_finalization": false, "wait_for_finalization": false,
"wait_for_verifications": false,
"verifications_epoch_limit": 5,
"global_client_log_level": "info", "global_client_log_level": "info",
"snooper_enabled": false, "snooper_enabled": false,
"parallel_keystore_generation": false, "parallel_keystore_generation": false,
......
...@@ -2,7 +2,7 @@ shared_utils = import_module("github.com/kurtosis-tech/eth2-package/src/shared_u ...@@ -2,7 +2,7 @@ shared_utils = import_module("github.com/kurtosis-tech/eth2-package/src/shared_u
SERVICE_NAME = "beacon-metrics-gazer" SERVICE_NAME = "beacon-metrics-gazer"
IMAGE_NAME = "dapplion/beacon-metrics-gazer:latest" IMAGE_NAME = "ethpandaops/beacon-metrics-gazer:master"
HTTP_PORT_ID = "http" HTTP_PORT_ID = "http"
HTTP_PORT_NUMBER = 8080 HTTP_PORT_NUMBER = 8080
......
IMAGE_NAME = "ethpandaops/tx-fuzz:latest" IMAGE_NAME = "ethpandaops/tx-fuzz:master"
SERVICE_NAME = "blob-spammer" SERVICE_NAME = "blob-spammer"
ENTRYPOINT_ARGS = ["/bin/sh", "-c"] ENTRYPOINT_ARGS = ["/bin/sh", "-c"]
......
...@@ -2,7 +2,7 @@ shared_utils = import_module("github.com/kurtosis-tech/eth2-package/src/shared_u ...@@ -2,7 +2,7 @@ shared_utils = import_module("github.com/kurtosis-tech/eth2-package/src/shared_u
SERVICE_NAME = "cl-forkmon" SERVICE_NAME = "cl-forkmon"
IMAGE_NAME = "ralexstokes/ethereum_consensus_monitor:latest" IMAGE_NAME = "ethpandaops/consensus-monitor:main"
HTTP_PORT_ID = "http" HTTP_PORT_ID = "http"
HTTP_PORT_NUMBER = 80 HTTP_PORT_NUMBER = 80
......
...@@ -2,7 +2,7 @@ shared_utils = import_module("github.com/kurtosis-tech/eth2-package/src/shared_u ...@@ -2,7 +2,7 @@ shared_utils = import_module("github.com/kurtosis-tech/eth2-package/src/shared_u
SERVICE_NAME = "el-forkmon" SERVICE_NAME = "el-forkmon"
IMAGE_NAME = "skylenet/nodemonitor:darkmode" IMAGE_NAME = "ethpandaops/execution-monitor:master"
HTTP_PORT_ID = "http" HTTP_PORT_ID = "http"
HTTP_PORT_NUMBER = 8080 HTTP_PORT_NUMBER = 8080
......
...@@ -2,7 +2,7 @@ shared_utils = import_module("github.com/kurtosis-tech/eth2-package/src/shared_u ...@@ -2,7 +2,7 @@ shared_utils = import_module("github.com/kurtosis-tech/eth2-package/src/shared_u
SERVICE_NAME = "light-beaconchain" SERVICE_NAME = "light-beaconchain"
IMAGE_NAME = "pk910/light-beaconchain-explorer:latest" IMAGE_NAME = "ethpandaops/dora-the-explorer:master"
HTTP_PORT_ID = "http" HTTP_PORT_ID = "http"
HTTP_PORT_NUMBER = 8080 HTTP_PORT_NUMBER = 8080
......
...@@ -77,8 +77,6 @@ def parse_input(plan, input_args): ...@@ -77,8 +77,6 @@ def parse_input(plan, input_args):
), ),
launch_additional_services=result["launch_additional_services"], launch_additional_services=result["launch_additional_services"],
wait_for_finalization=result["wait_for_finalization"], wait_for_finalization=result["wait_for_finalization"],
wait_for_verifications=result["wait_for_verifications"],
verifications_epoch_limit=result["verifications_epoch_limit"],
global_client_log_level=result["global_client_log_level"], global_client_log_level=result["global_client_log_level"],
mev_type=result["mev_type"], mev_type=result["mev_type"],
), result ), result
......
IMAGE_NAME = "marioevz/merge-testnet-verifier:latest"
SERVICE_NAME = "testnet-verifier"
# We use Docker exec commands to run the commands we need, so we override the default
SYNCHRONOUS_ENTRYPOINT_ARGS = [
"sleep",
"999999",
]
# this is broken check - https://github.com/ethereum/merge-testnet-verifier/issues/4
def launch_testnet_verifier(plan, params, el_client_contexts, cl_client_contexts):
config = get_asynchronous_verification_config(params, el_client_contexts, cl_client_contexts)
plan.add_service(SERVICE_NAME, config)
def run_synchronous_testnet_verification(plan, params, el_client_contexts, cl_client_contexts):
config = get_synchronous_verification_config()
plan.add_service(SERVICE_NAME, config)
command = get_cmd(params, el_client_contexts, cl_client_contexts, True)
exec_result = plan.exec(recipe=ExecRecipe(command=command), service_name=SERVICE_NAME)
plan.verify(exec_result["code"], "==", 0)
def get_cmd(params, el_client_contexts, cl_client_contexts, add_binary_name):
command = []
if add_binary_name:
command.append("./merge_testnet_verifier")
command.append("--ttd")
command.append("0")
for el_client_context in el_client_contexts:
command.append("--client")
command.append("{0},http://{1}:{2}".format(el_client_context.client_name, el_client_context.ip_addr, el_client_context.rpc_port_num))
for cl_client_context in cl_client_contexts:
command.append("--client")
command.append("{0},http://{1}:{2}".format(cl_client_context.client_name, cl_client_context.ip_addr, cl_client_context.http_port_num))
command.append("--ttd-epoch-limit")
command.append("0")
command.append("--verif-epoch-limit")
command.append("{0}".format(params.verifications_epoch_limit))
return command
def get_asynchronous_verification_config(params, el_client_contexts, cl_client_contexts):
commands = get_cmd(params, el_client_contexts, cl_client_contexts, False)
return ServiceConfig(
image = IMAGE_NAME,
cmd = commands,
)
def get_synchronous_verification_config():
return ServiceConfig(
image = IMAGE_NAME,
entrypoint = SYNCHRONOUS_ENTRYPOINT_ARGS,
)
#TODO: Add Image and Service Name to tx_spammer_params IMAGE_NAME = "ethpandaops/tx-fuzz:master"
IMAGE_NAME = "ethpandaops/tx-fuzz:latest"
SERVICE_NAME = "transaction-spammer" SERVICE_NAME = "transaction-spammer"
def launch_transaction_spammer(plan, prefunded_addresses, el_client_context, tx_spammer_params): def launch_transaction_spammer(plan, prefunded_addresses, el_client_context, tx_spammer_params):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment