nimbus.holesky: add public beacon node API endpoints

https://github.com/status-im/infra-nimbus/issues/157

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2023-12-01 11:19:51 +01:00
parent b4dc2f9c44
commit 39e12fdc6f
No known key found for this signature in database
GPG Key ID: FE65CD384D5BF7B4
7 changed files with 46 additions and 2 deletions

View File

@ -13,6 +13,8 @@ These are [Beacon API](https://ethereum.github.io/beacon-APIs/) endpoints intend
| http://unstable.prater.beacon-api.nimbus.team/ | `linux-01.ih-eu-mda1.nimbus.prater` |
| http://testing.prater.beacon-api.nimbus.team/ | `linux-02.he-eu-hel1.nimbus.prater` |
| http://unstable.sepolia.beacon-api.nimbus.team/ | `linux-02.ih-eu-mda1.nimbus.prater` |
| http://testing.holesky.beacon-api.nimbus.team/ | `geth-01.ih-eu-mda1.nimbus.holesky` |
| http://unstable.holesky.beacon-api.nimbus.team/ | `geth-02.ih-eu-mda1.nimbus.holesky` |
These nodes have no validators attached.

View File

@ -73,6 +73,9 @@ nethermind_metrics_port: '{{ exec_layer_metrics_port }}'
beacon_node_service_name: 'beacon-node-{{ beacon_node_network }}-{{ node.branch }}'
beacon_node_network: 'holesky'
beacon_node_repo_branch: '{{ node_name_to_branch_map.get(node.branch, node.branch) }}'
# Tuning
beacon_node_history_retention: '{{ "archive" if node.get("public_api") else node.get("history", "prune") }}'
beacon_node_extra_flags: '{{ node.extra_flags if node.extra_flags is defined else [] }}'
# We map short names to branches to avoid too long service names.
node_name_to_branch_map:
libp2p: 'nim-libp2p-auto-bump-unstable'
@ -90,6 +93,10 @@ beacon_node_exec_layer_urls: ['http://localhost:{{ exec_layer_authrpc_port }}']
beacon_node_exec_layer_jwt_secret: '{{ geth_authrpc_jwtsecret | mandatory }}'
# Suggests it to the Execution Layer client.
beacon_node_suggested_fee_recipient: '{{lookup("bitwarden", "nimbus/wallet/testnets", field="address")}}'
# Light client data
beacon_node_light_client_data_enabled: '{{ (node.public_api is defined and node.public_api) }}'
beacon_node_light_client_data_serve: true
beacon_node_light_client_data_import_mode: 'full'
# Validators from nimbus-private repo¬
beacon_node_dist_validators_enabled: '{{ node.start is defined and node.end is defined }}'
beacon_node_dist_validators_start: '{{ node.get("vc", false) | ternary(0, node.start) | mandatory }}'

View File

@ -18,6 +18,7 @@
roles:
- { role: swap-file, tags: [ swap-file ] }
- { role: open-ports, tags: [ open-ports ] }
- { role: redirect-ports, tags: [ redirect-ports ] }
tasks:
- include_role: name=infra-role-beacon-node-linux
with_items: '{{ nodes_layout[hostname] }}'

View File

@ -0,0 +1,8 @@
---
# Communityu test REST API endpoint.
beacon_node_rest_address: '0.0.0.0'
# WARNING: This will change if number of nodes changes.
redirect_ports:
# beacon-node-holesky-unstable
- { src: 80, dst: 9303, comment: 'Test Beacon API (80->9303/tcp)' }

View File

@ -0,0 +1,8 @@
---
# Communityu test REST API endpoint.
beacon_node_rest_address: '0.0.0.0'
# WARNING: This will change if number of nodes changes.
redirect_ports:
# beacon-node-holesky-testing
- { src: 80, dst: 9302, comment: 'Test Beacon API (80->9302/tcp)' }

View File

@ -5,12 +5,12 @@ nodes_layout:
'geth-01.ih-eu-mda1.nimbus.holesky': # 0 each
- { branch: 'stable', el: 'geth', vc: true }
- { branch: 'testing', el: 'geth', vc: false }
- { branch: 'unstable', el: 'geth', vc: false }
- { branch: 'unstable', el: 'geth', vc: false, public_api: true }
- { branch: 'libp2p', el: 'geth', vc: false }
'geth-02.ih-eu-mda1.nimbus.holesky': # 1 each
- { branch: 'stable', start: 0, end: 1, el: 'geth', vc: true }
- { branch: 'testing', start: 1, end: 2, el: 'geth', vc: false }
- { branch: 'testing', start: 1, end: 2, el: 'geth', vc: false, public_api: true }
- { branch: 'unstable', start: 2, end: 3, el: 'geth', vc: false }
- { branch: 'libp2p', start: 3, end: 4, el: 'geth', vc: false }

View File

@ -72,3 +72,21 @@ module "nimbus_nodes_holesky_innova_neth" {
"185.181.229.103", # neth-10.ih-eu-mda1.nimbus.holesky
]
}
/* Community test REST API endpoints. */
resource "cloudflare_record" "unstable_holesky_beacon_api" {
zone_id = local.zones["nimbus.team"]
name = "unstable.holesky.beacon-api"
value = module.nimbus_nodes_holesky_innova_geth.public_ips[0]
type = "A"
proxied = false
}
resource "cloudflare_record" "testing_holesky_beacon_api" {
zone_id = local.zones["nimbus.team"]
name = "testing.holesky.beacon-api"
value = module.nimbus_nodes_holesky_innova_geth.public_ips[1]
type = "A"
proxied = false
}