Skip to content

Commit c3b8666

Browse files
committed
feat(infra): support transition to unique Cardano 'config.json' file
From Cardano '10.6', there is no need to use the 'config-bp.json' configuration for block producer.
1 parent 78a2890 commit c3b8666

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

mithril-infra/mithril.signer.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,13 @@ for SIGNER_TYPE in $SIGNER_TYPES; do
6666
rm -f $SIGNER_TYPE_CONFIG_DIRECTORY/${var.cardano_network}/cardano-node/config.json
6767
mv $SIGNER_TYPE_CONFIG_DIRECTORY/${var.cardano_network}/cardano-node/config.json.new $SIGNER_TYPE_CONFIG_DIRECTORY/${var.cardano_network}/cardano-node/config.json
6868
69+
# Create the config-bp.json file if not exists
70+
# From version `10.6`, it is no more needed to have a separate config-bp.json file
71+
# The support for the config-bp.json file is kept for backward compatibility with older Cardano node versions and will be removed once the minimum supported version is `10.6`
72+
if [ ! -f "$SIGNER_TYPE_CONFIG_DIRECTORY/${var.cardano_network}/cardano-node/config-bp.json" ]; then
73+
cp $SIGNER_TYPE_CONFIG_DIRECTORY/${var.cardano_network}/cardano-node/config.json $SIGNER_TYPE_CONFIG_DIRECTORY/${var.cardano_network}/cardano-node/config-bp.json
74+
fi
75+
6976
# Copy config-bp.json to the signer
7077
cat $SIGNER_TYPE_CONFIG_DIRECTORY/${var.cardano_network}/cardano-node/config-bp.json | jq ".hasPrometheus[0] |= \"cardano-node-$SIGNER_TYPE-signer-${each.key}\"" > $SIGNER_TYPE_CONFIG_DIRECTORY/${var.cardano_network}/cardano-node/config-bp.json.new
7178
rm -f $SIGNER_TYPE_CONFIG_DIRECTORY/${var.cardano_network}/cardano-node/config-bp.json

0 commit comments

Comments
 (0)