get-geth-api-urls: use HTTP RPC API for unstable only
Current support for HTTP RPC API is not stable enough. Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
0c1169cee3
commit
5dae92080a
|
@ -23,6 +23,13 @@ beacon_node_threads: '{{ (node.branch == "testing") | ternary(4, 1) }}'
|
||||||
beacon_node_dist_validators_enabled: false
|
beacon_node_dist_validators_enabled: false
|
||||||
# Bootnodes should subscribe to all subnets
|
# Bootnodes should subscribe to all subnets
|
||||||
beacon_node_subscribe_all: true
|
beacon_node_subscribe_all: true
|
||||||
|
# HTTP RPC support is unstable
|
||||||
|
beacon_node_web3_urls: |
|
||||||
|
{{ beacon_node_web3_urls_all
|
||||||
|
| reject("match",
|
||||||
|
((node.branch == "unstable")
|
||||||
|
| ternary("^ws://", "^http://"))
|
||||||
|
) }}
|
||||||
|
|
||||||
# Split by hostname for more central location
|
# Split by hostname for more central location
|
||||||
nodes_layout:
|
nodes_layout:
|
||||||
|
|
|
@ -25,6 +25,13 @@ beacon_node_dist_validators_start: '{{ node.start | mandatory }}'
|
||||||
beacon_node_dist_validators_end: '{{ node.end | mandatory }}'
|
beacon_node_dist_validators_end: '{{ node.end | mandatory }}'
|
||||||
# Windows service user
|
# Windows service user
|
||||||
beacon_node_service_user_pass: '{{lookup("bitwarden", "nimbus/windows", field="password")}}'
|
beacon_node_service_user_pass: '{{lookup("bitwarden", "nimbus/windows", field="password")}}'
|
||||||
|
# HTTP RPC support is unstable
|
||||||
|
beacon_node_web3_urls: |
|
||||||
|
{{ beacon_node_web3_urls_all
|
||||||
|
| reject("match",
|
||||||
|
((node.branch == "unstable")
|
||||||
|
| ternary("^ws://", "^http://"))
|
||||||
|
) }}
|
||||||
|
|
||||||
# Split by hostname for more central location
|
# Split by hostname for more central location
|
||||||
nodes_layout:
|
nodes_layout:
|
||||||
|
|
|
@ -19,6 +19,13 @@ beacon_node_build_frequency: '{{ node.build_frequency }}'
|
||||||
beacon_node_dist_validators_enabled: '{{ node.start is defined and node.end is defined }}'
|
beacon_node_dist_validators_enabled: '{{ node.start is defined and node.end is defined }}'
|
||||||
beacon_node_dist_validators_start: '{{ node.start | mandatory }}'
|
beacon_node_dist_validators_start: '{{ node.start | mandatory }}'
|
||||||
beacon_node_dist_validators_end: '{{ node.end | mandatory }}'
|
beacon_node_dist_validators_end: '{{ node.end | mandatory }}'
|
||||||
|
# HTTP RPC support is unstable
|
||||||
|
beacon_node_web3_urls: |
|
||||||
|
{{ beacon_node_web3_urls_all
|
||||||
|
| reject("match",
|
||||||
|
((node.branch == "unstable")
|
||||||
|
| ternary("^ws://", "^http://"))
|
||||||
|
) }}
|
||||||
|
|
||||||
# Split by hostname and branch for more central location.
|
# Split by hostname and branch for more central location.
|
||||||
nodes_layout:
|
nodes_layout:
|
||||||
|
|
|
@ -46,17 +46,17 @@
|
||||||
|
|
||||||
- name: infra-role-beacon-node-linux
|
- name: infra-role-beacon-node-linux
|
||||||
src: git@github.com:status-im/infra-role-beacon-node-linux.git
|
src: git@github.com:status-im/infra-role-beacon-node-linux.git
|
||||||
version: 2050efc83aec03947910d6c8987151889f31bbec
|
version: 79ece2904e9293290afe6753e0ebf57799d2e073
|
||||||
scm: git
|
scm: git
|
||||||
|
|
||||||
- name: infra-role-beacon-node-windows
|
- name: infra-role-beacon-node-windows
|
||||||
src: git@github.com:status-im/infra-role-beacon-node-windows.git
|
src: git@github.com:status-im/infra-role-beacon-node-windows.git
|
||||||
version: f7b873b15ee540ced872fa9587d7a8ae7b49283f
|
version: dfa53d2bde956a05f4ccdd196ee0ae2312a133b6
|
||||||
scm: git
|
scm: git
|
||||||
|
|
||||||
- name: infra-role-beacon-node-macos
|
- name: infra-role-beacon-node-macos
|
||||||
src: git@github.com:status-im/infra-role-beacon-node-macos.git
|
src: git@github.com:status-im/infra-role-beacon-node-macos.git
|
||||||
version: 34dff283aeb6d327a88ce524626c64b87094a7d6
|
version: 520721920500413e7b4e665abed3e358f6d45414
|
||||||
scm: git
|
scm: git
|
||||||
|
|
||||||
- name: infra-role-nimbus-eth1
|
- name: infra-role-nimbus-eth1
|
||||||
|
|
|
@ -6,7 +6,7 @@ eth2_to_eth1_map:
|
||||||
|
|
||||||
eth2_network_name: '{{ beacon_node_network | mandatory }}'
|
eth2_network_name: '{{ beacon_node_network | mandatory }}'
|
||||||
eth1_network_name: '{{ eth2_to_eth1_map[eth2_network_name] | mandatory }}'
|
eth1_network_name: '{{ eth2_to_eth1_map[eth2_network_name] | mandatory }}'
|
||||||
geth_node_api_consul_name: 'nimbus-{{ eth1_network_name | mandatory }}-node-rpc'
|
geth_node_api_consul_name: 'nimbus-{{ eth1_network_name | mandatory }}-node'
|
||||||
# The more the merrier, since we don't want to hit Infura throttling.
|
# The more the merrier, since we don't want to hit Infura throttling.
|
||||||
infura_api_tokens:
|
infura_api_tokens:
|
||||||
- '9e2f2cc13f70432f8b87dbe7d51b81db'
|
- '9e2f2cc13f70432f8b87dbe7d51b81db'
|
||||||
|
|
|
@ -4,8 +4,14 @@
|
||||||
url: '{{ consul_catalog_url }}/datacenters'
|
url: '{{ consul_catalog_url }}/datacenters'
|
||||||
register: data_centers
|
register: data_centers
|
||||||
|
|
||||||
- name: Find available geth websocket services
|
- name: Find available Geth API RPC services
|
||||||
uri:
|
uri:
|
||||||
url: '{{ consul_catalog_url }}/service/{{ geth_node_api_consul_name }}?dc={{ item }}'
|
url: '{{ consul_catalog_url }}/service/{{ geth_node_api_consul_name }}-rpc?dc={{ item }}'
|
||||||
|
with_items: '{{ data_centers.json }}'
|
||||||
|
register: geth_rpc_services
|
||||||
|
|
||||||
|
- name: Find available Geth API WebSocket services
|
||||||
|
uri:
|
||||||
|
url: '{{ consul_catalog_url }}/service/{{ geth_node_api_consul_name }}-ws?dc={{ item }}'
|
||||||
with_items: '{{ data_centers.json }}'
|
with_items: '{{ data_centers.json }}'
|
||||||
register: geth_ws_services
|
register: geth_ws_services
|
||||||
|
|
|
@ -6,9 +6,17 @@
|
||||||
return_content: true
|
return_content: true
|
||||||
register: data_centers
|
register: data_centers
|
||||||
|
|
||||||
- name: Find available geth websocket services
|
- name: Find available Geth API RPC services
|
||||||
win_uri:
|
win_uri:
|
||||||
url: '{{ consul_catalog_url }}/service/{{ geth_node_api_consul_name }}?dc={{ item }}'
|
url: '{{ consul_catalog_url }}/service/{{ geth_node_api_consul_name }}-rpc?dc={{ item }}'
|
||||||
|
content_type: 'application/json'
|
||||||
|
return_content: true
|
||||||
|
with_items: '{{ data_centers.json }}'
|
||||||
|
register: geth_rpc_services
|
||||||
|
|
||||||
|
- name: Find available Geth WebSocket services
|
||||||
|
win_uri:
|
||||||
|
url: '{{ consul_catalog_url }}/service/{{ geth_node_api_consul_name }}-ws?dc={{ item }}'
|
||||||
content_type: 'application/json'
|
content_type: 'application/json'
|
||||||
return_content: true
|
return_content: true
|
||||||
with_items: '{{ data_centers.json }}'
|
with_items: '{{ data_centers.json }}'
|
||||||
|
|
|
@ -9,7 +9,8 @@
|
||||||
- name: Extract Geth websocket IP and port
|
- name: Extract Geth websocket IP and port
|
||||||
set_fact:
|
set_fact:
|
||||||
geth_api_addresses: |
|
geth_api_addresses: |
|
||||||
{{ geth_ws_services.results
|
{{ (geth_rpc_services.results
|
||||||
|
+ geth_ws_services.results)
|
||||||
| selectattr("json", "defined")
|
| selectattr("json", "defined")
|
||||||
| sum(attribute="json", start=[])
|
| sum(attribute="json", start=[])
|
||||||
| map(attribute='ServiceMeta.url')
|
| map(attribute='ServiceMeta.url')
|
||||||
|
@ -18,4 +19,4 @@
|
||||||
- name: Extract Goerli Geth WebSocket URL
|
- name: Extract Goerli Geth WebSocket URL
|
||||||
set_fact:
|
set_fact:
|
||||||
# our nodes first (will be used by default) then an infura node
|
# our nodes first (will be used by default) then an infura node
|
||||||
beacon_node_web3_urls: "{{ geth_api_addresses + [ selected_infura_url ] }}"
|
beacon_node_web3_urls_all: "{{ geth_api_addresses + [ selected_infura_url ] }}"
|
||||||
|
|
Loading…
Reference in New Issue