Skip to content

Commit

Permalink
feat: add nimbusel
Browse files Browse the repository at this point in the history
  • Loading branch information
barnabasbusa committed Oct 25, 2024
1 parent e8d37fb commit 3fafac9
Show file tree
Hide file tree
Showing 7 changed files with 259 additions and 2 deletions.
80 changes: 80 additions & 0 deletions ansible/inventories/devnet-0/group_vars/nimbusel.yaml
Original file line number Diff line number Diff line change
@@ -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 }}"
55 changes: 55 additions & 0 deletions scripts/split-calculator.py
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 1 addition & 1 deletion terraform/devnet-0/ansible_inventory.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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" ~}
Expand Down
6 changes: 6 additions & 0 deletions terraform/devnet-0/hetzner/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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,
]
}
55 changes: 55 additions & 0 deletions terraform/devnet-0/hetzner/nodes.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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 = {
Expand Down Expand Up @@ -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 = {
Expand Down Expand Up @@ -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 = {
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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
}
}
8 changes: 7 additions & 1 deletion terraform/devnet-0/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ variable "base_cidr_block" {
default = "10.76.0.0/16"
}
////////////////////////////////////////////////////////////////////////////////////////
// LOCALS
// LOCALS
////////////////////////////////////////////////////////////////////////////////////////
locals {
vm_groups = [
Expand All @@ -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,
]
}
Loading

0 comments on commit 3fafac9

Please sign in to comment.