get-geth-api-urls: drop Infura URLs entirely

Mainnet merge has happened, so no need for the exception.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2022-09-15 14:30:30 +02:00
parent 0dd5174870
commit 513fb2bb88
No known key found for this signature in database
GPG Key ID: 09AA5403E54D9931
5 changed files with 6 additions and 32 deletions

View File

@ -6,13 +6,7 @@ This role assembles the list of Web3 Eth1 URLs used by Nimbus Beacon nodes to sy
There are only two important configuration keys:
```yaml
geth_node_api_consul_name: 'my-geth-node-rpc'
infura_api_tokens:
- 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
- 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'
- 'cccccccccccccccccccccccccccccccc'
geth_node_api_fleet_name: 'nimbus.geth'
geth_node_api_consul_names: ['my-geth-node-rpc']
```
And the more we have the less likely that we hit the Infura threshold.
Infura endpoints are only used for Mainnet.
The Geth node Consul service is expected to have an `url` in metadata.

View File

@ -10,16 +10,4 @@ geth_node_api_fleet_name: 'nimbus.geth'
geth_node_api_consul_names:
- 'geth-{{ eth1_network_name | mandatory }}'
geth_api_addresses: []
# The more the merrier, since we don't want to hit Infura throttling.
infura_api_tokens:
- '9e2f2cc13f70432f8b87dbe7d51b81db'
- '922cc3c4badf4789b68d895267530a4a'
- '01cde3e0c47a47ff8dcdc52259b3a71c'
- '675db4626923473591cf6418e4dae175'
- '5cae339ba3144f438e8da1db2c25cad4'
selected_infura_token: '{{ infura_api_tokens[play_hosts.index(inventory_hostname) % (infura_api_tokens|length)] }}'
selected_infura_url: 'wss://{{ eth1_network_name }}.infura.io/ws/v3/{{ selected_infura_token }}'
consul_catalog_url: 'http://localhost:8500/v1/catalog'

View File

@ -13,8 +13,8 @@
# On Windows json attribute is missing when it's [].
- name: Extract Geth websocket IP and port
set_fact:
geth_api_addresses: |
{{ (geth_api_addresses + geth_rpc_services.results)
beacon_node_web3_urls_all: |
{{ geth_rpc_services.results
| sum(attribute="json", start=[])
| map(attribute="ServiceMeta.url")
| list }}

View File

@ -17,8 +17,8 @@
# On Windows json attribute is missing when it's [].
- name: Extract Geth websocket IP and port
set_fact:
geth_api_addresses: |
{{ (geth_api_addresses + geth_rpc_services.results)
beacon_node_web3_urls_all: |
{{ geth_rpc_services.results
| selectattr("json", "defined")
| sum(attribute="json", start=[])
| map(attribute="ServiceMeta.url")

View File

@ -10,11 +10,3 @@
loop: '{{ geth_node_api_consul_names }}'
loop_control:
loop_var: 'service_name'
- name: Extract Goerli Geth WebSocket URL
set_fact:
# Our nodes first (will be used by default) then an Infura node.
# Currently only Mainnet has not had it's merge, so it can use Infura.
beacon_node_web3_urls_all: |
{{ geth_api_addresses +
(eth1_network_name == "mainnet") | ternary([selected_infura_url], []) }}