File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed
mithril-test-lab/mithril-devnet/mkfiles Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change 4141# create the topology files
4242NODE_ADDR=$LISTENING_ADDR
4343NODE_PORT=$NODE_PORT_START
44- TOPOLOGY=' {"Producers": []}'
44+ TOPOLOGY=' {
45+ "_comment": "\"Producers\" is used for Cardano 10.5 and earlier, \"localRoots\" and \"publicRoots\" are used for 10.6 and later",
46+ "Producers": [],
47+ "localRoots": [
48+ {
49+ "accessPoints": [],
50+ "advertise": false,
51+ "trustable": false,
52+ "valency": 1
53+ }
54+ ],
55+ "publicRoots": [
56+ {
57+ "accessPoints": [],
58+ "advertise": false
59+ }
60+ ]
61+ }'
4562TOPOLOGY_DOCKER=$TOPOLOGY
4663for NODE in ${FULL_NODES} ; do
4764 NODE_PORT=$(( ${NODE_PORT} + 1 ))
4865 echo ${NODE_PORT} > ${NODE} /port
4966 echo ${LISTENING_ADDR} > ${NODE} /host
5067done
68+
5169for NODE in ${POOL_NODES} ; do
5270 NODE_PORT=$(( ${NODE_PORT} + 1 ))
5371 echo ${NODE_PORT} > ${NODE} /port
5472 TOPOLOGY=$( echo ${TOPOLOGY} | jq ' .Producers[.Producers| length] |= . + {"addr": "' ${NODE_ADDR} ' ","port": ' ${NODE_PORT} ' , "valency": 1}' )
73+ TOPOLOGY=$( echo ${TOPOLOGY} | jq ' .localRoots[0].accessPoints[.localRoots[0].accessPoints| length] |= . + {"address": "' ${NODE_ADDR} ' ","port": ' ${NODE_PORT} ' }' )
5574 echo ${LISTENING_ADDR} > ${NODE} /host
5675done
5776echo $TOPOLOGY | jq . > topology.json
6281NODE_IX=0
6382for NODE in ${POOL_NODES} ; do
6483 cat topology.json | jq ' .Producers |= del(.[' ${NODE_IX} ' ])' > ${NODE} /topology.json
84+ cat topology.json | jq ' .localRoots[0].accessPoints |= del(.[' ${NODE_IX} ' ])' > ${NODE} /topology.json
6585 NODE_IX=$(( ${NODE_IX} + 1 ))
6686done
You can’t perform that action at this time.
0 commit comments