File tree Expand file tree Collapse file tree 3 files changed +19
-13
lines changed Expand file tree Collapse file tree 3 files changed +19
-13
lines changed Original file line number Diff line number Diff line change 14
14
15
15
# Mithril
16
16
if ! test -e /data/db/protocolMagicId; then
17
+ __base=https://raw.githubusercontent.com/input-output-hk/mithril/main/mithril-infra/configuration
17
18
case ${NETWORK} in
18
- mainnet|preprod)
19
- __base=https://raw.githubusercontent.com/input-output-hk/mithril/main/mithril-infra/configuration
20
- __url=${__base} /release-${NETWORK}
21
- export GENESIS_VERIFICATION_KEY=$( curl ${__url} /genesis.vkey 2> /dev/null)
22
- export AGGREGATOR_ENDPOINT=https://aggregator.release-${NETWORK} .api.mithril.network/aggregator
23
- export SNAPSHOT_DIGEST=$( mithril-client snapshot list --json | jq -r ' .[0].digest' )
24
- mkdir -p /data
25
- cd /data
26
- echo " Starting: /usr/local/bin/mithril-client snapshot download ${SNAPSHOT_DIGEST} "
27
- mithril-client snapshot download ${SNAPSHOT_DIGEST}
28
- ;;
29
- * ) echo " Mithril not supported on ${NETWORK} ... skipping" ;;
19
+ mainnet|preprod) __path=release-${NETWORK} ;;
20
+ preview) __path=pre-release-${NETWORK} ;;
21
+ * ) echo " Mithril not supported on ${NETWORK} ... skipping" ; __skip=true ;;
30
22
esac
23
+ if [[ ${__skip} != true ]]; then
24
+ export GENESIS_VERIFICATION_KEY=$( curl ${__base} /${__path} /genesis.vkey 2> /dev/null)
25
+ export AGGREGATOR_ENDPOINT=https://aggregator.${__path} .api.mithril.network/aggregator
26
+ export SNAPSHOT_DIGEST=$( mithril-client snapshot list --json | jq -r ' .[0].digest' )
27
+ mkdir -p /data
28
+ cd /data
29
+ echo " Starting: /usr/local/bin/mithril-client snapshot download ${SNAPSHOT_DIGEST} "
30
+ mithril-client snapshot download ${SNAPSHOT_DIGEST}
31
+ fi
31
32
fi
32
33
33
34
echo " Starting: /usr/local/bin/cardano-node run"
Original file line number Diff line number Diff line change @@ -43,7 +43,11 @@ CARDANO_RTS_OPTS=${CARDANO_RTS_OPTS:--N2 -A64m -I0 -qg -qb --disable-delayed-os-
43
43
CARDANO_SOCKET_PATH=${CARDANO_SOCKET_PATH:-/ opt/ cardano/ ipc/ socket}
44
44
CARDANO_TOPOLOGY=${CARDANO_TOPOLOGY:- ${CARDANO_CONFIG_BASE} / ${CARDANO_NETWORK} / topology.json}
45
45
# mithril
46
- AGGREGATOR_ENDPOINT=${AGGREGATOR_ENDPOINT:- https:// aggregator.release-${CARDANO_NETWORK} .api.mithril.network/ aggregator}
46
+ case ${CARDANO_NETWORK} in
47
+ mainnet|preprod) __path=release-${CARDANO_NETWORK} ;;
48
+ preview) __path=pre-release-${CARDANO_NETWORK} ;;
49
+ esac
50
+ AGGREGATOR_ENDPOINT=${AGGREGATOR_ENDPOINT:- https:// aggregator.${__path} .api.mithril.network/ aggregator}
47
51
GENESIS_VERIFICATION_KEY_PATH=${GENESIS_VERIFICATION_KEY_PATH:- ${CARDANO_CONFIG_BASE} / ${CARDANO_NETWORK} / genesis.vkey}
48
52
if [[ -z $GENESIS_VERIFICATION_KEY && -f $GENESIS_VERIFICATION_KEY_PATH ]]; then
49
53
GENESIS_VERIFICATION_KEY=$( < ${GENESIS_VERIFICATION_KEY_PATH} )
Original file line number Diff line number Diff line change
1
+ 5b3132372c37332c3132342c3136312c362c3133372c3133312c3231332c3230372c3131372c3139382c38352c3137362c3139392c3136322c3234312c36382c3132332c3131392c3134352c31332c3233322c3234332c34392c3232392c322c3234392c3230352c3230352c33392c3233352c34345d
You can’t perform that action at this time.
0 commit comments