Skip to content

Commit

Permalink
make everything a constant
Browse files Browse the repository at this point in the history
  • Loading branch information
barnabasbusa committed Oct 26, 2023
1 parent 457c99d commit 607d9ba
Show file tree
Hide file tree
Showing 12 changed files with 70 additions and 14 deletions.
10 changes: 8 additions & 2 deletions src/cl/lighthouse/lighthouse_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,10 @@ def get_beacon_config(
min_memory=bn_min_mem,
max_memory=bn_max_mem,
labels=shared_utils.label_maker(
"lighthouse", "beacon", image, el_client_context.client_name
constants.CL_CLIENT_TYPE.lighthouse,
constants.CLIENT_TYPES.cl,
image,
el_client_context.client_name,
),
)

Expand Down Expand Up @@ -413,7 +416,10 @@ def get_validator_config(
min_memory=v_min_mem,
max_memory=v_max_mem,
labels=shared_utils.label_maker(
"lighthouse", "validator", image, el_client_context.client_name
constants.CL_CLIENT_TYPE.lighthouse,
constants.CLIENT_TYPES.validator,
image,
el_client_context.client_name,
),
)

Expand Down
10 changes: 8 additions & 2 deletions src/cl/lodestar/lodestar_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,10 @@ def get_beacon_config(
min_memory=bn_min_mem,
max_memory=bn_max_mem,
labels=shared_utils.label_maker(
"lodestar", "beacon", image, el_client_context.client_name
constants.CL_CLIENT_TYPE.lodestar,
constants.CLIENT_TYPES.cl,
image,
el_client_context.client_name,
),
)

Expand Down Expand Up @@ -357,7 +360,10 @@ def get_validator_config(
min_memory=v_min_mem,
max_memory=v_max_mem,
labels=shared_utils.label_maker(
"lodestar", "validator", image, el_client_context.client_name
constants.CL_CLIENT_TYPE.lodestar,
constants.CLIENT_TYPES.validator,
image,
el_client_context.client_name,
),
)

Expand Down
5 changes: 4 additions & 1 deletion src/cl/nimbus/nimbus_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,10 @@ def get_config(
min_memory=bn_min_mem,
max_memory=bn_max_mem,
labels=shared_utils.label_maker(
"nimbus", "beacon", image, el_client_context.client_name
constants.CL_CLIENT_TYPE.nimbus,
constants.CLIENT_TYPES.cl,
image,
el_client_context.client_name,
),
)

Expand Down
10 changes: 8 additions & 2 deletions src/cl/prysm/prysm_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,10 @@ def get_beacon_config(
min_memory=bn_min_mem,
max_memory=bn_max_mem,
labels=shared_utils.label_maker(
"prysm", "beacon", beacon_image, el_client_context.client_name
constants.CL_CLIENT_TYPE.prysm,
constants.CLIENT_TYPES.cl,
beacon_image,
el_client_context.client_name,
),
)

Expand Down Expand Up @@ -388,7 +391,10 @@ def get_validator_config(
min_memory=v_min_mem,
max_memory=v_max_mem,
labels=shared_utils.label_maker(
"prysm", "validator", validator_image, el_client_context.client_name
constants.CL_CLIENT_TYPE.prysm,
constants.CLIENT_TYPES.validator,
validator_image,
el_client_context.client_name,
),
)

Expand Down
5 changes: 4 additions & 1 deletion src/cl/teku/teku_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,10 @@ def get_config(
min_memory=bn_min_mem,
max_memory=bn_max_mem,
labels=shared_utils.label_maker(
"teku", "beacon", image, el_client_context.client_name
constants.CL_CLIENT_TYPE.teku,
constants.CLIENT_TYPES.cl,
image,
el_client_context.client_name,
),
)

Expand Down
7 changes: 6 additions & 1 deletion src/el/besu/besu_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,12 @@ def get_config(
min_memory=el_min_mem,
max_memory=el_max_mem,
env_vars=extra_env_vars,
labels=shared_utils.label_maker("besu", "execution", image, cl_client_name),
labels=shared_utils.label_maker(
constants.EL_CLIENT_TYPE.besu,
constants.CLIENT_TYPES.el,
image,
cl_client_name,
),
)


Expand Down
7 changes: 6 additions & 1 deletion src/el/erigon/erigon_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,12 @@ def get_config(
min_memory=el_min_mem,
max_memory=el_max_mem,
env_vars=extra_env_vars,
labels=shared_utils.label_maker("erigon", "execution", image, cl_client_name),
labels=shared_utils.label_maker(
constants.EL_CLIENT_TYPE.erigon,
constants.CLIENT_TYPES.el,
image,
cl_client_name,
),
)


Expand Down
5 changes: 4 additions & 1 deletion src/el/ethereumjs/ethereumjs_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,10 @@ def get_config(
max_memory=el_max_mem,
env_vars=extra_env_vars,
labels=shared_utils.label_maker(
"ethereumjs", "execution", image, cl_client_name
constants.EL_CLIENT_TYPE.ethereumjs,
constants.CLIENT_TYPES.el,
image,
cl_client_name,
),
)

Expand Down
7 changes: 6 additions & 1 deletion src/el/geth/geth_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,12 @@ def get_config(
min_memory=el_min_mem,
max_memory=el_max_mem,
env_vars=extra_env_vars,
labels=shared_utils.label_maker("geth", "execution", image, cl_client_name),
labels=shared_utils.label_maker(
constants.EL_CLIENT_TYPE.geth,
constants.CLIENT_TYPES.el,
image,
cl_client_name,
),
)


Expand Down
5 changes: 4 additions & 1 deletion src/el/nethermind/nethermind_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,10 @@ def get_config(
max_memory=el_max_mem,
env_vars=extra_env_vars,
labels=shared_utils.label_maker(
"nethermind", "execution", image, cl_client_name
constants.EL_CLIENT_TYPE.nethermind,
constants.CLIENT_TYPES.el,
image,
cl_client_name,
),
)

Expand Down
7 changes: 6 additions & 1 deletion src/el/reth/reth_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,12 @@ def get_config(
min_memory=el_min_mem,
max_memory=el_max_mem,
env_vars=extra_env_vars,
labels=shared_utils.label_maker("reth", "execution", image, cl_client_name),
labels=shared_utils.label_maker(
constants.EL_CLIENT_TYPE.reth,
constants.CLIENT_TYPES.el,
image,
cl_client_name,
),
)


Expand Down
6 changes: 6 additions & 0 deletions src/package_io/constants.star
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ GLOBAL_CLIENT_LOG_LEVEL = struct(
trace="trace",
)

CLIENT_TYPES = struct(
el="execution",
cl="beacon",
validator="validator",
)

VALIDATING_REWARDS_ACCOUNT = "0x878705ba3f8Bc32FCf7F4CAa1A35E72AF65CF766"
MAX_ENR_ENTRIES = 20
MAX_ENODE_ENTRIES = 20
Expand Down

0 comments on commit 607d9ba

Please sign in to comment.