@@ -731,11 +731,19 @@ cat >> query-mithril.sh <<EOF
731
731
AGGREGATOR_API_ENDPOINT="http://0.0.0.0:8080/aggregator"
732
732
733
733
echo ">> Query pending certificate"
734
- curl -s \$ {AGGREGATOR_API_ENDPOINT}/certificate-pending | jq .
734
+ curl -sL \$ {AGGREGATOR_API_ENDPOINT}/certificate-pending | jq .
735
735
echo
736
736
737
- echo ">> Query snapshots"
738
- curl -s \$ {AGGREGATOR_API_ENDPOINT}/snapshots | jq '.[:2]'
737
+ echo ">> Query latest certificates"
738
+ curl -sL \$ {AGGREGATOR_API_ENDPOINT}/certificates | jq '.[:2]'
739
+ echo
740
+
741
+ echo ">> Query latest mithril stake distributions"
742
+ curl -sL \$ {AGGREGATOR_API_ENDPOINT}/artifact/mithril-stake-distributions | jq '.[:2]'
743
+ echo
744
+
745
+ echo ">> Query latest snapshots"
746
+ curl -sL \$ {AGGREGATOR_API_ENDPOINT}/artifact/snapshots | jq '.[:2]'
739
747
echo
740
748
741
749
EOF
@@ -746,7 +754,7 @@ cat >> query-cardano.sh <<EOF
746
754
echo ">> Query chain tip"
747
755
CARDANO_NODE_SOCKET_PATH=node-bft1/ipc/node.sock ./cardano-cli query tip \\
748
756
--cardano-mode \\
749
- --testnet-magic ${NETWORK_MAGIC}
757
+ --testnet-magic ${NETWORK_MAGIC} | jq .
750
758
751
759
echo
752
760
echo ">> Query whole utxo"
765
773
echo ">> Query stake distribution"
766
774
CARDANO_NODE_SOCKET_PATH=node-bft1/ipc/node.sock ./cardano-cli query stake-snapshot --all-stake-pools \\
767
775
--cardano-mode \\
768
- --testnet-magic ${NETWORK_MAGIC}
776
+ --testnet-magic ${NETWORK_MAGIC} | jq .
769
777
echo
770
778
771
779
EOF
@@ -1272,7 +1280,7 @@ if [ -z "\${MITHRIL_IMAGE_ID}" ]; then
1272
1280
cd mithril-signer && make docker-build > /dev/null && cd ..
1273
1281
cd $PWD
1274
1282
fi
1275
- docker-compose rm -f
1283
+
1276
1284
if [ -z "\$ {MITHRIL_IMAGE_ID}" ]; then
1277
1285
export MITHRIL_AGGREGATOR_IMAGE="mithril/mithril-aggregator"
1278
1286
export MITHRIL_CLIENT_IMAGE="mithril/mithril-client"
@@ -1282,7 +1290,8 @@ else
1282
1290
export MITHRIL_CLIENT_IMAGE="ghcr.io/input-output-hk/mithril-client:\$ {MITHRIL_IMAGE_ID}"
1283
1291
export MITHRIL_SIGNER_IMAGE="ghcr.io/input-output-hk/mithril-signer:\$ {MITHRIL_IMAGE_ID}"
1284
1292
fi
1285
- docker-compose -f docker-compose.yaml --profile mithril up --remove-orphans --force-recreate -d --no-build
1293
+ docker compose rm -f
1294
+ docker compose -f docker-compose.yaml --profile mithril up --remove-orphans --force-recreate -d --no-build
1286
1295
1287
1296
echo ">> List of Mithril signers"
1288
1297
echo --------,--------------------------------------------------------,----------------------------------- | column -t -s,
1312
1321
done
1313
1322
1314
1323
echo ">> Bootstrap the Genesis certificate"
1315
- docker- compose -f docker-compose.yaml --profile mithril-genesis run mithril-aggregator-genesis
1324
+ docker compose -f docker-compose.yaml --profile mithril-genesis run mithril-aggregator-genesis
1316
1325
1317
1326
EOF
1318
1327
chmod u+x start-mithril.sh
@@ -1333,40 +1342,25 @@ else
1333
1342
export MITHRIL_CLIENT_IMAGE="ghcr.io/input-output-hk/mithril-client:\$ {MITHRIL_IMAGE_ID}"
1334
1343
export MITHRIL_SIGNER_IMAGE="ghcr.io/input-output-hk/mithril-signer:\$ {MITHRIL_IMAGE_ID}"
1335
1344
fi
1336
- docker- compose -f docker-compose.yaml --profile mithril down
1345
+ docker compose -f docker-compose.yaml --profile mithril down
1337
1346
EOF
1338
1347
chmod u+x stop.sh
1339
1348
1340
1349
cat >> log-mithril.sh << EOF
1341
1350
#!/usr/bin/env bash
1342
1351
1343
- SEPARATOR="====================================================================="
1344
-
1345
- if [ -z "\$ {MITHRIL_IMAGE_ID}" ]; then
1346
- export MITHRIL_AGGREGATOR_IMAGE="mithril/mithril-aggregator"
1347
- export MITHRIL_CLIENT_IMAGE="mithril/mithril-client"
1348
- export MITHRIL_SIGNER_IMAGE="mithril/mithril-signer"
1349
- else
1350
- export MITHRIL_AGGREGATOR_IMAGE="ghcr.io/input-output-hk/mithril-aggregator:\$ {MITHRIL_IMAGE_ID}"
1351
- export MITHRIL_CLIENT_IMAGE="ghcr.io/input-output-hk/mithril-client:\$ {MITHRIL_IMAGE_ID}"
1352
- export MITHRIL_SIGNER_IMAGE="ghcr.io/input-output-hk/mithril-signer:\$ {MITHRIL_IMAGE_ID}"
1353
- fi
1352
+ SEPARATOR="---------------------------------------------------------------------"
1354
1353
1355
1354
# Mithril nodes logs
1356
- echo \$ {SEPARATOR}
1357
- echo '-- ' docker-compose logs --tail="\$ {LINES}"
1358
- echo \$ {SEPARATOR}
1359
- docker-compose logs --tail="\$ {LINES}"
1360
- echo
1361
- echo \$ {SEPARATOR}
1355
+ docker ps --format='{{.Names}}' | grep "mithril" | sort -n | xargs -i sh -c 'echo '\$ {SEPARATOR}' && echo docker logs -n '\$ {LINES}' {} && echo '\$ {SEPARATOR}' && docker logs -n '\$ {LINES}' {} && echo '\$ {SEPARATOR}' && echo'
1362
1356
1363
1357
EOF
1364
1358
chmod u+x log-mithril.sh
1365
1359
1366
1360
cat >> log-cardano.sh << EOF
1367
1361
#!/usr/bin/env bash
1368
1362
1369
- SEPARATOR="===================================================================== "
1363
+ SEPARATOR="--------------------------------------------------------------------- "
1370
1364
1371
1365
# Cardano nodes logs
1372
1366
find . -type f -print | grep "node.log" | sort -n | xargs -i sh -c 'echo '\$ {SEPARATOR}' && echo tail -n '\$ {LINES}' {} && echo '\$ {SEPARATOR}' && tail -n '\$ {LINES}' {} && echo '\$ {SEPARATOR}' && echo'
0 commit comments