Skip to content

Commit

Permalink
fix!: upcoming file path change in kurtosis upstream (#582)
Browse files Browse the repository at this point in the history
  • Loading branch information
barnabasbusa committed Apr 30, 2024
1 parent 8515d27 commit 8d7c4f9
Show file tree
Hide file tree
Showing 17 changed files with 54 additions and 44 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,17 @@ jobs:
with:
args: "The nightly test for ${{matrix.file_name}} on ethereum-package has failed find it here ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"


assertoor-mix-assert:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Kurtosis Assertoor GitHub Action
uses: ethpandaops/kurtosis-assertoor-github-action@v1
with:
ethereum_package_branch: ${{ steps.extract_branch.outputs.branch }}
ethereum_package_args: .github/tests/mix-assert.yaml
6 changes: 5 additions & 1 deletion .github/workflows/per-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jobs:
"./.github/tests/mev-mock.yaml",
"./.github/tests/mix-with-tools.yaml",
"./.github/tests/mix-persistence.yaml",
"./.github/tests/assertoor.yaml",
"./network_params.yaml"
]
runs-on: ubuntu-latest
Expand Down Expand Up @@ -72,7 +71,12 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Kurtosis Assertoor GitHub Action
uses: ethpandaops/kurtosis-assertoor-github-action@v1
with:
ethereum_package_branch: ${{ steps.extract_branch.outputs.branch }}
ethereum_package_args: .github/tests/mix-assert.yaml
8 changes: 3 additions & 5 deletions src/cl/grandine/grandine_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ BEACON_MIN_MEMORY = 1024

BEACON_METRICS_PATH = "/metrics"

VALIDATOR_KEYS_DIRPATH_ON_SERVICE_CONTAINER = "/validator-keys"

MIN_PEERS = 1

PRIVATE_IP_ADDRESS_PLACEHOLDER = "KURTOSIS_IP_ADDR_PLACEHOLDER"
Expand Down Expand Up @@ -234,11 +232,11 @@ def get_beacon_config(
validator_secrets_dirpath = ""
if node_keystore_files:
validator_keys_dirpath = shared_utils.path_join(
VALIDATOR_KEYS_DIRPATH_ON_SERVICE_CONTAINER,
constants.VALIDATOR_KEYS_DIRPATH_ON_SERVICE_CONTAINER,
node_keystore_files.teku_keys_relative_dirpath,
)
validator_secrets_dirpath = shared_utils.path_join(
VALIDATOR_KEYS_DIRPATH_ON_SERVICE_CONTAINER,
constants.VALIDATOR_KEYS_DIRPATH_ON_SERVICE_CONTAINER,
node_keystore_files.teku_secrets_relative_dirpath,
)
# If snooper is enabled use the snooper engine context, otherwise use the execution client context
Expand Down Expand Up @@ -359,7 +357,7 @@ def get_beacon_config(
if node_keystore_files != None and not use_separate_vc:
cmd.extend(validator_default_cmd)
files[
VALIDATOR_KEYS_DIRPATH_ON_SERVICE_CONTAINER
constants.VALIDATOR_KEYS_DIRPATH_ON_SERVICE_CONTAINER
] = node_keystore_files.files_artifact_uuid

if keymanager_enabled:
Expand Down
8 changes: 3 additions & 5 deletions src/cl/teku/teku_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ BEACON_MIN_MEMORY = 1024

BEACON_METRICS_PATH = "/metrics"

VALIDATOR_KEYS_DIRPATH_ON_SERVICE_CONTAINER = "/validator-keys"

MIN_PEERS = 1

PRIVATE_IP_ADDRESS_PLACEHOLDER = "KURTOSIS_IP_ADDR_PLACEHOLDER"
Expand Down Expand Up @@ -239,11 +237,11 @@ def get_beacon_config(
validator_secrets_dirpath = ""
if node_keystore_files:
validator_keys_dirpath = shared_utils.path_join(
VALIDATOR_KEYS_DIRPATH_ON_SERVICE_CONTAINER,
constants.VALIDATOR_KEYS_DIRPATH_ON_SERVICE_CONTAINER,
node_keystore_files.teku_keys_relative_dirpath,
)
validator_secrets_dirpath = shared_utils.path_join(
VALIDATOR_KEYS_DIRPATH_ON_SERVICE_CONTAINER,
constants.VALIDATOR_KEYS_DIRPATH_ON_SERVICE_CONTAINER,
node_keystore_files.teku_secrets_relative_dirpath,
)
# If snooper is enabled use the snooper engine context, otherwise use the execution client context
Expand Down Expand Up @@ -380,7 +378,7 @@ def get_beacon_config(
if node_keystore_files != None and not use_separate_vc:
cmd.extend(validator_default_cmd)
files[
VALIDATOR_KEYS_DIRPATH_ON_SERVICE_CONTAINER
constants.VALIDATOR_KEYS_DIRPATH_ON_SERVICE_CONTAINER
] = node_keystore_files.files_artifact_uuid

if keymanager_enabled:
Expand Down
2 changes: 1 addition & 1 deletion src/grafana/grafana_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ static_files = import_module("../static_files/static_files.star")

SERVICE_NAME = "grafana"

IMAGE_NAME = "grafana/grafana-enterprise:9.5.12"
IMAGE_NAME = "grafana/grafana:latest-ubuntu"

HTTP_PORT_ID = "http"
HTTP_PORT_NUMBER_UINT16 = 3000
Expand Down
6 changes: 3 additions & 3 deletions src/package_io/constants.star
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ GENESIS_VALIDATORS_ROOT_PLACEHOLDER = "GENESIS_VALIDATORS_ROOT_PLACEHOLDER"
ARCHIVE_MODE = True

GENESIS_DATA_MOUNTPOINT_ON_CLIENTS = "/network-configs"
GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER = (
GENESIS_DATA_MOUNTPOINT_ON_CLIENTS + "/network-configs"
)
GENESIS_CONFIG_MOUNT_PATH_ON_CONTAINER = GENESIS_DATA_MOUNTPOINT_ON_CLIENTS

VALIDATOR_KEYS_DIRPATH_ON_SERVICE_CONTAINER = "/validator-keys"

JWT_MOUNTPOINT_ON_CLIENTS = "/jwt"
JWT_MOUNT_PATH_ON_CONTAINER = JWT_MOUNTPOINT_ON_CLIENTS + "/jwtsecret"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,14 @@ def generate_el_cl_genesis_data(

cancun_time = plan.run_sh(
description="Reading cancun time from genesis",
run="jq .config.cancunTime /data/network-configs/genesis.json | tr -d '\n'",
run="jq .config.cancunTime /data/genesis.json | tr -d '\n'",
image="badouralix/curl-jq",
files={"/data": genesis.files_artifacts[0]},
)

prague_time = plan.run_sh(
description="Reading prague time from genesis",
run="jq .config.pragueTime /data/network-configs/genesis.json | tr -d '\n'",
run="jq .config.pragueTime /data/genesis.json | tr -d '\n'",
image="badouralix/curl-jq",
files={"/data": genesis.files_artifacts[0]},
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ shared_utils = import_module("../../shared_utils/shared_utils.star")
keystore_files_module = import_module("./keystore_files.star")
keystores_result = import_module("./generate_keystores_result.star")

NODE_KEYSTORES_OUTPUT_DIRPATH_FORMAT_STR = "/node-{0}-keystores"
NODE_KEYSTORES_OUTPUT_DIRPATH_FORMAT_STR = "/node-{0}-keystores/"

# Prysm keystores are encrypted with a password
PRYSM_PASSWORD = "password"
Expand Down Expand Up @@ -102,11 +102,9 @@ def generate_validator_keystores(plan, mnemonic, participants):
start_index,
stop_index,
)
teku_permissions_cmd = (
"chmod 0777 -R " + output_dirpath + "/" + TEKU_KEYS_DIRNAME
)
teku_permissions_cmd = "chmod 0777 -R " + output_dirpath + TEKU_KEYS_DIRNAME
raw_secret_permissions_cmd = (
"chmod 0600 -R " + output_dirpath + "/" + RAW_SECRETS_DIRNAME
"chmod 0600 -R " + output_dirpath + RAW_SECRETS_DIRNAME
)
all_sub_command_strs.append(generate_keystores_cmd)
all_sub_command_strs.append(teku_permissions_cmd)
Expand Down
8 changes: 4 additions & 4 deletions src/shared_utils/shared_utils.star
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def get_devnet_enodes(plan, filename):
files={constants.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: filename},
wait=None,
run="""
with open("/network-configs/network-configs/bootnode.txt") as bootnode_file:
with open("/network-configs/bootnode.txt") as bootnode_file:
bootnodes = []
for line in bootnode_file:
line = line.strip()
Expand All @@ -99,7 +99,7 @@ def get_devnet_enrs_list(plan, filename):
files={constants.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: filename},
wait=None,
run="""
with open("/network-configs/network-configs/bootstrap_nodes.txt") as bootnode_file:
with open("/network-configs/bootstrap_nodes.txt") as bootnode_file:
bootnodes = []
for line in bootnode_file:
line = line.strip()
Expand All @@ -118,7 +118,7 @@ def read_genesis_timestamp_from_config(plan, filename):
packages=["PyYAML"],
run="""
import yaml
with open("/network-configs/network-configs/config.yaml", "r") as f:
with open("/network-configs/config.yaml", "r") as f:
yaml_data = yaml.safe_load(f)
min_genesis_time = int(yaml_data.get("MIN_GENESIS_TIME", 0))
Expand All @@ -137,7 +137,7 @@ def read_genesis_network_id_from_config(plan, filename):
packages=["PyYAML"],
run="""
import yaml
with open("/network-configs/network-configs/config.yaml", "r") as f:
with open("/network-configs/config.yaml", "r") as f:
yaml_data = yaml.safe_load(f)
network_id = int(yaml_data.get("DEPOSIT_NETWORK_ID", 0))
print(network_id, end="")
Expand Down
6 changes: 3 additions & 3 deletions src/vc/lighthouse.star
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ def get_config(
)

validator_keys_dirpath = shared_utils.path_join(
vc_shared.VALIDATOR_CLIENT_KEYS_MOUNTPOINT,
constants.VALIDATOR_KEYS_DIRPATH_ON_SERVICE_CONTAINER,
node_keystore_files.raw_keys_relative_dirpath,
)
validator_secrets_dirpath = shared_utils.path_join(
vc_shared.VALIDATOR_CLIENT_KEYS_MOUNTPOINT,
constants.VALIDATOR_KEYS_DIRPATH_ON_SERVICE_CONTAINER,
node_keystore_files.raw_secrets_relative_dirpath,
)

Expand Down Expand Up @@ -87,7 +87,7 @@ def get_config(

files = {
constants.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_genesis_data.files_artifact_uuid,
vc_shared.VALIDATOR_CLIENT_KEYS_MOUNTPOINT: node_keystore_files.files_artifact_uuid,
constants.VALIDATOR_KEYS_DIRPATH_ON_SERVICE_CONTAINER: node_keystore_files.files_artifact_uuid,
}
env = {RUST_BACKTRACE_ENVVAR_NAME: RUST_FULL_BACKTRACE_KEYWORD}
env.update(extra_env_vars)
Expand Down
6 changes: 3 additions & 3 deletions src/vc/lodestar.star
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ def get_config(
)

validator_keys_dirpath = shared_utils.path_join(
vc_shared.VALIDATOR_CLIENT_KEYS_MOUNTPOINT,
constants.VALIDATOR_KEYS_DIRPATH_ON_SERVICE_CONTAINER,
node_keystore_files.raw_keys_relative_dirpath,
)

validator_secrets_dirpath = shared_utils.path_join(
vc_shared.VALIDATOR_CLIENT_KEYS_MOUNTPOINT,
constants.VALIDATOR_KEYS_DIRPATH_ON_SERVICE_CONTAINER,
node_keystore_files.raw_secrets_relative_dirpath,
)

Expand Down Expand Up @@ -82,7 +82,7 @@ def get_config(

files = {
constants.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_genesis_data.files_artifact_uuid,
vc_shared.VALIDATOR_CLIENT_KEYS_MOUNTPOINT: node_keystore_files.files_artifact_uuid,
constants.VALIDATOR_KEYS_DIRPATH_ON_SERVICE_CONTAINER: node_keystore_files.files_artifact_uuid,
}

ports = {}
Expand Down
6 changes: 3 additions & 3 deletions src/vc/nimbus.star
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ def get_config(
validator_secrets_dirpath = ""
if node_keystore_files != None:
validator_keys_dirpath = shared_utils.path_join(
vc_shared.VALIDATOR_CLIENT_KEYS_MOUNTPOINT,
constants.VALIDATOR_KEYS_DIRPATH_ON_SERVICE_CONTAINER,
node_keystore_files.nimbus_keys_relative_dirpath,
)
validator_secrets_dirpath = shared_utils.path_join(
vc_shared.VALIDATOR_CLIENT_KEYS_MOUNTPOINT,
constants.VALIDATOR_KEYS_DIRPATH_ON_SERVICE_CONTAINER,
node_keystore_files.raw_secrets_relative_dirpath,
)

Expand Down Expand Up @@ -60,7 +60,7 @@ def get_config(
cmd.extend([param for param in extra_params])

files = {
vc_shared.VALIDATOR_CLIENT_KEYS_MOUNTPOINT: node_keystore_files.files_artifact_uuid,
constants.VALIDATOR_KEYS_DIRPATH_ON_SERVICE_CONTAINER: node_keystore_files.files_artifact_uuid,
constants.KEYMANAGER_MOUNT_PATH_ON_CLIENTS: keymanager_file,
}

Expand Down
4 changes: 2 additions & 2 deletions src/vc/prysm.star
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def get_config(
keymanager_enabled,
):
validator_keys_dirpath = shared_utils.path_join(
vc_shared.VALIDATOR_CLIENT_KEYS_MOUNTPOINT,
constants.VALIDATOR_KEYS_DIRPATH_ON_SERVICE_CONTAINER,
node_keystore_files.prysm_relative_dirpath,
)
validator_secrets_dirpath = shared_utils.path_join(
Expand Down Expand Up @@ -74,7 +74,7 @@ def get_config(

files = {
constants.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_genesis_data.files_artifact_uuid,
vc_shared.VALIDATOR_CLIENT_KEYS_MOUNTPOINT: node_keystore_files.files_artifact_uuid,
constants.VALIDATOR_KEYS_DIRPATH_ON_SERVICE_CONTAINER: node_keystore_files.files_artifact_uuid,
PRYSM_PASSWORD_MOUNT_DIRPATH_ON_SERVICE_CONTAINER: prysm_password_artifact_uuid,
}

Expand Down
1 change: 0 additions & 1 deletion src/vc/shared.star
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
shared_utils = import_module("../shared_utils/shared_utils.star")

PRIVATE_IP_ADDRESS_PLACEHOLDER = "KURTOSIS_IP_ADDR_PLACEHOLDER"
VALIDATOR_CLIENT_KEYS_MOUNTPOINT = "/keystores"

VALIDATOR_HTTP_PORT_NUM = 5056
VALIDATOR_HTTP_PORT_ID = "vc-http"
Expand Down
6 changes: 3 additions & 3 deletions src/vc/teku.star
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ def get_config(
validator_secrets_dirpath = ""
if node_keystore_files != None:
validator_keys_dirpath = shared_utils.path_join(
vc_shared.VALIDATOR_CLIENT_KEYS_MOUNTPOINT,
constants.VALIDATOR_KEYS_DIRPATH_ON_SERVICE_CONTAINER,
node_keystore_files.teku_keys_relative_dirpath,
)
validator_secrets_dirpath = shared_utils.path_join(
vc_shared.VALIDATOR_CLIENT_KEYS_MOUNTPOINT,
constants.VALIDATOR_KEYS_DIRPATH_ON_SERVICE_CONTAINER,
node_keystore_files.teku_secrets_relative_dirpath,
)

Expand Down Expand Up @@ -71,7 +71,7 @@ def get_config(

files = {
constants.GENESIS_DATA_MOUNTPOINT_ON_CLIENTS: el_cl_genesis_data.files_artifact_uuid,
vc_shared.VALIDATOR_CLIENT_KEYS_MOUNTPOINT: node_keystore_files.files_artifact_uuid,
constants.VALIDATOR_KEYS_DIRPATH_ON_SERVICE_CONTAINER: node_keystore_files.files_artifact_uuid,
}

ports = {}
Expand Down
2 changes: 1 addition & 1 deletion static_files/dora-config/config.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ logging:
chain:
name: {{ .Network }}
{{ if not .PublicNetwork }}
configPath: "/network-configs/network-configs/config.yaml"
configPath: "/network-configs/config.yaml"
{{ end }}
displayName: "{{ .Network }}"

Expand Down
2 changes: 1 addition & 1 deletion static_files/full-beaconchain-config/config.yaml.tmpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
chain:
clConfigPath: 'node'
elConfigPath: '/network-configs/network-configs/genesis.json'
elConfigPath: '/network-configs/genesis.json'
readerDatabase:
name: {{.DBName}}
host: {{.DBHost}}
Expand Down

0 comments on commit 8d7c4f9

Please sign in to comment.