Skip to content

Commit

Permalink
refactor el,vc
Browse files Browse the repository at this point in the history
  • Loading branch information
barnabasbusa committed Sep 27, 2024
1 parent 99be7a9 commit cc8dfc5
Show file tree
Hide file tree
Showing 23 changed files with 646 additions and 857 deletions.
165 changes: 165 additions & 0 deletions .github/tests/peerdas-deneb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
participants:
# Super nodes
- cl_type: prysm
cl_image: ethpandaops/prysm-beacon-chain:peerDAS
supernode: true
cl_extra_params:
- --minimum-peers-per-subnet=1
count: 3
cl_min_cpu: 1000
cl_min_mem: 1024
cl_max_cpu: 4000
cl_max_mem: 8096
el_min_cpu: 1000
el_min_mem: 1024
el_max_cpu: 4000
el_max_mem: 8096
- cl_type: lighthouse
cl_image: ethpandaops/lighthouse:unstable
supernode: true
count: 3
cl_min_cpu: 1000
cl_min_mem: 1024
cl_max_cpu: 4000
cl_max_mem: 8096
el_min_cpu: 1000
el_min_mem: 1024
el_max_cpu: 4000
el_max_mem: 8096
- cl_type: teku
cl_image: ethpandaops/teku:nashatyrev-das
supernode: true
count: 3
cl_min_cpu: 1000
cl_min_mem: 1024
cl_max_cpu: 4000
cl_max_mem: 8096
el_min_cpu: 1000
el_min_mem: 1024
el_max_cpu: 4000
el_max_mem: 8096
- cl_type: nimbus
cl_image: ethpandaops/nimbus-eth2:pdsync
supernode: true
cl_extra_params:
- --sync-light-client=no
count: 3
cl_min_cpu: 1000
cl_min_mem: 1024
cl_max_cpu: 4000
cl_max_mem: 8096
el_min_cpu: 1000
el_min_mem: 1024
el_max_cpu: 4000
el_max_mem: 8096
- cl_type: lodestar
cl_image: ethpandaops/lodestar:peerDAS
supernode: true
cl_extra_params:
- --persistNetworkIdentity
count: 3
cl_min_cpu: 1000
cl_min_mem: 1024
cl_max_cpu: 4000
cl_max_mem: 8096
el_min_cpu: 1000
el_min_mem: 1024
el_max_cpu: 4000
el_max_mem: 8096
- cl_type: grandine
cl_image: ethpandaops/grandine:hangleang-fix-negotiation-timeout
supernode: true
cl_min_cpu: 1000
cl_min_mem: 1024
cl_max_cpu: 4000
cl_max_mem: 8096
el_min_cpu: 1000
el_min_mem: 1024
el_max_cpu: 4000
el_max_mem: 8096
# Full nodes
- cl_type: prysm
cl_image: ethpandaops/prysm-beacon-chain:peerDAS
cl_extra_params:
- --minimum-peers-per-subnet=1
- --data-columns-withhold-count=64
count: 3
cl_min_cpu: 1000
cl_min_mem: 1024
cl_max_cpu: 4000
cl_max_mem: 8096
el_min_cpu: 1000
el_min_mem: 1024
el_max_cpu: 4000
el_max_mem: 8096
- cl_type: lighthouse
cl_image: ethpandaops/lighthouse:unstable
count: 3
cl_min_cpu: 1000
cl_min_mem: 1024
cl_max_cpu: 4000
cl_max_mem: 8096
el_min_cpu: 1000
el_min_mem: 1024
el_max_cpu: 4000
el_max_mem: 8096
- cl_type: lodestar
cl_image: ethpandaops/lodestar:peerDAS
cl_extra_params: [--persistNetworkIdentity]
count: 3
cl_min_cpu: 1000
cl_min_mem: 1024
cl_max_cpu: 4000
cl_max_mem: 8096
el_min_cpu: 1000
el_min_mem: 1024
el_max_cpu: 4000
el_max_mem: 8096
- cl_type: nimbus
cl_image: ethpandaops/nimbus-eth2:pdsync
cl_extra_params:
- --sync-light-client=no
count: 3
cl_min_cpu: 1000
cl_min_mem: 1024
cl_max_cpu: 4000
cl_max_mem: 8096
el_min_cpu: 1000
el_min_mem: 1024
el_max_cpu: 4000
el_max_mem: 8096
- cl_type: teku
cl_image: ethpandaops/teku:nashatyrev-das
count: 3
cl_min_cpu: 1000
cl_min_mem: 1024
cl_max_cpu: 4000
cl_max_mem: 8096
el_min_cpu: 1000
el_min_mem: 1024
el_max_cpu: 4000
el_max_mem: 8096
- cl_type: grandine
cl_image: ethpandaops/grandine:hangleang-fix-negotiation-timeout
cl_min_cpu: 1000
cl_min_mem: 1024
cl_max_cpu: 4000
cl_max_mem: 8096
el_min_cpu: 1000
el_min_mem: 1024
el_max_cpu: 4000
el_max_mem: 8096
network_params:
eip7594_fork_epoch: 0
eip7594_fork_version: "0x50000038"
genesis_delay: 1200
snooper_enabled: true
global_log_level: debug
additional_services:
- dora
- goomy_blob
- prometheus_grafana
dora_params:
image: ethpandaops/dora:peerdas-as-deneb-column-view-latest
env: {"FRONTEND_SHOW_PEER_DAS_INFOS": "true", "FRONTEND_SHOW_SENSITIVE_PEER_INFOS": "true"}
ethereum_metrics_exporter_enabled: true
38 changes: 38 additions & 0 deletions .github/tests/peerdas-devnet-2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
participants:
# Supernodes
- cl_type: prysm
cl_image: ethpandaops/prysm-beacon-chain:peerDAS-df42f37
supernode: true
- cl_type: lighthouse
cl_image: ethpandaops/lighthouse:unstable-2792705
supernode: true
- cl_type: teku
cl_image: ethpandaops/teku:nashatyrev-das-458f7e7
supernode: true
- cl_type: nimbus
cl_image: ethpandaops/nimbus-eth2:pdsync-30f8ef9
supernode: true
- cl_type: lodestar
cl_image: ethpandaops/lodestar:peerDAS-a3de70f
supernode: true
- cl_type: grandine
cl_image: ethpandaops/grandine:hangleang-feature-das-2c2f74b
supernode: true
# Fullnodes
- cl_type: prysm
cl_image: ethpandaops/prysm-beacon-chain:peerDAS-df42f37
- cl_type: lighthouse
cl_image: ethpandaops/lighthouse:unstable-2792705
- cl_type: teku
cl_image: ethpandaops/teku:nashatyrev-das-458f7e7
- cl_type: nimbus
cl_image: ethpandaops/nimbus-eth2:pdsync-30f8ef9
- cl_type: lodestar
cl_image: ethpandaops/lodestar:peerDAS-a3de70f
- cl_type: grandine
cl_image: ethpandaops/grandine:hangleang-feature-das-2c2f74b
network_params:
network: peerdas-devnet-2
snooper_enabled: true
additional_services:
- dora
26 changes: 0 additions & 26 deletions src/cl/cl_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -106,22 +106,6 @@ def launch(
participant.cl_tolerations, participant.tolerations, global_tolerations
)

(
cl_min_cpu,
cl_max_cpu,
cl_min_mem,
cl_max_mem,
cl_volume_size,
) = shared_utils.get_cpu_mem_resource_limits(
participant.cl_min_cpu,
participant.cl_max_cpu,
participant.cl_min_mem,
participant.cl_max_mem,
participant.cl_volume_size,
network_name,
participant.cl_type,
)

if cl_type not in cl_launchers:
fail(
"Unsupported launcher '{0}', need one of '{1}'".format(
Expand Down Expand Up @@ -175,11 +159,6 @@ def launch(
el_context,
full_name,
new_cl_node_validator_keystores,
cl_min_cpu,
cl_max_cpu,
cl_min_mem,
cl_max_mem,
cl_volume_size,
snooper_engine_context,
persistent,
tolerations,
Expand All @@ -201,11 +180,6 @@ def launch(
el_context,
full_name,
new_cl_node_validator_keystores,
cl_min_cpu,
cl_max_cpu,
cl_min_mem,
cl_max_mem,
cl_volume_size,
snooper_engine_context,
persistent,
tolerations,
Expand Down
41 changes: 13 additions & 28 deletions src/cl/grandine/grandine_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ def launch(
el_context,
full_name,
node_keystore_files,
cl_min_cpu,
cl_max_cpu,
cl_min_mem,
cl_max_mem,
cl_volume_size,
snooper_engine_context,
persistent,
tolerations,
Expand All @@ -68,13 +63,8 @@ def launch(
el_context,
full_name,
node_keystore_files,
cl_min_cpu,
cl_max_cpu,
cl_min_mem,
cl_max_mem,
snooper_engine_context,
persistent,
cl_volume_size,
tolerations,
node_selectors,
checkpoint_sync_enabled,
Expand Down Expand Up @@ -143,13 +133,8 @@ def get_beacon_config(
el_context,
full_name,
node_keystore_files,
cl_min_cpu,
cl_max_cpu,
cl_min_mem,
cl_max_mem,
snooper_engine_context,
persistent,
cl_volume_size,
tolerations,
node_selectors,
checkpoint_sync_enabled,
Expand Down Expand Up @@ -335,7 +320,11 @@ def get_beacon_config(
if persistent:
files[BEACON_DATA_DIRPATH_ON_SERVICE_CONTAINER] = Directory(
persistent_key="data-{0}".format(beacon_service_name),
size=cl_volume_size,
size=int(participant.cl_volume_size)
if int(participant.cl_volume_size) > 0
else constants.VOLUME_SIZE[launcher.network][
constants.CL_TYPE.grandine + "_volume_size"
],
)
config_args = {
"image": participant.cl_image,
Expand All @@ -360,18 +349,14 @@ def get_beacon_config(
"user": User(uid=0, gid=0),
}

if cl_min_cpu > 0:
config_args["min_cpu"] = cl_min_cpu

if cl_max_cpu > 0:
config_args["max_cpu"] = cl_max_cpu

if cl_min_mem > 0:
config_args["min_memory"] = cl_min_mem

if cl_max_mem > 0:
config_args["max_memory"] = cl_max_mem

if int(participant.cl_min_cpu) > 0:
config_args["min_cpu"] = int(participant.cl_min_cpu)
if int(participant.cl_max_cpu) > 0:
config_args["max_cpu"] = int(participant.cl_max_cpu)
if int(participant.cl_min_mem) > 0:
config_args["min_memory"] = int(participant.cl_min_mem)
if int(participant.cl_max_mem) > 0:
config_args["max_memory"] = int(participant.cl_max_mem)
return ServiceConfig(**config_args)


Expand Down
Loading

0 comments on commit cc8dfc5

Please sign in to comment.