File tree Expand file tree Collapse file tree 4 files changed +56
-63
lines changed Expand file tree Collapse file tree 4 files changed +56
-63
lines changed Original file line number Diff line number Diff line change @@ -64,14 +64,18 @@ cardano_node_config_file: '{{ cardano_node_config_container_dir }}/{{ cardano_no
64
64
65
65
# Topology
66
66
cardano_node_manage_topology : false
67
- cardano_node_p2p_enabled : ' {{ false if cardano_node_network == "mainnet" else true }}'
68
- cardano_node_p2p_use_ledger_after : 116812831
69
67
cardano_node_topology_file : ' {{ cardano_node_topology_container_dir }}/{{ cardano_node_network }}/topology.json'
68
+ cardano_node_topology_use_ledger_after_slot : 128908821
70
69
cardano_node_topology_localroots : []
71
- cardano_node_topology_publicroots :
72
- - address : ' relays-new.cardano-{{ cardano_node_network }}.iohk.io'
70
+ cardano_node_topology_publicroots : []
71
+ # Adjust for non-mainnet deployments
72
+ cardano_node_topology_bootstrap_peers :
73
+ - address : ' backbone.cardano.iog.io'
74
+ port : 3001
75
+ - address : ' backbone.mainnet.emurgornd.com'
76
+ port : 3001
77
+ - address : ' backbone.mainnet.cardanofoundation.org'
73
78
port : 3001
74
- valency : 2 # this is only used for legacy topology
75
79
76
80
# Install chrony
77
81
chrony_enabled : true
Original file line number Diff line number Diff line change 35
35
- ' {{ cardano_node_topology_dir }}'
36
36
when : cardano_node_manage_topology
37
37
38
- - name : Generate custom topology config (legacy)
38
+ - name : Generate custom topology config
39
39
template :
40
40
dest : ' {{ cardano_node_topology_file }}'
41
41
src : custom-topology.json.j2
42
42
owner : ' {{ cardano_node_user | string }}'
43
43
group : ' {{ cardano_node_group | string }}'
44
44
mode : 0644
45
45
register : cardano_topology
46
- when : cardano_node_manage_topology and not cardano_node_p2p_enabled
47
-
48
- - name : Generate custom topology config (P2P)
49
- template :
50
- dest : ' {{ cardano_node_topology_file }}'
51
- src : custom-p2p-topology.json.j2
52
- owner : ' {{ cardano_node_user | string }}'
53
- group : ' {{ cardano_node_group | string }}'
54
- mode : 0644
55
- register : cardano_topology_p2p
56
- when : cardano_node_manage_topology and cardano_node_p2p_enabled
46
+ when : cardano_node_manage_topology
57
47
58
48
- name : Include docker-related tasks
59
49
ansible.builtin.include_tasks : docker.yml
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
{
2
- "Producers": [
3
- {% set peer_count = (cardano_node_topology_localroots + cardano_node_topology_publicroots ) | length %}
4
- {% for peer in (cardano_node_topology_localroots + cardano_node_topology_publicroots ) %}
2
+ {% set peer_count = cardano_node_topology_bootstrap_peers | length %}
3
+ {% if peer_count > 0 %}
4
+ "bootstrapPeers": [
5
+ {% for peer in cardano_node_topology_bootstrap_peers %}
5
6
{
6
7
"address": "{{ peer.address }}",
7
- "port": {{ peer.port }},
8
- "valency": {{ peer.valency | default(1) }}
8
+ "port": {{ peer.port | int }}
9
9
{% if loop .index == peer_count %}
10
10
}
11
11
{% else %}
12
12
},
13
+ {% endif %}
14
+ ],
15
+ {% endif %}
16
+ "localRoots": [
17
+ {
18
+ "accessPoints": [
19
+ {% set peer_count = cardano_node_topology_localroots | length %}
20
+ {% for peer in cardano_node_topology_localroots %}
21
+ {
22
+ "address": "{{ peer.address }}",
23
+ "port": {{ peer.port | int }}
24
+ {% if loop .index == peer_count %}
25
+ }
26
+ {% else %}
27
+ },
28
+ {% endif %}
29
+ {% endfor %}
30
+ ],
31
+ "advertise": false,
32
+ "trustable": false,
33
+ "valency": 1
34
+ }
35
+ ],
36
+ "publicRoots": [
37
+ {
38
+ "accessPoints": [
39
+ {% set peer_count = cardano_node_topology_publicroots | length %}
40
+ {% for peer in cardano_node_topology_publicroots %}
41
+ {
42
+ "address": "{{ peer.address }}",
43
+ "port": {{ peer.port | int }}
44
+ {% if loop .index == peer_count %}
45
+ }
46
+ {% else %}
47
+ },
13
48
{% endif %}
14
49
{% endfor %}
15
- ]
50
+ ],
51
+ "advertise": false
52
+ }
53
+ ],
54
+ "useLedgerAfterSlot": {{ cardano_node_topology_use_ledger_after_slot }}
16
55
}
You can’t perform that action at this time.
0 commit comments