Skip to content

Commit

Permalink
update to match ipv6
Browse files Browse the repository at this point in the history
  • Loading branch information
barnabasbusa committed Mar 12, 2024
1 parent 1cdbbb3 commit ad88f5c
Show file tree
Hide file tree
Showing 15 changed files with 44 additions and 75 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ override.tf.json
*_override.tf.json
.terraformrc
terraform.rc
.terraform
.terraform.lock.hcl

# Sops
**/.decrypted*
Expand Down
2 changes: 1 addition & 1 deletion ansible/ansible.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[defaults]
ansible_managed = Ansible managed. Don't change this file manually. Template info: {{{{ (template_fullpath | replace(playbook_dir,'')) }}}}
stdout_callback = yaml
inventory = inventories/devnet-0/inventory.ini
inventory = inventories/devnet-0/inventory.ini, inventories/devnet-0/hetzner_inventory.ini
roles_path = vendor/roles/:roles
collections_path = vendor/collections
forks = 50
Expand Down
8 changes: 2 additions & 6 deletions ansible/inventories/devnet-0/group_vars/all/all.sops.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ secret_nginx_shared_basic_auth:
name: ENC[AES256_GCM,data:bjlM,iv:DiOGlqfOfrDlt7X4OGY27OYlkDDEHguv+kg1zRhBek0=,tag:ZPlucwl2PNXeXcOc8PmCBQ==,type:str]
password: ENC[AES256_GCM,data:NdtJvQ==,iv:qTDUrwmpKeh0yJB+GlJO7eZ2w0GHn8Lhu6wPS9Twc/g=,tag:QRtMmdNUCmm8XNjPQjqSnQ==,type:str]
secret_ethstats: ENC[AES256_GCM,data:WooVcg7hnyw=,iv:oChffj5kkh5901EC995UMnY8QmQAZtCycuHuF895vfU=,tag:WgwJwBjqYR/5d4cjukuM/A==,type:str]
secret_xatu_sentry:
server_address: ENC[AES256_GCM,data:1ZzqPJR2ahKnEf79n5lJG+s8kWjPLNnj4pfC9Bep,iv:c+BAgvsoj0D1GP3X7W2KAw+vpE2jf/K8pFiMnxaYd2A=,tag:5OeZLGNhaACttaRIRvMNYA==,type:str]
user: ENC[AES256_GCM,data:6Rl/PXMHqw==,iv:gHXmk6tie0m6usKO6v9kwBI3BW0Kjj04wuMiijQYVbg=,tag:qjLt4uzXQ2s3j+xvEGlYFQ==,type:str]
password: ENC[AES256_GCM,data:IXDXoO92,iv:vqjxnUIH2pso34k6DJTH8/ixkWgfrqb1TDqHslMj+6M=,tag:Jh8HaOMD9XSK1v4bouZHew==,type:str]
secret_genesis_mnemonic: ENC[AES256_GCM,data:23GmxqsbgvBVxqzp3dV8FlhAO7u3PKMP2FnP2lbk/tmjHQ6k7SHOnitqyWhJvyBjDVdofI4B0cw+0jVtvdnA6akuamfiT1qasZEZCpsQt78HnDa7VSBWeMEkyJgaRMaiG+uCsMbEZ/OX5O7JoIYDx9+QZss1zGu4dX5soTWpto+hUf2o9Nfm7Alp4go53iuxoipdsDeKCkyHegozLP2DdA==,iv:9X2DYpWHroJMFRS2FXos5gIVdybLdRiLi6RYoYnRhx8=,tag:h+EIIeNpzw34ro5lzcSggw==,type:str]
secret_mev_signingkey: ENC[AES256_GCM,data:7xug6L4MXETqWb7cmZS6BpAxBercs4mnJEg1NKp+LwZjCWl5pPAlTbfZASwXVBMo24Xoqi9/FbjeJML6WtaJ2Q==,iv:UGcVz81+wBNdb4cmkg9t4tSamqOaBUfWk6glh/6jUA8=,tag:W5Y00+vamA2tq2tEpAEhQA==,type:str]
secret_mev_flood_private_key: ENC[AES256_GCM,data:2vVJ+N0XLer202Dc5J2HVjTEW6XUa+LpmhS/mo2brt+qzabraTSaD7d4P5rVqbovW+W5Je5FdDr4s7rScyn/RA==,iv:1qNfUVqJ9eebRmA4Ly59KFR9WmaQ8eelSvNLJAWCJ10=,tag:knDhqt3zak1OEsHi2nQ3oA==,type:str]
Expand All @@ -30,8 +26,8 @@ sops:
azure_kv: []
hc_vault: []
age: []
lastmodified: "2024-02-29T09:00:40Z"
mac: ENC[AES256_GCM,data:udoL1DYICj3BCM4bcFOCvjPT/LbZ/eGiWIUZm+L/c9BbkeufGXDTQEyVMR9tNaBxU/DdlvWWHERvpB4NJsS0VpCO2+DRky36emAPIGCRR7mbLrx+mkaTho91M8A0wnpMV3kZNagJQc9otTWk56K0jUekMWZhiafsQKeDH8e2Xlg=,iv:9f/7iRCPHGIbLhbQZ29WtKwwM3ZHe93Tybv4iR0Q5/Q=,tag:9ogiXyPEhYj28BeeCkokIQ==,type:str]
lastmodified: "2024-03-12T10:09:43Z"
mac: ENC[AES256_GCM,data:0KM0rp4RqsMWC9wUcyT629sIJl8QsOaYPZySWub8AfBhtVR1IfAH0jw9mzAjb7mmj+gX4sf6dH9YiYxRdBjLG6q0b7p5GyBH0HZ7xAzcfv6wYREGyQh+jGlh6uYsBtrXbOcWleH16DBGgsXpZmGsXxkp5+H6bjsfPN24oIQxkMo=,iv:0ZgxcP3UchRxnaGJeTVDSrjORVkMT5PqNwnhe3gilXI=,tag:/ztFtfrKos+k1lP+Ppa6MQ==,type:str]
pgp:
- created_at: "2023-09-28T11:48:21Z"
enc: |-
Expand Down
9 changes: 6 additions & 3 deletions ansible/inventories/devnet-0/group_vars/all/all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ethstats_url: "ethstats.{{ ethereum_network_name }}.ethpandaops.io"
ethstats_secret: "{{ secret_ethstats }}"

### Checkpoint sync specific for Ansible & Kubernetes
checkpoint_sync_node: teku-nethermind-1
checkpoint_sync_node: bootnode-1
checkpoint_sync_enabled: false
checkpoint_sync_url: https://{{ secret_nginx_shared_basic_auth.name }}:{{ secret_nginx_shared_basic_auth.password }}@bn.{{ checkpoint_sync_node }}.srv.{{ ethereum_network_name }}.ethpandaops.io
checkpoint_sync_url_kube: https://<path:/secrets/services/services.enc.yaml#ethereum | jsonPath {.testnets.dencun-devnets.node_ingress.combined}>@bn.{{ checkpoint_sync_node }}.srv.{{ ethereum_network_name }}.ethpandaops.io
Expand All @@ -34,7 +34,7 @@ checkpoint_sync_url_kube: https://<path:/secrets/services/services.enc.yaml#ethe
# ╚═╝░░╚═╝░╚════╝░╚══════╝╚══════╝  ░░░╚═╝░░░╚═╝░░╚═╝╚═╝░░╚═╝╚═════╝░

# role: ethpandaops.general.ethereum_genesis
ethereum_genesis_generator_container_image: "ethpandaops/ethereum-genesis-generator:2.0.4"
ethereum_genesis_generator_container_image: "ethpandaops/ethereum-genesis-generator:2.0.12"
ethereum_genesis_generator_version: "{{ ethereum_genesis_generator_container_image.split(':')[-1] }}"
ethereum_genesis_network_seed: "{{ ansible_inventory_sources[0] }}"
ethereum_genesis_chain_id: "70{{ 99999999 | random(start=10000000, seed=ethereum_genesis_network_seed) }}"
Expand All @@ -55,7 +55,7 @@ ethereum_genesis_generator_config_files:
export EL_AND_CL_MNEMONIC="{{ ethereum_genesis_mnemonic }}"
export CL_EXEC_BLOCK="0"
export DEPOSIT_CONTRACT_BLOCK="0x0000000000000000000000000000000000000000000000000000000000000000"
export NUMBER_OF_VALIDATORS=0
export NUMBER_OF_VALIDATORS=200
export GENESIS_FORK_VERSION="0x10{{ ethereum_genesis_fork_version_suffix }}"
export ALTAIR_FORK_VERSION="0x20{{ ethereum_genesis_fork_version_suffix }}"
export BELLATRIX_FORK_VERSION="0x30{{ ethereum_genesis_fork_version_suffix }}"
Expand All @@ -70,6 +70,9 @@ ethereum_genesis_generator_config_files:
export SLOT_DURATION_IN_SECONDS=12
export MAX_CHURN=8
export EJECTION_BALANCE=16000000000
export ETH1_FOLLOW_DISTANCE=2048
export MIN_VALIDATOR_WITHDRAWABILITY_DELAY=256
export SHARD_COMMITTEE_PERIOD=256
ethereum_genesis_validator_keys_output_dir: "{{ ansible_inventory_sources[0] | dirname }}/files/validator_keys"
ethereum_genesis_validator_bls_change_execution_address: "{{ ethereum_node_cl_validator_fee_recipient }}"
ethereum_genesis_validator_keyranges: >-
Expand Down
11 changes: 2 additions & 9 deletions ansible/inventories/devnet-0/group_vars/besu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ bootstrap_default_user_authorized_keys_github_team_el: []

# role: ethpandaops.general.ethereum_node
ethereum_node_el: besu

besu_announced_ipv6: "{{ ansible_default_ipv6.address }}"
# role: ethpandaops.general.besu
besu_container_name: execution
besu_container_image: "{{ default_ethereum_client_images.besu }}"
Expand All @@ -30,13 +30,6 @@ besu_container_command_extra_args:
- --sync-mode=FULL
- --data-storage-format=BONSAI
- --ethstats={{ inventory_hostname }}:{{ ethstats_secret }}@{{ ethstats_url }}:443
- --Xfilter-on-enr-fork-id=true
- --p2p-host={{ besu_announced_ipv6 }} # not supported

besu_container_pull: true

besu_container_ports:
- "127.0.0.1:{{ besu_ports_http_rpc }}:{{ besu_ports_http_rpc }}"
- "127.0.0.1:{{ besu_ports_engine }}:{{ besu_ports_engine }}"
- "{{ besu_ports_p2p }}:{{ besu_ports_p2p }}"
- "{{ besu_ports_p2p }}:{{ besu_ports_p2p }}/udp"
- "5005:5005"
5 changes: 1 addition & 4 deletions ansible/inventories/devnet-0/group_vars/ethereumjs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ethereum_node_el: ethereumjs

ethereum_node_fact_discovery_el_enode_cmd:
ethereumjs: cat /data/ethereumjs/genesis/rlpx

ethereumjs_announced_ipv6: "{{ ansible_default_ipv6.address }}"
# role: ethpandaops.general.ethereumjs
ethereumjs_container_name: execution
ethereumjs_container_image: "{{ default_ethereum_client_images.ethereumjs }}"
Expand All @@ -25,11 +25,8 @@ ethereumjs_container_volumes:
ethereumjs_container_command_extra_args:
- --gethGenesis=/network-config/genesis.json
- --bootnodes={{ ethereum_el_bootnodes | join(',') }}
- --syncMode=full
- --maxPeers=75
- --isSingleNode=true
- --logLevel=debug

prometheus_config: |
global:
scrape_interval: 30s
Expand Down
12 changes: 0 additions & 12 deletions ansible/inventories/devnet-0/group_vars/lighthouse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,6 @@ validator_bls_sync_files:
# role: ethpandaops.general.ethereum_node
ethereum_node_cl: lighthouse

lighthouse_ports_quic: 9001

lighthouse_container_ports:
- "127.0.0.1:{{ lighthouse_ports_http_beacon }}:{{ lighthouse_ports_http_beacon }}"
- "{{ lighthouse_ports_p2p_tcp }}:{{ lighthouse_ports_p2p_tcp }}"
- "{{ lighthouse_ports_p2p_udp }}:{{ lighthouse_ports_p2p_udp }}/udp"
- "{{ lighthouse_ports_quic }}:{{ lighthouse_ports_quic }}"
- "{{ lighthouse_ports_quic }}:{{ lighthouse_ports_quic }}/udp"

# role: ethpandaops.general.lighthouse
lighthouse_container_name: beacon
lighthouse_validator_container_name: validator
Expand All @@ -50,9 +41,6 @@ lighthouse_container_volumes:
lighthouse_container_command_extra_args:
- --testnet-dir=/network-config
- --boot-nodes={{ ethereum_cl_bootnodes | join(',') }}
- --debug-level=debug
- --quic-port={{ lighthouse_ports_quic }}
- --enr-quic-port={{ lighthouse_ports_quic }}
lighthouse_validator_container_volumes:
- "{{ lighthouse_validator_datadir }}:/validator-data"
- "{{ eth_testnet_config_dir }}:/network-config:ro"
Expand Down
2 changes: 1 addition & 1 deletion ansible/inventories/devnet-0/group_vars/nethermind.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ bootstrap_default_user_authorized_keys_github_team_el: []

# role: ethpandaops.general.ethereum_node
ethereum_node_el: nethermind

nethermind_announced_ipv6: "{{ ansible_default_ipv6.address }}"
# role: ethpandaops.general.nethermind
nethermind_container_name: execution
nethermind_container_image: "{{ default_ethereum_client_images.nethermind }}"
Expand Down
6 changes: 2 additions & 4 deletions ansible/inventories/devnet-0/group_vars/reth.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# role: ethpandaops.general.bootstrap
bootstrap_default_user_authorized_keys_github_team_el:
bootstrap_default_user_authorized_keys_github_team_el: []
# - gakonst

# role: ethpandaops.general.ethereum_node
ethereum_node_el: reth

reth_announced_ipv6: "{{ ansible_default_ipv6.address }}"
# role: ethpandaops.general.reth
reth_container_name: execution
reth_container_image: "{{ default_ethereum_client_images.reth }}"
Expand All @@ -19,8 +19,6 @@ reth_container_volumes:
reth_container_command_extra_args:
- --chain=/network-config/genesis.json
- --bootnodes={{ ethereum_el_bootnodes | join(',') }}
- --db.log-level=debug

prometheus_config: |
global:
scrape_interval: 30s
Expand Down
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"] ~}
%{ for el in ["besu", "ethereumjs", "geth", "nethermind", "erigon", "reth"] ~}
[${el}:children]
%{ for gid, group in groups ~}
%{ if split("-", gid)[0] != "bootnode" ~}
Expand Down
4 changes: 2 additions & 2 deletions terraform/devnet-0/digitalocean.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
////////////////////////////////////////////////////////////////////////////////////////
variable "digitalocean_project_name" {
type = string
default = "ProjectName"
default = "4844 Testnets"
}

variable "digitalocean_ssh_key_name" {
type = string
default = "examplekey"
default = "shared-devops-eth2"
}

variable "digitalocean_regions" {
Expand Down
4 changes: 2 additions & 2 deletions terraform/devnet-0/hetzner/hetzner.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
// TERRAFORM PROVIDERS & BACKEND
////////////////////////////////////////////////////////////////////////////////////////
provider "hcloud" {
token = var.hcloud_token
token = var.dencun_hcloud_token
}
////////////////////////////////////////////////////////////////////////////////////////
// VARIABLES
////////////////////////////////////////////////////////////////////////////////////////
variable "hcloud_token" {
variable "dencun_hcloud_token" {
type = string
description = "Hetzner Cloud API Token"
sensitive = true
Expand Down
34 changes: 13 additions & 21 deletions terraform/devnet-0/hetzner/nodes.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ variable "lighthouse_geth" {
default = {
name = "lighthouse-geth"
count = 1
validator_start = 0
validator_end = 0
validator_start = 100
validator_end = 200
location = "hel1"
}
}
Expand Down Expand Up @@ -58,10 +58,9 @@ variable "lighthouse_erigon" {
variable "lighthouse_reth" {
default = {
name = "lighthouse-reth"
count = 1
count = 0
validator_start = 0
validator_end = 0
location = "fsn1"
}
}

Expand All @@ -78,10 +77,9 @@ variable "prysm_geth" {
variable "prysm_besu" {
default = {
name = "prysm-besu"
count = 1
count = 0
validator_start = 0
validator_end = 0
location = "nbg1"
}
}

Expand Down Expand Up @@ -125,7 +123,7 @@ variable "prysm_reth" {
variable "lodestar_geth" {
default = {
name = "lodestar-geth"
count = 0
count = 1
validator_start = 0
validator_end = 0
}
Expand All @@ -134,10 +132,9 @@ variable "lodestar_geth" {
variable "lodestar_nethermind" {
default = {
name = "lodestar-nethermind"
count = 1
count = 0
validator_start = 0
validator_end = 0
location = "hel1"
}
}

Expand Down Expand Up @@ -199,10 +196,9 @@ variable "nimbus_besu" {
variable "nimbus_nethermind" {
default = {
name = "nimbus-nethermind"
count = 1
count = 0
validator_start = 0
validator_end = 0
location = "fsn1"
}
}

Expand All @@ -218,17 +214,16 @@ variable "nimbus_ethereumjs" {
variable "nimbus_erigon" {
default = {
name = "nimbus-erigon"
count = 1
count = 0
validator_start = 0
validator_end = 0
location = "nbg1"
}
}

variable "nimbus_reth" {
default = {
name = "nimbus-reth"
count = 1
count = 0
validator_start = 0
validator_end = 0
}
Expand All @@ -238,17 +233,16 @@ variable "nimbus_reth" {
variable "teku_geth" {
default = {
name = "teku-geth"
count = 1
count = 0
validator_start = 0
validator_end = 0
location = "hel1"
}
}

variable "teku_besu" {
default = {
name = "teku-besu"
count = 1
count = 0
validator_start = 0
validator_end = 0
}
Expand All @@ -257,10 +251,9 @@ variable "teku_besu" {
variable "teku_nethermind" {
default = {
name = "teku-nethermind"
count = 1
count = 0
validator_start = 0
validator_end = 0
location = "fsn1"
}
}

Expand All @@ -285,9 +278,8 @@ variable "teku_erigon" {
variable "teku_reth" {
default = {
name = "teku-reth"
count = 1
count = 0
validator_start = 0
validator_end = 0
location = "nbg1"
}
}
2 changes: 1 addition & 1 deletion terraform/devnet-0/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ variable "cloudflare_api_token" {

variable "ethereum_network" {
type = string
default = "devnet-0"
default = "template-devnet-0"
}

variable "base_cidr_block" {
Expand Down
Loading

0 comments on commit ad88f5c

Please sign in to comment.