Skip to content

Commit

Permalink
service: use new --el flag instead of --web3-url
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Sokołowski <jakub@status.im>
  • Loading branch information
jakubgs committed Mar 15, 2023
1 parent 339998b commit 99a445d
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 17 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ beacon_node_repo_branch: 'stable'
beacon_node_network: 'mainnet'
# optional setting for debug mode
beacon_node_log_level: 'DEBUG'
# Infura WebSocket URLs
beacon_node_web3_urls: ['wss://mainnet.infura.io/ws/v3/123qwe123qwe123qwe']
# WebSocket or HTTP URLs for execution layet Engine API
beacon_node_exec_layer_urls:
- 'wss://erigon.internal.example.org:8551'
- 'http://geth.internal.example.org:8552'
```
The order of WebSocket URLs matters. First is the default, the rest are fallbacks.

Expand Down
8 changes: 4 additions & 4 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ beacon_node_consul_service_name: 'beacon-node'
beacon_node_consul_service_file_name: '{{ beacon_node_service_name | replace("-", "_") }}'
beacon_node_consul_metrics_service_name: '{{ beacon_node_consul_service_name }}-metrics'

# WebSocket RPC URLs, Goerli for testnets
beacon_node_web3_urls: ['wss://goerli.infura.io/ws/v3/6224f3c792cc443fafb64e70a98f871e']
#beacon_node_web3_jwt_secret: ~
beacon_node_web3_jwt_secret_path: '{{ beacon_node_service_path }}/jwt.hex'
# WebSocket or HTTP URLs for execution layet Engine API
beacon_node_exec_layer_urls: []
#beacon_node_exec_layer_jwt_secret: ~
beacon_node_exec_layer_jwt_secret_path: '{{ beacon_node_service_path }}/jwt.hex'

# Builder for profit-optimized execution payloads.
beacon_node_payload_builder_enabled: false
Expand Down
8 changes: 4 additions & 4 deletions tasks/checks.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
- name: Verify web3 URLs are provided
- name: Verify Exec layer Engine API URLs are provided
assert:
that: '{{ beacon_node_web3_urls|length > 0 }}'
that: '{{ beacon_node_exec_layer_urls|length > 0 }}'
quiet: true
fail_msg: |
Providing Web3 URLs is required to sync with Eth1 chain!
Verify that the 'beacon_node_web3_urls' variable is set.
Providing Exec layer Engine API URLs is required to sync with Eth1 chain!
Verify that the 'beacon_node_exec_layer_urls' variable is set.
- name: Verify network name
assert:
Expand Down
6 changes: 3 additions & 3 deletions tasks/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
mode: 0600

- name: Create JWT secret file (optional)
when: beacon_node_web3_jwt_secret is defined
when: beacon_node_exec_layer_jwt_secret is defined
copy:
dest: '{{ beacon_node_web3_jwt_secret_path }}'
content: '{{ beacon_node_web3_jwt_secret }}'
dest: '{{ beacon_node_exec_layer_jwt_secret_path }}'
content: '{{ beacon_node_exec_layer_jwt_secret }}'
owner: '{{ beacon_node_user }}'
group: '{{ beacon_node_group }}'
mode: 0400
Expand Down
8 changes: 4 additions & 4 deletions templates/beacon-node.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ ExecStart={{ beacon_node_repo_path }}/build/nimbus_beacon_node \
--validators-dir={{ beacon_node_validators_path }} \
--era-dir={{ beacon_node_era_dir_path }} \
--history={{ beacon_node_history_retention }} \
{% for url in beacon_node_web3_urls | mandatory %}
--web3-url={{ url | mandatory }} \
{% for url in beacon_node_exec_layer_urls | mandatory %}
--el={{ url | mandatory }} \
{% endfor %}
{% if beacon_node_web3_jwt_secret is defined %}
--jwt-secret={{ beacon_node_web3_jwt_secret_path | mandatory }} \
{% if beacon_node_exec_layer_jwt_secret is defined %}
--jwt-secret={{ beacon_node_exec_layer_jwt_secret_path | mandatory }} \
{% endif %}
{% if beacon_node_suggested_fee_recipient is defined %}
--suggested-fee-recipient={{ beacon_node_suggested_fee_recipient | mandatory }} \
Expand Down

0 comments on commit 99a445d

Please sign in to comment.