@@ -21,7 +21,7 @@ CURRENT_EPOCH=\$(CARDANO_NODE_SOCKET_PATH=node-pool${N}/ipc/node.sock ./cardano-
21
21
--testnet-magic ${NETWORK_MAGIC} | jq .epoch)
22
22
echo ">>>> Current Epoch: \$ {CURRENT_EPOCH}"
23
23
24
- # Is semver on the first argument strictly lower than equal to the second argument?
24
+ # Is semver on the first argument strictly lower than the second argument?
25
25
version_lt() {
26
26
VERSION_LHS=\$ 1
27
27
VERSION_RHS=\$ 2
@@ -32,23 +32,26 @@ version_lt() {
32
32
fi
33
33
}
34
34
35
+ # Is semver on the first argument lower or equal to the second argument?
36
+ version_lte() {
37
+ VERSION_LHS=\$ 1
38
+ VERSION_RHS=\$ 2
39
+ if [ "\$ {VERSION_LHS}" == "\$ {VERSION_RHS}" ]; then
40
+ echo "true"
41
+ else
42
+ version_lt $VERSION_LHS $VERSION_RHS
43
+ fi
44
+ }
45
+
35
46
# Stake addresses registration certs
36
47
for ADDR in ${USER_ADDRS} ; do
37
- if [ \$ (version_lt "${CARDANO_NODE_VERSION_RELEASE} " "8.8.0") = "false" ]; then
38
- #KEY_REGISTRATION_DEPOSIT_ANOUNT=\$ (CARDANO_NODE_SOCKET_PATH=node-pool${N} /ipc/node.sock ./cardano-cli \$ {CURRENT_CARDANO_ERA} query gov-state --testnet-magic ${NETWORK_MAGIC} | jq -r .enactState.curPParams.keyDeposit)
48
+ if [ \$ (version_lt "${CARDANO_NODE_VERSION_RELEASE} " "8.8.0") == "false" ] && [ "\$ {CURRENT_CARDANO_ERA}" == "conway" ]; then
39
49
KEY_REGISTRATION_DEPOSIT_ANOUNT=0
40
- if [ "\$ {CURRENT_CARDANO_ERA}" == "conway" ]; then
41
- # Conway specific creation of registration certificate
42
- ./cardano-cli \$ {CURRENT_CARDANO_ERA} stake-address registration-certificate \
43
- --stake-verification-key-file addresses/\$ {ADDR}-stake.vkey \
44
- --out-file addresses/\$ {ADDR}-stake.reg.cert \
45
- --key-reg-deposit-amt \$ KEY_REGISTRATION_DEPOSIT_ANOUNT
46
- else
47
- # Legacy creation of registration certificate
48
- ./cardano-cli stake-address registration-certificate \
49
- --stake-verification-key-file addresses/\$ {ADDR}-stake.vkey \
50
- --out-file addresses/\$ {ADDR}-stake.reg.cert
51
- fi
50
+ # Conway specific creation of registration certificate
51
+ ./cardano-cli \$ {CURRENT_CARDANO_ERA} stake-address registration-certificate \
52
+ --stake-verification-key-file addresses/\$ {ADDR}-stake.vkey \
53
+ --out-file addresses/\$ {ADDR}-stake.reg.cert \
54
+ --key-reg-deposit-amt \$ KEY_REGISTRATION_DEPOSIT_ANOUNT
52
55
else
53
56
# Legacy creation of registration certificate
54
57
./cardano-cli stake-address registration-certificate \
62
65
# User N will delegate to pool N
63
66
for N in ${POOL_NODES_N} ; do
64
67
cat >> delegate.sh << EOF
65
- if [ \$ (version_lt "${CARDANO_NODE_VERSION_RELEASE} " "8.8.0 ") = "false" ]; then
68
+ if [ \$ (version_lte "${CARDANO_NODE_VERSION_RELEASE} " "8.1.2 ") = = "false" ]; then
66
69
# Stake address delegation certs
67
70
./cardano-cli \$ {CURRENT_CARDANO_ERA} stake-address stake-delegation-certificate \
68
71
--stake-verification-key-file addresses/user${N} -stake.vkey \
69
72
--cold-verification-key-file node-pool${N} /shelley/cold.vkey \
70
73
--out-file addresses/user${N} -stake.deleg.cert
71
74
else
72
- # Stake address delegation certs
75
+ # Legacy stake address delegation certs
73
76
./cardano-cli \$ {CURRENT_CARDANO_ERA} stake-address delegation-certificate \
74
77
--stake-verification-key-file addresses/user${N} -stake.vkey \
75
78
--cold-verification-key-file node-pool${N} /shelley/cold.vkey \
0 commit comments