Skip to content

Commit da89b00

Browse files
committed
Upgrade Cardano node to '8.0.0'
1 parent 72d2859 commit da89b00

File tree

10 files changed

+52
-20
lines changed

10 files changed

+52
-20
lines changed

.github/workflows/test-docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
description: The url of the archive of the Cardano binaries
1414
required: true
1515
type: string
16-
default: https://update-cardano-mainnet.iohk.io/cardano-node-releases/cardano-node-1.35.7-linux.tar.gz
16+
default: https://update-cardano-mainnet.iohk.io/cardano-node-releases/cardano-node-8.0.0-linux.tar.gz
1717
dry_run:
1818
description: Dry run will not push the Docker images to the registry
1919
required: true

docs/root/manual/getting-started/run-signer-node.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ For more information about the **Mithril Protocol**, please refer to the [About
4343
* Read rights on the `Database` folder (`--database-path` setting of the **Cardano Node**)
4444
* Read/Write rights on the `Inter Process Communication` file (usually `CARDANO_NODE_SOCKET_PATH` env var used to launch the **Cardano Node**)
4545

46-
* Install a recent version of the [`cardano-cli`](https://github.com/input-output-hk/cardano-node/releases/tag/1.35.7) (version 1.35.7+)
46+
* Install a recent version of the [`cardano-cli`](https://github.com/input-output-hk/cardano-node/releases/tag/8.0.0) (version 8.0.0+)
4747

4848
* Install a [correctly configured](https://www.rust-lang.org/learn/get-started) Rust toolchain (latest stable version).
4949

docs/versioned_docs/version-maintained/manual/getting-started/run-signer-node.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ For more information about the **Mithril Protocol**, please refer to the [About
4343
* Read rights on the `Database` folder (`--database-path` setting of the **Cardano Node**)
4444
* Read/Write rights on the `Inter Process Communication` file (usually `CARDANO_NODE_SOCKET_PATH` env var used to launch the **Cardano Node**)
4545

46-
* Install a recent version of the [`cardano-cli`](https://github.com/input-output-hk/cardano-node/releases/tag/1.35.7) (version 1.35.7+)
46+
* Install a recent version of the [`cardano-cli`](https://github.com/input-output-hk/cardano-node/releases/tag/8.0.0) (version 8.0.0+)
4747

4848
* Install a [correctly configured](https://www.rust-lang.org/learn/get-started) Rust toolchain (latest stable version).
4949

mithril-aggregator/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ RUN /app/target/release/mithril-aggregator --version
4040
FROM ubuntu:22.04
4141

4242
# Args
43-
ARG CARDANO_BIN_URL=https://update-cardano-mainnet.iohk.io/cardano-node-releases/cardano-node-1.35.7-linux.tar.gz
43+
ARG CARDANO_BIN_URL=https://update-cardano-mainnet.iohk.io/cardano-node-releases/cardano-node-8.0.0-linux.tar.gz
4444

4545
# Upgrade
4646
RUN apt-get update -y && apt-get install -y libssl-dev ca-certificates wget sqlite3 && rm -rf /var/lib/apt/lists/*

mithril-aggregator/Dockerfile.ci

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
FROM ubuntu:22.04
55

66
# Args
7-
ARG CARDANO_BIN_URL=https://update-cardano-mainnet.iohk.io/cardano-node-releases/cardano-node-1.35.7-linux.tar.gz
7+
ARG CARDANO_BIN_URL=https://update-cardano-mainnet.iohk.io/cardano-node-releases/cardano-node-8.0.0-linux.tar.gz
88

99
# Upgrade
1010
RUN apt-get update -y && apt-get install -y libssl-dev ca-certificates wget sqlite3 && rm -rf /var/lib/apt/lists/*

mithril-infra/variables.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ locals {
8787
variable "cardano_image_id" {
8888
type = string
8989
description = "The Cardano image tag of service to deploy"
90-
default = "1.35.7"
90+
default = "8.0.0"
9191
}
9292

9393
variable "mithril_api_domain" {

mithril-signer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ RUN /app/target/release/mithril-signer --version
4141
FROM ubuntu:22.04
4242

4343
# Args
44-
ARG CARDANO_BIN_URL=https://update-cardano-mainnet.iohk.io/cardano-node-releases/cardano-node-1.35.7-linux.tar.gz
44+
ARG CARDANO_BIN_URL=https://update-cardano-mainnet.iohk.io/cardano-node-releases/cardano-node-8.0.0-linux.tar.gz
4545

4646
# Upgrade
4747
RUN apt-get update -y && apt-get install -y libssl-dev ca-certificates wget sqlite3 && rm -rf /var/lib/apt/lists/*

mithril-signer/Dockerfile.ci

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
FROM ubuntu:22.04
55

66
# Args
7-
ARG CARDANO_BIN_URL=https://update-cardano-mainnet.iohk.io/cardano-node-releases/cardano-node-1.35.7-linux.tar.gz
7+
ARG CARDANO_BIN_URL=https://update-cardano-mainnet.iohk.io/cardano-node-releases/cardano-node-8.0.0-linux.tar.gz
88

99
# Upgrade
1010
RUN apt-get update -y && apt-get install -y libssl-dev ca-certificates wget sqlite3 && rm -rf /var/lib/apt/lists/*

mithril-test-lab/mithril-devnet/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,10 @@ NODES=mithril ./devnet-log.sh
5959
./devnet-query.sh
6060

6161
# Query Cardano nodes only on devnet
62-
.NODES=cardano /devnet-query.sh
62+
NODES=cardano ./devnet-query.sh
6363

6464
# Query Mithril nodes only on devnet
65-
.NODES=mithril /devnet-query.sh
66-
65+
NODES=mithril ./devnet-query.sh
6766

6867
# Stop devnet
6968
./devnet-stop.sh

mithril-test-lab/mithril-devnet/devnet-mkfiles.sh

Lines changed: 42 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,16 @@ NUM_POOL_NODES=$3
4141
SLOT_LENGTH=$4
4242
EPOCH_LENGTH=$5
4343

44-
SUPPLY=10000000000
44+
SUPPLY=100000000000
4545
NETWORK_MAGIC=42
4646
SECURITY_PARAM=2
4747

4848
NODE_PORT_START=3000
4949
NODE_ADDR_PREFIX="172.16.238"
5050
NODE_ADDR_INCREMENT=10
51-
CARDANO_BINARY_URL="https://update-cardano-mainnet.iohk.io/cardano-node-releases/cardano-node-1.35.7-linux.tar.gz"
51+
CARDANO_BINARY_URL="https://update-cardano-mainnet.iohk.io/cardano-node-releases/cardano-node-8.0.0-linux.tar.gz"
5252
ALONZO_GENESIS_URL="https://book.world.dev.cardano.org/environments/private/alonzo-genesis.json"
53+
CONWAY_GENESIS_URL="https://book.world.dev.cardano.org/environments/private/conway-genesis.json"
5354

5455
GENESIS_VERIFICATION_KEY=5b33322c3235332c3138362c3230312c3137372c31312c3131372c3133352c3138372c3136372c3138312c3138382c32322c35392c3230362c3130352c3233312c3135302c3231352c33302c37382c3231322c37362c31362c3235322c3138302c37322c3133342c3133372c3234372c3136312c36385d
5556
GENESIS_SECRET_KEY=5b3131382c3138342c3232342c3137332c3136302c3234312c36312c3134342c36342c39332c3130362c3232392c38332c3133342c3138392c34302c3138392c3231302c32352c3138342c3136302c3134312c3233372c32362c3136382c35342c3233392c3230342c3133392c3131392c31332c3139395d
@@ -121,10 +122,11 @@ sed -i ${ROOT}/configuration.yaml \
121122
-e 's/TracingVerbosity: NormalVerbosity/TracingVerbosity: MinimalVerbosity/' \
122123
-e 's/TurnOnLogMetrics: True/TurnOnLogMetrics: False/' \
123124
-e 's|GenesisFile: genesis.json|ByronGenesisFile: byron/genesis.json|' \
125+
-e '/ByronGenesisFile/ aConwayGenesisFile: shelley/genesis.conway.json' \
124126
-e '/ByronGenesisFile/ aAlonzoGenesisFile: shelley/genesis.alonzo.json' \
125127
-e '/ByronGenesisFile/ aShelleyGenesisFile: shelley/genesis.json' \
126128
-e 's/RequiresNoMagic/RequiresMagic/' \
127-
-e 's/LastKnownBlockVersion-Major: 0/LastKnownBlockVersion-Major: 5/' \
129+
-e 's/LastKnownBlockVersion-Major: 0/LastKnownBlockVersion-Major: 8/' \
128130
-e 's/LastKnownBlockVersion-Minor: 2/LastKnownBlockVersion-Minor: 0/' \
129131
-e 's/LastKnownBlockVersion-Alt: 0/LastKnownBlockVersion-Alt: 0/'
130132
# Options for making it easier to trigger the transition to Shelley
@@ -139,8 +141,8 @@ echo "TestShelleyHardForkAtEpoch: 0" >> ${ROOT}/configuration.yaml
139141
echo "TestAllegraHardForkAtEpoch: 0" >> ${ROOT}/configuration.yaml
140142
echo "TestMaryHardForkAtEpoch: 0" >> ${ROOT}/configuration.yaml
141143
echo "TestAlonzoHardForkAtEpoch: 0" >> ${ROOT}/configuration.yaml
142-
echo "TestEnableDevelopmentHardForkEras: True" >> ${ROOT}/configuration.yaml
143-
echo "TestEnableDevelopmentNetworkProtocols: True" >> ${ROOT}/configuration.yaml
144+
echo "ExperimentalHardForksEnabled: True" >> ${ROOT}/configuration.yaml
145+
echo "ExperimentalProtocolsEnabled: True" >> ${ROOT}/configuration.yaml
144146

145147
#uncomment this to trigger the hardfork with protocol version 1
146148
#echo "TestShelleyHardForkAtVersion: 1" >> ${ROOT}/configuration.yaml
@@ -317,7 +319,9 @@ echo "====================================================================="
317319
# Shelley era. Set up our template
318320
mkdir shelley
319321
curl -s ${ALONZO_GENESIS_URL} -o shelley/genesis.alonzo.spec.json
322+
curl -s ${CONWAY_GENESIS_URL} -o shelley/genesis.conway.spec.json
320323
./cardano-cli genesis create --testnet-magic ${NETWORK_MAGIC} --genesis-dir shelley --start-time $(date -u +%Y-%m-%dT%H:%M:%SZ)
324+
mv shelley/genesis.spec.json shelley/genesis.spec.json.tmp && cat shelley/genesis.spec.json.tmp | jq . > shelley/genesis.spec.json && rm shelley/genesis.spec.json.tmp
321325

322326
# Then edit the genesis.spec.json ...
323327

@@ -602,7 +606,7 @@ done
602606
cat >> activate.sh <<EOF
603607
echo ">> Wait for Cardano pools to be activated"
604608
POOLS_ACTIVATION_WAIT_ROUND_DELAY=2
605-
POOLS_ACTIVATION_WAIT_ROUNDS_MAX=\$(echo "scale=0; 3 * $EPOCH_LENGTH * $SLOT_LENGTH / \$POOLS_ACTIVATION_WAIT_ROUND_DELAY" | bc)
609+
POOLS_ACTIVATION_WAIT_ROUNDS_MAX=\$(echo "scale=0; 5 * $EPOCH_LENGTH * $SLOT_LENGTH / \$POOLS_ACTIVATION_WAIT_ROUND_DELAY" | bc)
606610
POOLS_ACTIVATION_WAIT_ROUNDS=1
607611
POOL_STAKE_RETRIEVAL_WAIT_ROUND_DELAY=2
608612
POOL_STAKE_RETRIEVAL_WAIT_ROUNDS_MAX=\$POOLS_ACTIVATION_WAIT_ROUNDS_MAX
@@ -619,7 +623,7 @@ do
619623
do
620624
POOL_STAKE_PREVIOUS_EPOCH=\$(CARDANO_NODE_SOCKET_PATH=node-pool${N}/ipc/node.sock ./cardano-cli query stake-snapshot \\
621625
--stake-pool-id \$POOL_ID \\
622-
--testnet-magic ${NETWORK_MAGIC} | jq .poolStakeMark)
626+
--testnet-magic ${NETWORK_MAGIC} | jq '.pools | values | flatten | .[0].stakeMark')
623627
if [ "\$POOL_STAKE_PREVIOUS_EPOCH" != "0" ] ; then
624628
break
625629
else
@@ -759,7 +763,7 @@ CARDANO_NODE_SOCKET_PATH=node-bft1/ipc/node.sock ./cardano-cli query stake-pools
759763
echo
760764
761765
echo ">> Query stake distribution"
762-
CARDANO_NODE_SOCKET_PATH=node-bft1/ipc/node.sock ./cardano-cli query stake-distribution \\
766+
CARDANO_NODE_SOCKET_PATH=node-bft1/ipc/node.sock ./cardano-cli query stake-snapshot --all-stake-pools \\
763767
--cardano-mode \\
764768
--testnet-magic ${NETWORK_MAGIC}
765769
echo
@@ -1130,7 +1134,7 @@ cat >> start-cardano.sh <<EOF
11301134
#!/usr/bin/env bash
11311135
11321136
echo ">> Start Cardano network"
1133-
killall cardano-node 2>&1 /dev/null
1137+
killall cardano-node > /dev/null 2>&1
11341138
./cardano-cli --version
11351139
./cardano-node --version
11361140
@@ -1216,7 +1220,36 @@ done
12161220
12171221
echo ">> Activate Cardano pools"
12181222
./activate.sh ${ROOT}
1223+
12191224
EOF
1225+
1226+
cat >> start-cardano.sh <<EOF
1227+
echo ">> Wait for Cardano nodes to have enough immutable files"
1228+
for NODE in ${ALL_NODES}; do
1229+
echo ">> Wait for \${NODE} to have enough immutable files"
1230+
NODE_ACTIVATION_WAIT_ROUNDS_MAX=100
1231+
NODE_ACTIVATION_WAIT_ROUNDS=1
1232+
NODE_ACTIVATION_WAIT_ROUND_DELAY=2
1233+
while true
1234+
do
1235+
TOTAL_IMMUTABLE_FILES=\$(ls -1q \${NODE}/db/immutable | grep ".chunk" | wc -l)
1236+
if [ "\$TOTAL_IMMUTABLE_FILES" -gt "1" ] ; then
1237+
echo ">>>> \${NODE} has enough immutable files!"
1238+
break
1239+
else
1240+
echo ">>>> \${NODE} has not enough immutable files yet... [attempt \$NODE_ACTIVATION_WAIT_ROUNDS]"
1241+
sleep \$NODE_ACTIVATION_WAIT_ROUND_DELAY
1242+
fi
1243+
NODE_ACTIVATION_WAIT_ROUNDS=\$(( \$NODE_ACTIVATION_WAIT_ROUNDS + 1 ))
1244+
if [ "\$NODE_ACTIVATION_WAIT_ROUNDS" -gt "\$NODE_ACTIVATION_WAIT_ROUNDS_MAX" ] ; then
1245+
echo ">>>> Timeout: \${NODE} has not enough immutable files within \$NODE_ACTIVATION_WAIT_ROUNDS_MAX attempts"
1246+
exit 1
1247+
fi
1248+
done
1249+
done
1250+
1251+
EOF
1252+
12201253
chmod u+x start-cardano.sh
12211254

12221255
cat >> start-mithril.sh <<EOF

0 commit comments

Comments
 (0)