diff --git a/ansible/group_vars/nimbus.mainnet.yml b/ansible/group_vars/nimbus.mainnet.yml index 9981685..7342299 100644 --- a/ansible/group_vars/nimbus.mainnet.yml +++ b/ansible/group_vars/nimbus.mainnet.yml @@ -23,6 +23,13 @@ beacon_node_threads: '{{ (node.branch == "testing") | ternary(4, 1) }}' beacon_node_dist_validators_enabled: false # Bootnodes should subscribe to all subnets 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 nodes_layout: diff --git a/ansible/group_vars/nimbus.prater.yml b/ansible/group_vars/nimbus.prater.yml index c7dc900..692e6ac 100644 --- a/ansible/group_vars/nimbus.prater.yml +++ b/ansible/group_vars/nimbus.prater.yml @@ -25,6 +25,13 @@ beacon_node_dist_validators_start: '{{ node.start | mandatory }}' beacon_node_dist_validators_end: '{{ node.end | mandatory }}' # Windows service user 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 nodes_layout: diff --git a/ansible/group_vars/nimbus.pyrmont.yml b/ansible/group_vars/nimbus.pyrmont.yml index 0e97f73..345e977 100644 --- a/ansible/group_vars/nimbus.pyrmont.yml +++ b/ansible/group_vars/nimbus.pyrmont.yml @@ -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_start: '{{ node.start | 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. nodes_layout: diff --git a/ansible/requirements.yml b/ansible/requirements.yml index 0ec7d21..f3e3739 100644 --- a/ansible/requirements.yml +++ b/ansible/requirements.yml @@ -46,17 +46,17 @@ - name: infra-role-beacon-node-linux src: git@github.com:status-im/infra-role-beacon-node-linux.git - version: 2050efc83aec03947910d6c8987151889f31bbec + version: 79ece2904e9293290afe6753e0ebf57799d2e073 scm: git - name: infra-role-beacon-node-windows src: git@github.com:status-im/infra-role-beacon-node-windows.git - version: f7b873b15ee540ced872fa9587d7a8ae7b49283f + version: dfa53d2bde956a05f4ccdd196ee0ae2312a133b6 scm: git - name: infra-role-beacon-node-macos src: git@github.com:status-im/infra-role-beacon-node-macos.git - version: 34dff283aeb6d327a88ce524626c64b87094a7d6 + version: 520721920500413e7b4e665abed3e358f6d45414 scm: git - name: infra-role-nimbus-eth1 diff --git a/ansible/roles/get-geth-api-urls/defaults/main.yml b/ansible/roles/get-geth-api-urls/defaults/main.yml index 72c3d22..09211e5 100644 --- a/ansible/roles/get-geth-api-urls/defaults/main.yml +++ b/ansible/roles/get-geth-api-urls/defaults/main.yml @@ -6,7 +6,7 @@ eth2_to_eth1_map: eth2_network_name: '{{ beacon_node_network | 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. infura_api_tokens: - '9e2f2cc13f70432f8b87dbe7d51b81db' diff --git a/ansible/roles/get-geth-api-urls/tasks/consul/posix.yml b/ansible/roles/get-geth-api-urls/tasks/consul/posix.yml index 9f5bf53..71c12c9 100644 --- a/ansible/roles/get-geth-api-urls/tasks/consul/posix.yml +++ b/ansible/roles/get-geth-api-urls/tasks/consul/posix.yml @@ -4,8 +4,14 @@ url: '{{ consul_catalog_url }}/datacenters' register: data_centers -- name: Find available geth websocket services +- name: Find available Geth API RPC services 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 }}' register: geth_ws_services diff --git a/ansible/roles/get-geth-api-urls/tasks/consul/windows.yml b/ansible/roles/get-geth-api-urls/tasks/consul/windows.yml index 94f5ee3..a825d03 100644 --- a/ansible/roles/get-geth-api-urls/tasks/consul/windows.yml +++ b/ansible/roles/get-geth-api-urls/tasks/consul/windows.yml @@ -6,9 +6,17 @@ return_content: true register: data_centers -- name: Find available geth websocket services +- name: Find available Geth API RPC services 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' return_content: true with_items: '{{ data_centers.json }}' diff --git a/ansible/roles/get-geth-api-urls/tasks/main.yml b/ansible/roles/get-geth-api-urls/tasks/main.yml index 8994e01..a8c9a05 100644 --- a/ansible/roles/get-geth-api-urls/tasks/main.yml +++ b/ansible/roles/get-geth-api-urls/tasks/main.yml @@ -9,7 +9,8 @@ - name: Extract Geth websocket IP and port set_fact: geth_api_addresses: | - {{ geth_ws_services.results + {{ (geth_rpc_services.results + + geth_ws_services.results) | selectattr("json", "defined") | sum(attribute="json", start=[]) | map(attribute='ServiceMeta.url') @@ -18,4 +19,4 @@ - name: Extract Goerli Geth WebSocket URL set_fact: # 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 ] }}"