Skip to content

Commit 351338b

Browse files
authored
Merge branch 'blinklabs-io:main' into feat/startnonproducer
2 parents e5ec6c6 + 13298a6 commit 351338b

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ RUN echo "Building tags/${NODE_VERSION}..." \
2222
&& rm -rf /root/.cabal/store/ghc-${GHC_VERSION}
2323

2424
FROM ghcr.io/blinklabs-io/cardano-cli:10.11.1.0-1 AS cardano-cli
25-
FROM ghcr.io/blinklabs-io/cardano-configs:20250812-1 AS cardano-configs
25+
FROM ghcr.io/blinklabs-io/cardano-configs:20250917-1 AS cardano-configs
2626
FROM ghcr.io/blinklabs-io/mithril-client:0.12.11-1 AS mithril-client
2727
FROM ghcr.io/blinklabs-io/mithril-signer:0.2.249-1 AS mithril-signer
2828
FROM ghcr.io/blinklabs-io/nview:0.10.10 AS nview

bin/run-network

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,17 @@ if ! test -e /data/db/protocolMagicId; then
2828
esac
2929
if [[ ${__skip} != true ]]; then
3030
export GENESIS_VERIFICATION_KEY=$(</opt/cardano/config/${NETWORK}/genesis.vkey)
31+
export ANCILLARY_VERIFICATION_KEY=$(</opt/cardano/config/${NETWORK}/ancillary.vkey)
3132
export AGGREGATOR_ENDPOINT=https://aggregator.${__path}.api.mithril.network/aggregator
3233
export SNAPSHOT_DIGEST=$(mithril-client cardano-db snapshot list --json | jq -r '.[0].digest')
3334
mkdir -p /data
3435
cd /data
35-
echo "Starting: /usr/local/bin/mithril-client cardano-db download ${SNAPSHOT_DIGEST}"
36+
echo "Starting: /usr/local/bin/mithril-client cardano-db download ${SNAPSHOT_DIGEST} ${ANCILLARY_VERIFICATION_KEY:+--include-ancillary}"
37+
echo "(This could take a while...)"
3638
# Handle SIGTERM during initial sync
3739
trap 'kill -TERM $(pidof mithril-client)' TERM
3840
# Run mithril-client in the background so we can capture the PID and wait
39-
mithril-client cardano-db download ${SNAPSHOT_DIGEST} &
41+
mithril-client cardano-db download "${SNAPSHOT_DIGEST}" ${ANCILLARY_VERIFICATION_KEY:+--include-ancillary} &
4042
_mithril_pid=$!
4143
wait $_mithril_pid || exit $?
4244
# Reset signal handler and wait again (to avoid race condition)

bin/run-node

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,13 @@ case ${CARDANO_NETWORK} in
7272
esac
7373
AGGREGATOR_ENDPOINT=${AGGREGATOR_ENDPOINT:-https://aggregator.${__path}.api.mithril.network/aggregator}
7474
GENESIS_VERIFICATION_KEY_PATH=${GENESIS_VERIFICATION_KEY_PATH:-${CARDANO_CONFIG_BASE}/${CARDANO_NETWORK}/genesis.vkey}
75+
ANCILLARY_VERIFICATION_KEY_PATH=${ANCILLARY_VERIFICATION_KEY_PATH:-${CARDANO_CONFIG_BASE}/${CARDANO_NETWORK}/ancillary.vkey}
7576
if [[ -z $GENESIS_VERIFICATION_KEY && -f $GENESIS_VERIFICATION_KEY_PATH ]]; then
7677
GENESIS_VERIFICATION_KEY=$(<${GENESIS_VERIFICATION_KEY_PATH})
7778
fi
79+
if [[ -z $ANCILLARY_VERIFICATION_KEY && -f $ANCILLARY_VERIFICATION_KEY_PATH ]]; then
80+
ANCILLARY_VERIFICATION_KEY=$(<${ANCILLARY_VERIFICATION_KEY_PATH})
81+
fi
7882
SNAPSHOT_DIGEST=${SNAPSHOT_DIGEST:-latest}
7983
RESTORE_SNAPSHOT=${RESTORE_SNAPSHOT:-true}
8084
START_AS_NON_PRODUCING=${START_AS_NON_PRODUCING:-false}
@@ -114,6 +118,7 @@ fi
114118

115119
echo AGGREGATOR_ENDPOINT=${AGGREGATOR_ENDPOINT}
116120
echo GENESIS_VERIFICATION_KEY=${GENESIS_VERIFICATION_KEY}
121+
echo ANCILLARY_VERIFICATION_KEY=${ANCILLARY_VERIFICATION_KEY}
117122
echo SNAPSHOT_DIGEST=${SNAPSHOT_DIGEST}
118123
echo RESTORE_SNAPSHOT=${RESTORE_SNAPSHOT}
119124

@@ -125,15 +130,16 @@ if ! test -e ${CARDANO_DATABASE_PATH}/protocolMagicId; then
125130
if [[ ${RESTORE_SNAPSHOT} == true ]]; then
126131
mkdir -p $(dirname ${CARDANO_DATABASE_PATH})
127132
cd $(dirname ${CARDANO_DATABASE_PATH})
128-
export AGGREGATOR_ENDPOINT GENESIS_VERIFICATION_KEY SNAPSHOT_DIGEST
129-
echo "Starting: /usr/local/bin/mithril-client cardano-db download ${SNAPSHOT_DIGEST}"
133+
export AGGREGATOR_ENDPOINT GENESIS_VERIFICATION_KEY ANCILLARY_VERIFICATION_KEY SNAPSHOT_DIGEST
134+
echo "Starting: /usr/local/bin/mithril-client cardano-db download ${SNAPSHOT_DIGEST} ${ANCILLARY_VERIFICATION_KEY:+--include-ancillary}"
135+
echo "(This could take a while...)"
130136
if [[ $(cd ${CARDANO_DATABASE_PATH} 2>/dev/null; pwd -P) != $(pwd -P)/db ]]; then
131137
rm -rf db/*
132138
fi
133139
# Handle SIGTERM during initial sync
134140
trap 'kill -TERM $(pidof mithril-client)' TERM
135141
# Run mithril-client in the background so we can capture the PID and wait
136-
mithril-client cardano-db download ${SNAPSHOT_DIGEST} &
142+
mithril-client cardano-db download "${SNAPSHOT_DIGEST}" ${ANCILLARY_VERIFICATION_KEY:+--include-ancillary} &
137143
_mithril_pid=$!
138144
wait $_mithril_pid || exit $?
139145
# Reset signal handler and wait again (to avoid race condition)

0 commit comments

Comments
 (0)