diff --git a/ansible/inventories/devnet-0/group_vars/nimbusel.yaml b/ansible/inventories/devnet-0/group_vars/nimbusel.yaml new file mode 100644 index 0000000..e0d2bf8 --- /dev/null +++ b/ansible/inventories/devnet-0/group_vars/nimbusel.yaml @@ -0,0 +1,80 @@ +# role: ethpandaops.general.bootstrap +bootstrap_default_user_authorized_keys_github_team_el: + - tersec + - jangko + - advaita-saha + - mjfh + +# role: ethpandaops.general.ethereum_node +ethereum_node_el: nimbusel +# role: ethpandaops.general.nimbusel +nimbusel_container_name: execution +nimbusel_container_image: "{{ default_ethereum_client_images.nimbusel }}" +nimbusel_container_env: + VIRTUAL_HOST: "{{ ethereum_node_rcp_hostname }}" + VIRTUAL_PORT: "{{ ethereum_node_el_ports_http_rpc | string }}" + LETSENCRYPT_HOST: "{{ ethereum_node_rcp_hostname }}" + +nimbusel_container_volumes: + - "{{ nimbusel_datadir }}:/data" + - "{{ nimbusel_auth_jwt_path }}:/execution-auth.jwt:ro" + - "{{ eth_testnet_config_dir }}:/network-config:ro" +nimbusel_container_command_extra_args: + - --custom-network=/network-config/genesis.json + - --bootstrap-node={{ ethereum_el_bootnodes | join(',') }} + +prometheus_config: | + global: + scrape_interval: 30s + evaluation_interval: 30s + scrape_timeout: 10s + external_labels: + instance: "{{ ethereum_network_name }}-{{ inventory_hostname }}" + ip_address: "{{ ansible_host }}" + network: "{{ ethereum_network_name }}" + testnet: "{{ ethereum_network_name }}" + execution_client: "{{ ethereum_node_el }}" + consensus_client: "{{ ethereum_node_cl }}" + remote_write: + - queue_config: + batch_send_deadline: 5s + max_backoff: 500ms + max_samples_per_send: 500 + min_backoff: 50ms + max_shards: 100 + url: {{ prometheus_remote_push_url }} + remote_timeout: 10s + basic_auth: + username: {{ prometheus_remote_write_username }} + password: {{ prometheus_remote_write_password }} + scrape_configs: + - job_name: "prometheus" + metrics_path: "/metrics" + static_configs: + - targets: ["localhost:9090"] + labels: + instance: "{{ ethereum_network_name }}-{{ inventory_hostname }}" + - job_name: "node" + metrics_path: "/metrics" + static_configs: + - targets: ["172.17.0.1:9100"] + labels: + instance: "{{ ethereum_network_name }}-{{ inventory_hostname }}" + - job_name: "exporter" + metrics_path: "/metrics" + static_configs: + - targets: ["ethereum-metrics-exporter:9090"] + labels: + instance: "{{ ethereum_network_name }}-{{ inventory_hostname }}" + - job_name: "consensus_node" + metrics_path: "/metrics" + static_configs: + - targets: ["{{ vars[ethereum_node_cl + '_container_name'] }}:{{ ethereum_node_cl_ports_metrics }}"] + labels: + instance: "{{ ethereum_network_name }}-{{ inventory_hostname }}" + - job_name: "execution" + metrics_path: "/metrics" + static_configs: + - targets: ["execution:{{ ethereum_node_el_ports_metrics }}"] + labels: + instance: "{{ ethereum_network_name }}-{{ inventory_hostname }}" diff --git a/scripts/split-calculator.py b/scripts/split-calculator.py new file mode 100644 index 0000000..910bfd4 --- /dev/null +++ b/scripts/split-calculator.py @@ -0,0 +1,55 @@ +import numpy as np +import math + +total_validators = 10000 +validator_per_machine = 250 +start = 0 + +cl_split = { + 'prysm': 0.25, + 'lighthouse': 0.25, + 'teku': 0.20, + 'lodestar': 0.10, + 'nimbus': 0.10, + 'grandine': 0.10 +} + + +el_split = { + 'geth': 0.50, + 'nethermind': 0.25, + 'ethereumjs': 0.01, + 'reth': 0.08, + 'besu': 0.08, + 'erigon': 0.07, + 'nimbusel': 0.01, +} + +pairwise_validators = {} + +for cl_name, cl_percent in cl_split.items(): + for el_name, el_percent in el_split.items(): + validators = total_validators * cl_percent * el_percent + pairwise_validators[(cl_name, el_name)] = validators + +output = "" +for (cl, el), count in pairwise_validators.items(): + + variable_name = f"{cl.lower()}_{el.lower()}" + name = f"{cl.lower()}-{el.lower()}" + machine_count = math.ceil(count / validator_per_machine) + + end = start + int(count) + + output += f'variable "{variable_name}" {{\n' + output += f' default = {{\n' + output += f' name = "{name}"\n' + output += f' count = {machine_count}\n' + output += f' validator_start = {start}\n' + output += f' validator_end = {end}\n' + output += f' }}\n' + output += f'}}\n\n' + + start = end + +print(output) diff --git a/terraform/devnet-0/ansible_inventory.tmpl b/terraform/devnet-0/ansible_inventory.tmpl index 5f99be0..25f4341 100644 --- a/terraform/devnet-0/ansible_inventory.tmpl +++ b/terraform/devnet-0/ansible_inventory.tmpl @@ -26,7 +26,7 @@ ${replace(gid, "-", "_")} # Execution client groups -%{ for el in ["besu", "ethereumjs", "geth", "nethermind", "erigon", "reth"] ~} +%{ for el in ["besu", "ethereumjs", "geth", "nethermind", "erigon", "reth", "nimbusel"] ~} [${el}:children] %{ for gid, group in groups ~} %{ if split("-", gid)[0] != "bootnode" ~} diff --git a/terraform/devnet-0/hetzner/main.tf b/terraform/devnet-0/hetzner/main.tf index 3365cae..9ff2610 100644 --- a/terraform/devnet-0/hetzner/main.tf +++ b/terraform/devnet-0/hetzner/main.tf @@ -72,35 +72,41 @@ locals { var.lighthouse_besu, var.lighthouse_ethereumjs, var.lighthouse_reth, + var.lighthouse_nimbusel, var.prysm_geth, var.prysm_nethermind, var.prysm_erigon, var.prysm_besu, var.prysm_ethereumjs, var.prysm_reth, + var.prysm_nimbusel, var.lodestar_geth, var.lodestar_nethermind, var.lodestar_erigon, var.lodestar_besu, var.lodestar_ethereumjs, var.lodestar_reth, + var.lodestar_nimbusel, var.nimbus_geth, var.nimbus_nethermind, var.nimbus_erigon, var.nimbus_besu, var.nimbus_ethereumjs, var.nimbus_reth, + var.nimbus_nimbusel, var.teku_geth, var.teku_nethermind, var.teku_erigon, var.teku_besu, var.teku_ethereumjs, var.teku_reth, + var.teku_nimbusel, var.grandine_geth, var.grandine_nethermind, var.grandine_erigon, var.grandine_besu, var.grandine_ethereumjs, var.grandine_reth, + var.grandine_nimbusel, ] } diff --git a/terraform/devnet-0/hetzner/nodes.tf b/terraform/devnet-0/hetzner/nodes.tf index a37778b..96848df 100644 --- a/terraform/devnet-0/hetzner/nodes.tf +++ b/terraform/devnet-0/hetzner/nodes.tf @@ -64,6 +64,15 @@ variable "lighthouse_reth" { } } +variable "lighthouse_nimbusel" { + default = { + name = "lighthouse-nimbusel" + count = 0 + validator_start = 0 + validator_end = 0 + } +} + # Prysm variable "prysm_geth" { default = { @@ -119,6 +128,15 @@ variable "prysm_reth" { } } +variable "prysm_nimbusel" { + default = { + name = "prysm-nimbusel" + count = 0 + validator_start = 0 + validator_end = 0 + } +} + # Lodestar variable "lodestar_geth" { default = { @@ -174,6 +192,15 @@ variable "lodestar_reth" { } } +variable "lodestar_nimbusel" { + default = { + name = "lodestar-nimbusel" + count = 0 + validator_start = 0 + validator_end = 0 + } +} + # Nimbus variable "nimbus_geth" { default = { @@ -229,6 +256,15 @@ variable "nimbus_reth" { } } +variable "nimbus_nimbusel" { + default = { + name = "nimbus-nimbusel" + count = 0 + validator_start = 0 + validator_end = 0 + } +} + # Teku variable "teku_geth" { default = { @@ -284,6 +320,16 @@ variable "teku_reth" { } } +variable "teku_nimbusel" { + default = { + name = "teku-nimbusel" + count = 0 + validator_start = 0 + validator_end = 0 + } +} + +#Grandine variable "grandine_geth" { default = { name = "grandine-geth" @@ -337,3 +383,12 @@ variable "grandine_reth" { validator_end = 0 } } + +variable "grandine_nimbusel" { + default = { + name = "grandine-nimbusel" + count = 0 + validator_start = 0 + validator_end = 0 + } +} \ No newline at end of file diff --git a/terraform/devnet-0/main.tf b/terraform/devnet-0/main.tf index 0fc4656..5ab84fa 100644 --- a/terraform/devnet-0/main.tf +++ b/terraform/devnet-0/main.tf @@ -57,7 +57,7 @@ variable "base_cidr_block" { default = "10.76.0.0/16" } //////////////////////////////////////////////////////////////////////////////////////// -// LOCALS +// LOCALS //////////////////////////////////////////////////////////////////////////////////////// locals { vm_groups = [ @@ -68,35 +68,41 @@ locals { var.lighthouse_besu, var.lighthouse_ethereumjs, var.lighthouse_reth, + var.lighthouse_nimbusel, var.prysm_geth, var.prysm_nethermind, var.prysm_erigon, var.prysm_besu, var.prysm_ethereumjs, var.prysm_reth, + var.prysm_nimbusel, var.lodestar_geth, var.lodestar_nethermind, var.lodestar_erigon, var.lodestar_besu, var.lodestar_ethereumjs, var.lodestar_reth, + var.lodestar_nimbusel, var.nimbus_geth, var.nimbus_nethermind, var.nimbus_erigon, var.nimbus_besu, var.nimbus_ethereumjs, var.nimbus_reth, + var.nimbus_nimbusel, var.teku_geth, var.teku_nethermind, var.teku_erigon, var.teku_besu, var.teku_ethereumjs, var.teku_reth, + var.teku_nimbusel, var.grandine_geth, var.grandine_nethermind, var.grandine_erigon, var.grandine_besu, var.grandine_ethereumjs, var.grandine_reth, + var.grandine_nimbusel, ] } diff --git a/terraform/devnet-0/nodes.tf b/terraform/devnet-0/nodes.tf index d526f3d..c878d58 100644 --- a/terraform/devnet-0/nodes.tf +++ b/terraform/devnet-0/nodes.tf @@ -63,6 +63,15 @@ variable "lighthouse_reth" { } } +variable "lighthouse_nimbusel" { + default = { + name = "lighthouse-nimbusel" + count = 0 + validator_start = 0 + validator_end = 0 + } +} + # Prysm variable "prysm_geth" { default = { @@ -118,6 +127,15 @@ variable "prysm_reth" { } } +variable "prysm_nimbusel" { + default = { + name = "prysm-nimbusel" + count = 0 + validator_start = 0 + validator_end = 0 + } +} + # Lodestar variable "lodestar_geth" { default = { @@ -173,6 +191,15 @@ variable "lodestar_reth" { } } +variable "lodestar_nimbusel" { + default = { + name = "lodestar-nimbusel" + count = 0 + validator_start = 0 + validator_end = 0 + } +} + # Nimbus variable "nimbus_geth" { default = { @@ -228,6 +255,15 @@ variable "nimbus_reth" { } } +variable "nimbus_nimbusel" { + default = { + name = "nimbus-nimbusel" + count = 0 + validator_start = 0 + validator_end = 0 + } +} + # Teku variable "teku_geth" { default = { @@ -283,6 +319,16 @@ variable "teku_reth" { } } +variable "teku_nimbusel" { + default = { + name = "teku-nimbusel" + count = 0 + validator_start = 0 + validator_end = 0 + } +} + +# Grandine variable "grandine_geth" { default = { name = "grandine-geth" @@ -336,3 +382,12 @@ variable "grandine_reth" { validator_end = 0 } } + +variable "grandine_nimbusel" { + default = { + name = "grandine-nimbusel" + count = 0 + validator_start = 0 + validator_end = 0 + } +} \ No newline at end of file