Skip to content

Commit 88f5d83

Browse files
committed
make v6 conditional
1 parent c7cc68f commit 88f5d83

File tree

11 files changed

+194
-49
lines changed

11 files changed

+194
-49
lines changed

roles/besu/defaults/main.yaml

+16-3
Original file line numberDiff line numberDiff line change
@@ -11,28 +11,34 @@ besu_ports_http_rpc: 8545
1111
besu_ports_engine: 8551
1212
besu_ports_metrics: 9545
1313

14+
besu_ipv6_enabled: false
15+
1416
besu_container_name: besu
1517
besu_container_image: hyperledger/besu:latest
1618
besu_container_env: {}
17-
besu_container_ports:
19+
besu_container_ports_ipv4:
1820
- "127.0.0.1:{{ besu_ports_http_rpc }}:{{ besu_ports_http_rpc }}"
1921
- "127.0.0.1:{{ besu_ports_engine }}:{{ besu_ports_engine }}"
2022
- "0.0.0.0:{{ besu_ports_p2p }}:{{ besu_ports_p2p }}"
2123
- "0.0.0.0:{{ besu_ports_p2p }}:{{ besu_ports_p2p }}/udp"
24+
25+
besu_container_ports_ipv6:
2226
- "[::]:{{ besu_ports_p2p }}:{{ besu_ports_p2p }}"
2327
- "[::]:{{ besu_ports_p2p }}:{{ besu_ports_p2p }}/udp"
2428

29+
besu_container_ports: >-
30+
{{ besu_container_ports_ipv4 + besu_container_ports_ipv6 if besu_ipv6_enabled else [] }}
31+
2532
besu_container_volumes:
2633
- "{{ besu_datadir }}:/data"
2734
- "{{ besu_auth_jwt_path }}:/execution-auth.jwt:ro"
2835
besu_container_security_opts: []
2936
besu_container_stop_timeout: "300"
3037
besu_container_networks: []
31-
besu_container_command:
38+
besu_container_command_default:
3239
- --data-path=/data
3340
- --nat-method=NONE
3441
- --p2p-host={{ besu_announced_ip }}
35-
- --p2p-host={{ besu_announced_ipv6 }}
3642
- --p2p-port={{ besu_ports_p2p }}
3743
- --rpc-http-enabled
3844
- --rpc-http-host=0.0.0.0
@@ -45,6 +51,13 @@ besu_container_command:
4551
- --metrics-enabled
4652
- --metrics-host=0.0.0.0
4753
- --metrics-port={{ besu_ports_metrics }}
54+
55+
besu_container_command_v6:
56+
- --p2p-host-ipv6={{ besu_announced_ipv6 }}
57+
58+
besu_container_command: >-
59+
{{ besu_container_command_default + besu_container_command_v6 if besu_ipv6_enabled else [] }}
60+
4861
besu_container_command_extra_args: []
4962

5063
# Default image pull policy

roles/erigon/defaults/main.yaml

+16-6
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,24 @@ erigon_ports_http_rpc: 8545
1111
erigon_ports_engine: 8551
1212
erigon_ports_metrics: 6060
1313

14-
##
15-
## Main container
16-
##
14+
erigon_ipv6_enabled: false
15+
1716
erigon_container_name: erigon
1817
erigon_container_image: thorax/erigon:stable
1918
erigon_container_env: {}
20-
erigon_container_ports:
19+
erigon_container_ports_ipv4:
2120
- "127.0.0.1:{{ erigon_ports_engine }}:{{ erigon_ports_engine }}"
2221
- "127.0.0.1:{{ erigon_ports_http_rpc }}:{{ erigon_ports_http_rpc }}"
2322
- "0.0.0.0:{{ erigon_ports_p2p }}:{{ erigon_ports_p2p }}"
2423
- "0.0.0.0:{{ erigon_ports_p2p }}:{{ erigon_ports_p2p }}/udp"
24+
25+
erigon_container_ports_ipv6:
2526
- "[::]:{{ erigon_ports_p2p }}:{{ erigon_ports_p2p }}"
2627
- "[::]:{{ erigon_ports_p2p }}:{{ erigon_ports_p2p }}/udp"
2728

29+
erigon_container_ports: >-
30+
{{ erigon_container_ports_ipv4 + erigon_container_ports_ipv6 if erigon_ipv6_enabled else [] }}
31+
2832
erigon_container_volumes:
2933
- "{{ erigon_datadir }}:/data"
3034
- "{{ erigon_auth_jwt_path }}:/execution-auth.jwt:ro"
@@ -33,10 +37,9 @@ erigon_container_stop_timeout: "300"
3337
erigon_container_networks: []
3438
erigon_container_entrypoint:
3539
- erigon
36-
erigon_container_command:
40+
erigon_container_command_default:
3741
- --datadir=/data
3842
- --nat=extip:{{ erigon_announced_ip }}
39-
- --nat=extip:{{ erigon_announced_ipv6 }}
4043
- --port={{ erigon_ports_p2p }}
4144
- --http
4245
- --http.addr=0.0.0.0
@@ -48,6 +51,13 @@ erigon_container_command:
4851
- --metrics
4952
- --metrics.addr=0.0.0.0
5053
- --metrics.port={{ erigon_ports_metrics }}
54+
55+
erigon_container_command_v6:
56+
- --nat=extip:{{ erigon_announced_ipv6 }}
57+
58+
erigon_container_command: >-
59+
{{ erigon_container_command_default + erigon_container_command_v6 if erigon_ipv6_enabled else [] }}
60+
5161
erigon_container_command_extra_args: []
5262
# - --prune=htc
5363

roles/ethereumjs/defaults/main.yaml

+15-2
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,31 @@ ethereumjs_ports_p2p: 30303
1010
ethereumjs_ports_http_rpc: 8545
1111
ethereumjs_ports_engine: 8551
1212

13+
ethereumjs_ipv6_enabled: false
14+
1315
ethereumjs_container_name: ethereumjs
1416
ethereumjs_container_image: g11tech/ethereumjs:latest
1517
ethereumjs_container_env: {}
16-
ethereumjs_container_ports:
18+
ethereumjs_container_ports_ipv4:
1719
- "127.0.0.1:{{ ethereumjs_ports_http_rpc }}:{{ ethereumjs_ports_http_rpc }}"
1820
- "127.0.0.1:{{ ethereumjs_ports_engine }}:{{ ethereumjs_ports_engine }}"
1921
- "0.0.0.0:{{ ethereumjs_ports_p2p }}:{{ ethereumjs_ports_p2p }}"
2022
- "0.0.0.0:{{ ethereumjs_ports_p2p }}:{{ ethereumjs_ports_p2p }}/udp"
23+
24+
ethereumjs_container_ports_ipv6:
2125
- "[::]:{{ ethereumjs_ports_p2p }}:{{ ethereumjs_ports_p2p }}"
2226
- "[::]:{{ ethereumjs_ports_p2p }}:{{ ethereumjs_ports_p2p }}/udp"
2327

28+
ethereumjs_container_ports: >-
29+
{{ ethereumjs_container_ports_ipv4 + ethereumjs_container_ports_ipv6 if ethereumjs_ipv6_enabled else [] }}
30+
2431
ethereumjs_container_volumes:
2532
- "{{ ethereumjs_datadir }}:/data"
2633
- "{{ ethereumjs_auth_jwt_path }}:/execution-auth.jwt:ro"
2734
ethereumjs_container_security_opts: []
2835
ethereumjs_container_stop_timeout: "300"
2936
ethereumjs_container_networks: []
30-
ethereumjs_container_command:
37+
ethereumjs_container_command_default:
3138
- --dataDir=/data
3239
- --port={{ ethereumjs_ports_p2p }}
3340
- --rpc
@@ -39,7 +46,13 @@ ethereumjs_container_command:
3946
- --rpcEnginePort={{ ethereumjs_ports_engine }}
4047
- --jwt-secret=/execution-auth.jwt
4148
- --extIP={{ ethereumjs_announced_ip }}
49+
50+
ethereumjs_container_command_v6: []
4251
# - --extIP={{ ethereumjs_announced_ipv6 }} # not supported
52+
53+
ethereumjs_container_command: >-
54+
{{ ethereumjs_container_command_default + ethereumjs_container_command_v6 if ethereumjs_ipv6_enabled else [] }}
55+
4356
ethereumjs_container_command_extra_args: []
4457

4558
# Default image pull policy

roles/geth/defaults/main.yaml

+17-3
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,31 @@ geth_ports_http_rpc: 8545
1111
geth_ports_engine: 8551
1212
geth_ports_metrics: 6060
1313

14+
geth_ipv6_enabled: false
15+
1416
geth_container_name: geth
1517
geth_container_image: ethereum/client-go:stable
1618
geth_container_env: {}
17-
geth_container_ports:
19+
geth_container_ports_ipv4:
1820
- "127.0.0.1:{{ geth_ports_http_rpc }}:{{ geth_ports_http_rpc }}"
1921
- "127.0.0.1:{{ geth_ports_engine }}:{{ geth_ports_engine }}"
2022
- "0.0.0.0:{{ geth_ports_p2p }}:{{ geth_ports_p2p }}"
2123
- "0.0.0.0:{{ geth_ports_p2p }}:{{ geth_ports_p2p }}/udp"
24+
25+
geth_container_ports_ipv6:
2226
- "[::]:{{ geth_ports_p2p }}:{{ geth_ports_p2p }}"
2327
- "[::]:{{ geth_ports_p2p }}:{{ geth_ports_p2p }}/udp"
28+
29+
geth_container_ports: >-
30+
{{ geth_container_ports_ipv4 + geth_container_ports_ipv6 if geth_ipv6_enabled else [] }}
31+
2432
geth_container_volumes:
2533
- "{{ geth_datadir }}:/data"
2634
- "{{ geth_auth_jwt_path }}:/execution-auth.jwt:ro"
2735
geth_container_security_opts: []
2836
geth_container_stop_timeout: "300"
2937
geth_container_networks: []
30-
geth_container_command:
38+
geth_container_command_default:
3139
- --datadir=/data
3240
- --port={{ geth_ports_p2p }}
3341
- --http
@@ -38,11 +46,17 @@ geth_container_command:
3846
- --authrpc.vhosts=*
3947
- --authrpc.jwtsecret=/execution-auth.jwt
4048
- --nat=extip:{{ geth_announced_ip }}
41-
- --nat=extip:{{ geth_announced_ipv6 }}
4249
- --metrics
4350
- --metrics.port={{ geth_ports_metrics }}
4451
- --metrics.addr=0.0.0.0
4552
- --discovery.v5
53+
54+
geth_container_command_v6:
55+
- --nat=extip:{{ geth_announced_ipv6 }}
56+
57+
geth_container_command: >-
58+
{{ geth_container_command_default + geth_container_command_v6 if geth_ipv6_enabled else [] }}
59+
4660
geth_container_command_extra_args: []
4761
# - --http.api=eth,net,web3
4862
# - --http.vhosts=*

roles/lighthouse/defaults/main.yaml

+23-11
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ lighthouse_ports_p2p_udp: 9000
1515
lighthouse_ports_http_beacon: 5052
1616
lighthouse_ports_metrics: 5054
1717
lighthouse_ports_quic: 9001
18-
lighthouse_ports_quick_ipv6: 9001
1918

19+
lighthouse_ipv6_enabled: false
2020

2121
lighthouse_validator_enabled: false
2222
lighthouse_validator_fee_recipient: "0xF29Ff96aaEa6C9A1fBa851f74737f3c069d4f1a9" # theprotocolguild.eth
@@ -30,38 +30,40 @@ lighthouse_validator_datadir: /data/lighthouse-validator
3030
lighthouse_container_name: lighthouse
3131
lighthouse_container_image: sigp/lighthouse:latest
3232
lighthouse_container_env: {}
33-
lighthouse_container_ports:
33+
lighthouse_container_ports_ipv4:
3434
- "127.0.0.1:{{ lighthouse_ports_http_beacon }}:{{ lighthouse_ports_http_beacon }}"
3535
- "0.0.0.0:{{ lighthouse_ports_p2p_tcp }}:{{ lighthouse_ports_p2p_tcp }}"
3636
- "0.0.0.0:{{ lighthouse_ports_p2p_udp }}:{{ lighthouse_ports_p2p_udp }}/udp"
37+
- "0.0.0.0:{{ lighthouse_ports_quic }}:{{ lighthouse_ports_quic }}"
38+
- "0.0.0.0:{{ lighthouse_ports_quic }}:{{ lighthouse_ports_quic }}/udp"
39+
40+
lighthouse_container_ports_ipv6:
3741
- "[::]:{{ lighthouse_ports_p2p_tcp }}:{{ lighthouse_ports_p2p_tcp }}"
3842
- "[::]:{{ lighthouse_ports_p2p_udp }}:{{ lighthouse_ports_p2p_udp }}/udp"
39-
- "{{ lighthouse_ports_quic }}:{{ lighthouse_ports_quic }}"
40-
- "{{ lighthouse_ports_quic }}:{{ lighthouse_ports_quic }}/udp"
43+
- "[::]:{{ lighthouse_ports_quic }}:{{ lighthouse_ports_quic }}"
44+
- "[::]:{{ lighthouse_ports_quic }}:{{ lighthouse_ports_quic }}/udp"
45+
46+
lighthouse_container_ports: >-
47+
{{ lighthouse_container_ports_ipv4 + lighthouse_container_ports_ipv6 if lighthouse_ipv6_enabled else [] }}
4148
4249
lighthouse_container_volumes:
4350
- "{{ lighthouse_datadir }}:/data"
4451
- "{{ lighthouse_auth_jwt_path }}:/execution-auth.jwt:ro"
4552
lighthouse_container_security_opts: []
4653
lighthouse_container_stop_timeout: "300"
4754
lighthouse_container_networks: []
48-
lighthouse_container_command:
55+
lighthouse_container_command_default:
4956
- lighthouse
5057
- beacon_node
5158
- --datadir=/data
5259
- --disable-upnp
5360
- --disable-enr-auto-update
5461
- --enr-address={{ lighthouse_announced_ip }}
55-
- --enr-address={{ lighthouse_announced_ipv6 }}
56-
- --enr-tcp6-port={{ lighthouse_ports_p2p_tcp }}
5762
- --enr-tcp-port={{ lighthouse_ports_p2p_tcp }}
5863
- --enr-udp-port={{ lighthouse_ports_p2p_udp }}
59-
- --enr-udp6-port={{ lighthouse_ports_p2p_udp }}
6064
- --listen-address=0.0.0.0
6165
- --port={{ lighthouse_ports_p2p_tcp }}
62-
- --port6={{ lighthouse_ports_p2p_tcp }}
6366
- --discovery-port={{ lighthouse_ports_p2p_udp }}
64-
- --discovery-port6={{ lighthouse_ports_p2p_udp }}
6567
- --http
6668
- --http-address=0.0.0.0
6769
- --http-port={{ lighthouse_ports_http_beacon }}
@@ -72,10 +74,20 @@ lighthouse_container_command:
7274
- --metrics-allow-origin=*
7375
- --metrics-port={{ lighthouse_ports_metrics }}
7476
- --quic-port={{ lighthouse_ports_quic }}
75-
- --quic-port6={{ lighthouse_ports_quick_ipv6 }}
7677
- --enr-quic-port={{ lighthouse_ports_quic }}
78+
79+
lighthouse_container_command_v6:
80+
- --enr-address={{ lighthouse_announced_ipv6 }}
81+
- --enr-tcp6-port={{ lighthouse_ports_p2p_tcp }}
82+
- --enr-udp6-port={{ lighthouse_ports_p2p_udp }}
83+
- --port6={{ lighthouse_ports_p2p_tcp }}
84+
- --discovery-port6={{ lighthouse_ports_p2p_udp }}
85+
- --quic-port6={{ lighthouse_ports_quic }}
7786
- --enr-quic6-port={{ lighthouse_ports_quic }}
7887

88+
lighthouse_container_command: >-
89+
{{ lighthouse_container_command_default + lighthouse_container_command_v6 if lighthouse_ipv6_enabled else [] }}
90+
7991
lighthouse_container_command_extra_args: []
8092

8193
checkpoint_sync_url: https://beaconstate.ethstaker.cc

roles/lodestar/defaults/main.yaml

+23-9
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,14 @@ lodestar_announced_ipv6: "{{ ansible_default_ipv6.address }}"
1111
lodestar_cleanup: false # when set to "true" it will remove the container(s)
1212

1313
lodestar_ports_p2p_tcp: 9000
14-
lodestar_ports_p2p_tcp_ipv6: 9002
1514
lodestar_ports_p2p_udp: 9000
16-
lodestar_ports_p2p_udp_ipv6: 9002
15+
lodestar_ports_p2p_udp_ipv6: 9002 # temporary until we have a fix for https://github.com/ChainSafe/lodestar/issues/6531#issuecomment-1995707028
16+
lodestar_ports_p2p_tcp_ipv6: 9002
1717
lodestar_ports_http_beacon: 9596
1818
lodestar_ports_metrics: 8008
1919

20+
lodestar_ipv6_enabled: false
21+
2022
lodestar_validator_enabled: false
2123
lodestar_validator_fee_recipient: "0xF29Ff96aaEa6C9A1fBa851f74737f3c069d4f1a9" # theprotocolguild.eth
2224
lodestar_validator_datadir: /data/lodestar-validator
@@ -29,32 +31,33 @@ lodestar_validator_datadir: /data/lodestar-validator
2931
lodestar_container_name: lodestar
3032
lodestar_container_image: chainsafe/lodestar:latest
3133
lodestar_container_env: {}
32-
lodestar_container_ports:
34+
lodestar_container_ports_ipv4:
3335
- "127.0.0.1:{{ lodestar_ports_http_beacon }}:{{ lodestar_ports_http_beacon }}"
3436
- "0.0.0.0:{{ lodestar_ports_p2p_tcp }}:{{ lodestar_ports_p2p_tcp }}"
3537
- "0.0.0.0:{{ lodestar_ports_p2p_udp }}:{{ lodestar_ports_p2p_udp }}/udp"
38+
39+
lodestar_container_ports_ipv6:
3640
- "[::]:{{ lodestar_ports_p2p_tcp_ipv6 }}:{{ lodestar_ports_p2p_tcp_ipv6 }}"
3741
- "[::]:{{ lodestar_ports_p2p_udp_ipv6 }}:{{ lodestar_ports_p2p_udp_ipv6 }}/udp"
42+
43+
lodestar_container_ports: >-
44+
{{ lodestar_container_ports_ipv4 + lodestar_container_ports_ipv6 if lodestar_ipv6_enabled else [] }}
45+
3846
lodestar_container_volumes:
3947
- "{{ lodestar_datadir }}:/data"
4048
- "{{ lodestar_auth_jwt_path }}:/execution-auth.jwt:ro"
4149
lodestar_container_security_opts: []
4250
lodestar_container_stop_timeout: "300"
4351
lodestar_container_networks: []
44-
lodestar_container_command:
52+
lodestar_container_command_default:
4553
- beacon
4654
- --dataDir=/data
4755
- --discv5
4856
- --listenAddress=0.0.0.0
49-
- --listenAddress6=::0
5057
- --port={{ lodestar_ports_p2p_tcp }}
51-
- --port6={{ lodestar_ports_p2p_tcp_ipv6 }}
5258
- --enr.ip={{ lodestar_announced_ip }}
53-
- --enr.ip6={{ lodestar_announced_ipv6 }}
5459
- --enr.tcp={{ lodestar_ports_p2p_tcp }}
55-
- --enr.tcp6={{ lodestar_ports_p2p_tcp_ipv6 }}
5660
- --enr.udp={{ lodestar_ports_p2p_udp }}
57-
- --enr.udp6={{ lodestar_ports_p2p_udp_ipv6 }}
5861
- --discoveryPort6={{ lodestar_ports_p2p_udp_ipv6 }}
5962
- --rest
6063
- --rest.address=0.0.0.0
@@ -64,6 +67,17 @@ lodestar_container_command:
6467
- --metrics
6568
- --metrics.address=0.0.0.0
6669
- --metrics.port={{ lodestar_ports_metrics }}
70+
71+
lodestar_container_command_v6:
72+
- --listenAddress6=::0
73+
- --port6={{ lodestar_ports_p2p_tcp_ipv6 }}
74+
- --enr.ip6={{ lodestar_announced_ipv6 }}
75+
- --enr.tcp6={{ lodestar_ports_p2p_tcp_ipv6 }}
76+
- --enr.udp6={{ lodestar_ports_p2p_udp_ipv6 }}
77+
78+
lodestar_container_command: >-
79+
{{ lodestar_container_command_default + lodestar_container_command_v6 if lodestar_ipv6_enabled else [] }}
80+
6781
lodestar_container_command_extra_args: []
6882

6983
checkpoint_sync_url: https://beaconstate.ethstaker.cc

0 commit comments

Comments
 (0)