Skip to content

Commit b3c4c18

Browse files
authored
Merge pull request #1509 from input-output-hk/jpraynaud/activate-cardano-8.8.0-pre-e2e-test
Support Cardano node `8.9.0`
2 parents 07be147 + b3c6c0a commit b3c4c18

File tree

14 files changed

+123
-45
lines changed

14 files changed

+123
-45
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,13 +266,13 @@ jobs:
266266
matrix:
267267
mode: [ "std" ]
268268
era: ${{ fromJSON(needs.build-ubuntu-X64.outputs.eras) }}
269-
cardano_node_version: [ "8.7.3" ]
269+
cardano_node_version: [ "8.7.3", "8.8.1-pre", "8.9.0" ]
270270
hard_fork_latest_era_at_epoch: [ 0,10,100 ]
271-
run_id: [ "#1","#2" ]
271+
run_id: [ "#1" ]
272272
extra_args: [ "" ]
273273

274274
include:
275-
# Include a hard fork test for `8.1.2` which is not concerned
275+
# Include a test for `8.1.2` which is not concerned by the hard fork
276276
- mode: "std"
277277
era: ${{ fromJSON(needs.build-ubuntu-X64.outputs.eras)[0] }}
278278
cardano_node_version: "8.1.2"
@@ -527,7 +527,7 @@ jobs:
527527
version-name: unstable-${{ steps.slug.outputs.sha8 }}
528528
download-url-base: ${{ github.server_url }}/${{ github.repository }}/releases/download/unstable
529529
gpg-secret-key: ${{ secrets.GPG_SECRET_KEY }}
530-
compatibility-table: '{ "release-mainnet": "⛔", "release-preprod": "⛔", "pre-release-preview": "⛔", "testing-preview": "✔" }'
530+
compatibility-table: '{ "release-mainnet": "⛔", "release-preprod": "⛔", "pre-release-preview": "⛔", "testing-preview": "✔", "testing-sanchonet": "✔" }'
531531

532532
- name: Update unstable release
533533
uses: marvinpinto/action-automatic-releases@latest

.github/workflows/pre-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
version-name: ${{ github.ref_name }}
6565
download-url-base: ${{ github.server_url }}/${{ github.repository }}/releases/download/${{ github.ref_name }}
6666
gpg-secret-key: ${{ secrets.GPG_SECRET_KEY }}
67-
compatibility-table: '{ "release-mainnet": "⛔", "release-preprod": "⛔", "pre-release-preview": "✔", "testing-preview": "✔" }'
67+
compatibility-table: '{ "release-mainnet": "⛔", "release-preprod": "⛔", "pre-release-preview": "✔", "testing-preview": "✔", "testing-sanchonet": "✔" }'
6868

6969
- name: Create pre-release ${{ github.ref_name }}
7070
uses: marvinpinto/action-automatic-releases@latest

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mithril-aggregator/Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ RUN /app/target/release/mithril-aggregator --version
3232
FROM debian:11-slim
3333

3434
# Args
35-
ARG CARDANO_NODE_VERSION=8.7.3
35+
ARG CARDANO_NODE_VERSION=8.9.0
3636
ARG CARDANO_BIN_URL=https://github.com/input-output-hk/cardano-node/releases/download/$CARDANO_NODE_VERSION/cardano-node-$CARDANO_NODE_VERSION-linux.tar.gz
3737

3838
# Upgrade
@@ -47,16 +47,16 @@ COPY --from=rustbuilder /app/target/release/mithril-aggregator /app/bin/mithril-
4747
# Copy the config files
4848
COPY --from=rustbuilder /app/mithril-aggregator/config /app/config
4949

50-
#Workdir
51-
WORKDIR /app/
52-
RUN chown -R appuser /app/
53-
5450
# Install cardano-cli
5551
RUN wget -nv -O cardano-bin.tar.gz $CARDANO_BIN_URL
56-
RUN tar xzf cardano-bin.tar.gz ./cardano-cli && mv cardano-cli /app/bin
52+
RUN (tar xzf cardano-bin.tar.gz ./bin/cardano-cli && mv /bin/cardano-cli /app/bin) || (tar xzf cardano-bin.tar.gz ./cardano-cli && mv cardano-cli /app/bin)
5753
RUN /app/bin/cardano-cli --version
5854
RUN rm -f cardano-bin.tar.gz
5955

56+
#Workdir
57+
WORKDIR /app/
58+
RUN chown -R appuser /app/
59+
6060
# Use an unprivileged user
6161
USER appuser
6262

mithril-aggregator/Dockerfile.ci

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ RUN mkdir -p /app/bin
1414
RUN apt-get update -y && apt-get install -y libssl-dev ca-certificates wget && apt-get clean && rm -rf /var/lib/apt/lists/*
1515

1616
# Install cardano-cli
17-
ARG CARDANO_NODE_VERSION=8.7.3
17+
ARG CARDANO_NODE_VERSION=8.9.0
1818
ARG CARDANO_BIN_URL=https://github.com/input-output-hk/cardano-node/releases/download/$CARDANO_NODE_VERSION/cardano-node-$CARDANO_NODE_VERSION-linux.tar.gz
1919
RUN wget -nv -O cardano-bin.tar.gz $CARDANO_BIN_URL \
20-
&& tar xzf cardano-bin.tar.gz ./cardano-cli && mv cardano-cli /app/bin \
20+
&& (tar xzf cardano-bin.tar.gz ./bin/cardano-cli && mv /bin/cardano-cli /app/bin) || (tar xzf cardano-bin.tar.gz ./cardano-cli && mv cardano-cli /app/bin) \
2121
&& /app/bin/cardano-cli --version \
2222
&& rm -f cardano-bin.tar.gz
2323

mithril-infra/assets/infra.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.2.11
1+
0.2.12

mithril-infra/assets/tools/pool/create-keys.sh

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,20 @@ CARDANO_CLI_CMD node issue-op-cert \
6262
--out-file ${POOL_ARTIFACTS_DIR}/opcert.cert
6363

6464
### Create a registration certificate
65-
CARDANO_CLI_CMD stake-address registration-certificate \
66-
--stake-verification-key-file ${POOL_ARTIFACTS_DIR}/stake.vkey \
67-
--out-file ${POOL_ARTIFACTS_DIR}/stake.cert
65+
if [ "${CARDANO_ERA}" == "conway"]; then
66+
KEY_REGISTRATION_DEPOSIT_ANOUNT=$(CARDANO_CLI_CMD ${CARDANO_ERA} query gov-state --testnet-magic ${NETWORK_MAGIC} | jq -r .enactState.curPParams.keyDeposit)
67+
# Conway specific creation of registration certificate
68+
CARDANO_CLI_CMD stake-address registration-certificate \
69+
--stake-verification-key-file ${POOL_ARTIFACTS_DIR}/stake.vkey \
70+
--out-file ${POOL_ARTIFACTS_DIR}/stake.cert \
71+
--key-reg-deposit-amt $KEY_REGISTRATION_DEPOSIT_ANOUNT
72+
else
73+
# Legacy creation of registration certificate
74+
CARDANO_CLI_CMD stake-address registration-certificate \
75+
--stake-verification-key-file ${POOL_ARTIFACTS_DIR}/stake.vkey \
76+
--out-file ${POOL_ARTIFACTS_DIR}/stake.cert
77+
fi
78+
6879

6980
### Compute Pool Id
7081
POOL_ID=$(CARDANO_CLI_CMD stake-pool id --cold-verification-key-file ${POOL_ARTIFACTS_DIR}/cold.vkey)

mithril-signer/Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ RUN /app/target/release/mithril-signer --version
3333
FROM debian:11-slim
3434

3535
# Args
36-
ARG CARDANO_NODE_VERSION=8.7.3
36+
ARG CARDANO_NODE_VERSION=8.9.0
3737
ARG CARDANO_BIN_URL=https://github.com/input-output-hk/cardano-node/releases/download/$CARDANO_NODE_VERSION/cardano-node-$CARDANO_NODE_VERSION-linux.tar.gz
3838

3939
# Upgrade
@@ -48,16 +48,16 @@ COPY --from=rustbuilder /app/target/release/mithril-signer /app/bin/mithril-sign
4848
# Copy the config files
4949
COPY --from=rustbuilder /app/mithril-signer/config /app/config
5050

51-
#Workdir
52-
WORKDIR /app/
53-
RUN chown -R appuser /app/
54-
5551
# Install cardano-cli
5652
RUN wget -nv -O cardano-bin.tar.gz $CARDANO_BIN_URL
57-
RUN tar xzf cardano-bin.tar.gz ./cardano-cli && mv cardano-cli /app/bin
53+
RUN (tar xzf cardano-bin.tar.gz ./bin/cardano-cli && mv /bin/cardano-cli /app/bin) || (tar xzf cardano-bin.tar.gz ./cardano-cli && mv cardano-cli /app/bin)
5854
RUN /app/bin/cardano-cli --version
5955
RUN rm -f cardano-bin.tar.gz
6056

57+
#Workdir
58+
WORKDIR /app/
59+
RUN chown -R appuser /app/
60+
6161
# Use an unprivileged user
6262
USER appuser
6363

mithril-signer/Dockerfile.ci

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ RUN mkdir -p /app/bin
1414
RUN apt-get update -y && apt-get install -y libssl-dev ca-certificates wget && apt-get clean && rm -rf /var/lib/apt/lists/*
1515

1616
# Install cardano-cli
17-
ARG CARDANO_NODE_VERSION=8.7.3
17+
ARG CARDANO_NODE_VERSION=8.9.0
1818
ARG CARDANO_BIN_URL=https://github.com/input-output-hk/cardano-node/releases/download/$CARDANO_NODE_VERSION/cardano-node-$CARDANO_NODE_VERSION-linux.tar.gz
1919
RUN wget -nv -O cardano-bin.tar.gz $CARDANO_BIN_URL \
20-
&& tar xzf cardano-bin.tar.gz ./cardano-cli && mv cardano-cli /app/bin \
20+
&& (tar xzf cardano-bin.tar.gz ./bin/cardano-cli && mv /bin/cardano-cli /app/bin) || (tar xzf cardano-bin.tar.gz ./cardano-cli && mv cardano-cli /app/bin) \
2121
&& /app/bin/cardano-cli --version \
2222
&& rm -f cardano-bin.tar.gz
2323

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

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ mkdir -p ${ARTIFACTS_DIR_TEMP}
44
# Step 1: Bootstrap the devnet artifacts
55
# Adapted from https://github.com/IntersectMBO/cardano-node/blob/master/scripts/babbage/mkfiles.sh
66

7+
# Is semver on the first argument strictly lower than equal to the second argument?
8+
version_lt() {
9+
VERSION_LHS=$1
10+
VERSION_RHS=$2
11+
if [ "${VERSION_LHS}" != "${VERSION_RHS}" ] && [ "${VERSION_LHS}" = "`echo -e "${VERSION_LHS}\n${VERSION_RHS}" | sort -V | head -n1`" ]; then
12+
echo "true"
13+
else
14+
echo "false"
15+
fi
16+
}
17+
718
UNAME=$(uname -s) SED=
819
case $UNAME in
920
Darwin ) SED="gsed";;
@@ -72,11 +83,17 @@ $CARDANO_CLI byron genesis genesis \
7283
cp $SCRIPT_DIRECTORY/configuration/babbage/alonzo-babbage-test-genesis.json "${ARTIFACTS_DIR_TEMP}/genesis.alonzo.spec.json"
7384
cp $SCRIPT_DIRECTORY/configuration/babbage/conway-babbage-test-genesis.json "${ARTIFACTS_DIR_TEMP}/genesis.conway.spec.json"
7485

75-
if [ "${CARDANO_NODE_VERSION}" = "8.1.2" ]; then
86+
if [ "${CARDANO_NODE_VERSION_RELEASE}" = "8.1.2" ]; then
7687
# Fix 8.1.2, to avoid the following error: 'Command failed: genesis create-staked Error: Error while decoding Shelley genesis at: example/genesis.conway.spec.json Error: Error in $: key "genDelegs" not found'
7788
mv ${ARTIFACTS_DIR_TEMP}/genesis.conway.spec.json ${ARTIFACTS_DIR_TEMP}/genesis.conway.spec.json.tmp && cat ${ARTIFACTS_DIR_TEMP}/genesis.conway.spec.json.tmp | jq '. += {"genDelegs":{}}' > ${ARTIFACTS_DIR_TEMP}/genesis.conway.spec.json && rm ${ARTIFACTS_DIR_TEMP}/genesis.conway.spec.json.tmp
7889
fi
7990

91+
if [ $(version_lt "${CARDANO_NODE_VERSION_RELEASE}" "8.8.0") = "false" ]; then
92+
# Fix >=8.8.0, to avoid the following errors: 'Command failed: genesis create-staked Error: Error: Error while decoding Shelley genesis at: ./temp/genesis.conway.spec.json Error: Error in $.poolVotingThresholds: key "motionNoConfidence" not found
93+
mv ${ARTIFACTS_DIR_TEMP}/genesis.conway.spec.json ${ARTIFACTS_DIR_TEMP}/genesis.conway.spec.json.tmp && cat ${ARTIFACTS_DIR_TEMP}/genesis.conway.spec.json.tmp | jq '. += {"poolVotingThresholds": {"motionNoConfidence": 0.51, "committeeNormal": 0.51, "committeeNoConfidence": 0.51, "hardForkInitiation": 0.51, "ppSecurityGroup": 0.51}, "dRepVotingThresholds": {"motionNoConfidence": 0.51, "committeeNormal": 0.51, "committeeNoConfidence": 0.51, "updateToConstitution": 0.51, "hardForkInitiation": 0.51, "ppNetworkGroup": 0.51, "ppEconomicGroup": 0.51, "ppTechnicalGroup": 0.51, "ppGovGroup": 0.51, "treasuryWithdrawal": 0.51}}' > ${ARTIFACTS_DIR_TEMP}/genesis.conway.spec.json && rm ${ARTIFACTS_DIR_TEMP}/genesis.conway.spec.json.tmp
94+
cat ${ARTIFACTS_DIR_TEMP}/genesis.conway.spec.json
95+
fi
96+
8097
cp $SCRIPT_DIRECTORY/configuration/byron/configuration.yaml "${ARTIFACTS_DIR_TEMP}/"
8198
$SED -i "${ARTIFACTS_DIR_TEMP}/configuration.yaml" \
8299
-e 's/Protocol: RealPBFT/Protocol: Cardano/' \
@@ -188,18 +205,6 @@ for ADDR in ${USER_ADDRS}; do
188205
--stake-verification-key-file addresses/${ADDR}-stake.vkey \
189206
--testnet-magic ${NETWORK_MAGIC} \
190207
--out-file addresses/${ADDR}-stake.addr
191-
192-
# Stake addresses registration certs
193-
./cardano-cli stake-address registration-certificate \
194-
--stake-verification-key-file addresses/${ADDR}-stake.vkey \
195-
--out-file addresses/${ADDR}-stake.reg.cert
208+
196209
done
197210

198-
# User N will delegate to pool N
199-
for N in ${POOL_NODES_N}; do
200-
# Stake address delegation certs
201-
./cardano-cli stake-address delegation-certificate \
202-
--stake-verification-key-file addresses/user${N}-stake.vkey \
203-
--cold-verification-key-file node-pool${N}/shelley/cold.vkey \
204-
--out-file addresses/user${N}-stake.deleg.cert
205-
done

0 commit comments

Comments
 (0)