@cardano-sdk/e2e 0.36.10 → 0.37.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +2 -1
- package/CHANGELOG.md +31 -0
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/cjs/util/util.d.ts.map +1 -1
- package/dist/cjs/util/util.js +3 -0
- package/dist/cjs/util/util.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/dist/esm/util/util.d.ts.map +1 -1
- package/dist/esm/util/util.js +3 -0
- package/dist/esm/util/util.js.map +1 -1
- package/docker-compose.yml +1 -0
- package/local-network/Dockerfile +20 -18
- package/local-network/scripts/install.sh +3 -3
- package/local-network/scripts/make-babbage.sh +8 -2
- package/local-network/scripts/pools/update-node-utils.sh +226 -159
- package/local-network/scripts/setup-new-delegator-keys.sh +2 -1
- package/local-network/scripts/start.sh +2 -0
- package/local-network/templates/babbage/alonzo-babbage-test-genesis.json +11 -1
- package/local-network/templates/babbage/conway-babbage-test-genesis.json +281 -22
- package/local-network/templates/babbage/db-sync-config.json +1 -0
- package/package.json +21 -21
- package/src/util/util.ts +3 -0
- package/test/wallet_epoch_0/PersonalWallet/txChainHistory.test.ts +2 -2
- package/test/{wallet_epoch_0 → wallet_epoch_3}/PersonalWallet/conwayTransactions.test.ts +104 -26
|
@@ -18,7 +18,7 @@ clean() {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
getAddressBalance() {
|
|
21
|
-
cardano-cli query utxo \
|
|
21
|
+
cardano-cli conway query utxo \
|
|
22
22
|
--address "$1" \
|
|
23
23
|
--testnet-magic 888 > ${SP_NODE_ID}/fullUtxo.out
|
|
24
24
|
|
|
@@ -53,15 +53,15 @@ updatePool() {
|
|
|
53
53
|
# Pool metadata hash (only compute it if a metadata url has been given)
|
|
54
54
|
if [ -n "$6" ]; then
|
|
55
55
|
METADATA_URL="$6"
|
|
56
|
-
METADATA_HASH=$(cardano-cli stake-pool metadata-hash --pool-metadata-file <(curl -s -L -k "${METADATA_URL}"))
|
|
56
|
+
METADATA_HASH=$(cardano-cli conway stake-pool metadata-hash --pool-metadata-file <(curl -s -L -k "${METADATA_URL}"))
|
|
57
57
|
fi
|
|
58
58
|
|
|
59
59
|
# get the protocol parameters
|
|
60
|
-
cardano-cli query protocol-parameters --testnet-magic 888 --out-file ${SP_NODE_ID}/params.json
|
|
60
|
+
cardano-cli conway query protocol-parameters --testnet-magic 888 --out-file ${SP_NODE_ID}/params.json
|
|
61
61
|
|
|
62
62
|
genesisVKey=network-files/utxo-keys/utxo${SP_NODE_ID}.vkey
|
|
63
63
|
genesisSKey=network-files/utxo-keys/utxo${SP_NODE_ID}.skey
|
|
64
|
-
genesisAddr=$(cardano-cli address build --payment-verification-key-file "$genesisVKey" --testnet-magic 888)
|
|
64
|
+
genesisAddr=$(cardano-cli conway address build --payment-verification-key-file "$genesisVKey" --testnet-magic 888)
|
|
65
65
|
|
|
66
66
|
stakeVKey=network-files/pools/staking-reward"${SP_NODE_ID}".vkey
|
|
67
67
|
stakeKey=network-files/pools/staking-reward"${SP_NODE_ID}".skey
|
|
@@ -75,12 +75,12 @@ updatePool() {
|
|
|
75
75
|
|
|
76
76
|
keyDeposit=2000000
|
|
77
77
|
|
|
78
|
-
POOL_ID=$(cardano-cli stake-pool id --cold-verification-key-file "$coldVKey" --output-format "hex")
|
|
78
|
+
POOL_ID=$(cardano-cli conway stake-pool id --cold-verification-key-file "$coldVKey" --output-format "hex")
|
|
79
79
|
|
|
80
80
|
# funding pool owner stake address
|
|
81
|
-
stakeAddr=$(cardano-cli address build --payment-verification-key-file "$genesisVKey" --stake-verification-key-file "$stakeVKey" --testnet-magic 888)
|
|
81
|
+
stakeAddr=$(cardano-cli conway address build --payment-verification-key-file "$genesisVKey" --stake-verification-key-file "$stakeVKey" --testnet-magic 888)
|
|
82
82
|
currentBalance=$(getAddressBalance "$stakeAddr")
|
|
83
|
-
utxo=$(cardano-cli query utxo --address "$genesisAddr" --testnet-magic 888 | awk 'NR == 3 {printf("%s#%s", $1, $2)}')
|
|
83
|
+
utxo=$(cardano-cli conway query utxo --address "$genesisAddr" --testnet-magic 888 | awk 'NR == 3 {printf("%s#%s", $1, $2)}')
|
|
84
84
|
|
|
85
85
|
cardano-cli conway transaction build \
|
|
86
86
|
--change-address "$genesisAddr" \
|
|
@@ -89,13 +89,13 @@ updatePool() {
|
|
|
89
89
|
--testnet-magic 888 \
|
|
90
90
|
--out-file ${SP_NODE_ID}/wallets-tx.raw 2>&1
|
|
91
91
|
|
|
92
|
-
cardano-cli transaction sign \
|
|
92
|
+
cardano-cli conway transaction sign \
|
|
93
93
|
--tx-body-file ${SP_NODE_ID}/wallets-tx.raw \
|
|
94
94
|
--signing-key-file "$genesisSKey" \
|
|
95
95
|
--testnet-magic 888 \
|
|
96
96
|
--out-file ${SP_NODE_ID}/wallets-tx.signed 2>&1
|
|
97
97
|
|
|
98
|
-
cardano-cli transaction submit --testnet-magic 888 --tx-file ${SP_NODE_ID}/wallets-tx.signed 2>&1
|
|
98
|
+
cardano-cli conway transaction submit --testnet-magic 888 --tx-file ${SP_NODE_ID}/wallets-tx.signed 2>&1
|
|
99
99
|
|
|
100
100
|
updatedBalance=$(getAddressBalance "$stakeAddr")
|
|
101
101
|
|
|
@@ -106,48 +106,60 @@ updatePool() {
|
|
|
106
106
|
|
|
107
107
|
# register pool owner stake address
|
|
108
108
|
currentBalance=$(getAddressBalance "$genesisAddr")
|
|
109
|
-
cardano-cli stake-address registration-certificate \
|
|
109
|
+
cardano-cli conway stake-address registration-certificate \
|
|
110
|
+
--key-reg-deposit-amt ${keyDeposit} \
|
|
110
111
|
--stake-verification-key-file "$stakeVKey" \
|
|
111
112
|
--out-file ${SP_NODE_ID}/pool-owner-registration.cert
|
|
112
113
|
|
|
113
|
-
utxo=$(cardano-cli query utxo --address "$genesisAddr" --testnet-magic 888 | awk 'NR == 3 {printf("%s#%s", $1, $2)}')
|
|
114
|
+
utxo=$(cardano-cli conway query utxo --address "$genesisAddr" --testnet-magic 888 | awk 'NR == 3 {printf("%s#%s", $1, $2)}')
|
|
114
115
|
|
|
115
|
-
cardano-cli transaction build-raw \
|
|
116
|
+
cardano-cli conway transaction build-raw \
|
|
116
117
|
--tx-in "$utxo" \
|
|
117
118
|
--tx-out "$genesisAddr"+0 \
|
|
118
119
|
--invalid-hereafter 5000000 \
|
|
119
120
|
--fee 0 \
|
|
120
|
-
--out-file ${SP_NODE_ID}/tx.
|
|
121
|
+
--out-file ${SP_NODE_ID}/tx.raw \
|
|
121
122
|
--certificate ${SP_NODE_ID}/pool-owner-registration.cert
|
|
122
123
|
|
|
123
|
-
|
|
124
|
-
--tx-body-file ${SP_NODE_ID}/tx.tmp \
|
|
125
|
-
--tx-in-count 1 \
|
|
126
|
-
--tx-out-count 1 \
|
|
127
|
-
--testnet-magic 888 \
|
|
128
|
-
--witness-count 2 \
|
|
129
|
-
--byron-witness-count 0 \
|
|
130
|
-
--protocol-params-file ${SP_NODE_ID}/params.json | awk '{ print $1 }')
|
|
131
|
-
|
|
132
|
-
initialBalance=$(getAddressBalance "$genesisAddr")
|
|
133
|
-
txOut=$((initialBalance - fee - keyDeposit))
|
|
134
|
-
|
|
135
|
-
cardano-cli transaction build-raw \
|
|
124
|
+
refScriptSize=$(cardano-cli conway query ref-script-size \
|
|
136
125
|
--tx-in "$utxo" \
|
|
137
|
-
--
|
|
138
|
-
--
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
126
|
+
--testnet-magic 888 \
|
|
127
|
+
--output-json | jq '.refInputScriptSize')
|
|
128
|
+
|
|
129
|
+
# Upon applying the fee, the tx size could increase, rendering the fee insuficient
|
|
130
|
+
# Calculate it twice, once with fee 0, then with the calculated fee, to minimise the
|
|
131
|
+
# chance that the tx size increases the second time
|
|
132
|
+
for i in {1..2}; do
|
|
133
|
+
fee=$(cardano-cli conway transaction calculate-min-fee \
|
|
134
|
+
--reference-script-size $refScriptSize \
|
|
135
|
+
--tx-body-file ${SP_NODE_ID}/tx.raw \
|
|
136
|
+
--tx-in-count 1 \
|
|
137
|
+
--tx-out-count 1 \
|
|
138
|
+
--testnet-magic 888 \
|
|
139
|
+
--witness-count 2 \
|
|
140
|
+
--byron-witness-count 0 \
|
|
141
|
+
--protocol-params-file ${SP_NODE_ID}/params.json | awk '{ print $1 }')
|
|
142
|
+
|
|
143
|
+
initialBalance=$(getAddressBalance "$genesisAddr")
|
|
144
|
+
txOut=$((initialBalance - fee - keyDeposit))
|
|
145
|
+
|
|
146
|
+
cardano-cli conway transaction build-raw \
|
|
147
|
+
--tx-in "$utxo" \
|
|
148
|
+
--tx-out "$genesisAddr"+"$txOut" \
|
|
149
|
+
--invalid-hereafter 5000000 \
|
|
150
|
+
--fee "$fee" \
|
|
151
|
+
--certificate ${SP_NODE_ID}/pool-owner-registration.cert \
|
|
152
|
+
--out-file ${SP_NODE_ID}/tx.raw
|
|
153
|
+
done
|
|
142
154
|
|
|
143
|
-
cardano-cli transaction sign \
|
|
155
|
+
cardano-cli conway transaction sign \
|
|
144
156
|
--tx-body-file ${SP_NODE_ID}/tx.raw \
|
|
145
157
|
--signing-key-file "$genesisSKey" \
|
|
146
158
|
--signing-key-file "$stakeKey" \
|
|
147
159
|
--testnet-magic 888 \
|
|
148
160
|
--out-file ${SP_NODE_ID}/tx.signed
|
|
149
161
|
|
|
150
|
-
cardano-cli transaction submit \
|
|
162
|
+
cardano-cli conway transaction submit \
|
|
151
163
|
--tx-file ${SP_NODE_ID}/tx.signed \
|
|
152
164
|
--testnet-magic 888
|
|
153
165
|
|
|
@@ -160,49 +172,60 @@ updatePool() {
|
|
|
160
172
|
|
|
161
173
|
# delegating pool owner stake
|
|
162
174
|
currentBalance=$(getAddressBalance "$genesisAddr")
|
|
163
|
-
cardano-cli stake-address delegation-certificate \
|
|
175
|
+
cardano-cli conway stake-address stake-delegation-certificate \
|
|
164
176
|
--stake-verification-key-file "$stakeVKey" \
|
|
165
177
|
--cold-verification-key-file "$coldVKey" \
|
|
166
178
|
--out-file ${SP_NODE_ID}/pool-owner-delegation.cert
|
|
167
179
|
|
|
168
|
-
utxo=$(cardano-cli query utxo --address "$genesisAddr" --testnet-magic 888 | awk 'NR == 3 {printf("%s#%s", $1, $2)}')
|
|
180
|
+
utxo=$(cardano-cli conway query utxo --address "$genesisAddr" --testnet-magic 888 | awk 'NR == 3 {printf("%s#%s", $1, $2)}')
|
|
169
181
|
|
|
170
|
-
cardano-cli transaction build-raw \
|
|
182
|
+
cardano-cli conway transaction build-raw \
|
|
171
183
|
--tx-in "$utxo" \
|
|
172
184
|
--tx-out "$genesisAddr"+0 \
|
|
173
185
|
--invalid-hereafter 5000000 \
|
|
174
186
|
--fee 0 \
|
|
175
|
-
--out-file ${SP_NODE_ID}/tx.
|
|
187
|
+
--out-file ${SP_NODE_ID}/tx.raw \
|
|
176
188
|
--certificate ${SP_NODE_ID}/pool-owner-delegation.cert
|
|
177
189
|
|
|
178
|
-
|
|
179
|
-
--tx-body-file ${SP_NODE_ID}/tx.tmp \
|
|
180
|
-
--tx-in-count 1 \
|
|
181
|
-
--tx-out-count 1 \
|
|
182
|
-
--testnet-magic 888 \
|
|
183
|
-
--witness-count 2 \
|
|
184
|
-
--byron-witness-count 0 \
|
|
185
|
-
--protocol-params-file ${SP_NODE_ID}/params.json | awk '{ print $1 }')
|
|
186
|
-
|
|
187
|
-
initialBalance=$(getAddressBalance "$genesisAddr")
|
|
188
|
-
txOut=$((initialBalance - fee))
|
|
189
|
-
|
|
190
|
-
cardano-cli transaction build-raw \
|
|
190
|
+
refScriptSize=$(cardano-cli conway query ref-script-size \
|
|
191
191
|
--tx-in "$utxo" \
|
|
192
|
-
--
|
|
193
|
-
--
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
192
|
+
--testnet-magic 888 \
|
|
193
|
+
--output-json | jq '.refInputScriptSize')
|
|
194
|
+
|
|
195
|
+
# Upon applying the fee, the tx size could increase, rendering the fee insuficient
|
|
196
|
+
# Calculate it twice, once with fee 0, then with the calculated fee, to minimise the
|
|
197
|
+
# chance that the tx size increases the second time
|
|
198
|
+
for i in {1..2}; do
|
|
199
|
+
fee=$(cardano-cli conway transaction calculate-min-fee \
|
|
200
|
+
--reference-script-size $refScriptSize \
|
|
201
|
+
--tx-body-file ${SP_NODE_ID}/tx.raw \
|
|
202
|
+
--tx-in-count 1 \
|
|
203
|
+
--tx-out-count 1 \
|
|
204
|
+
--testnet-magic 888 \
|
|
205
|
+
--witness-count 2 \
|
|
206
|
+
--byron-witness-count 0 \
|
|
207
|
+
--protocol-params-file ${SP_NODE_ID}/params.json | awk '{ print $1 }')
|
|
208
|
+
|
|
209
|
+
initialBalance=$(getAddressBalance "$genesisAddr")
|
|
210
|
+
txOut=$((initialBalance - fee))
|
|
211
|
+
|
|
212
|
+
cardano-cli conway transaction build-raw \
|
|
213
|
+
--tx-in "$utxo" \
|
|
214
|
+
--tx-out "$genesisAddr"+"$txOut" \
|
|
215
|
+
--invalid-hereafter 5000000 \
|
|
216
|
+
--fee "$fee" \
|
|
217
|
+
--certificate ${SP_NODE_ID}/pool-owner-delegation.cert \
|
|
218
|
+
--out-file ${SP_NODE_ID}/tx.raw
|
|
219
|
+
done
|
|
197
220
|
|
|
198
|
-
cardano-cli transaction sign \
|
|
221
|
+
cardano-cli conway transaction sign \
|
|
199
222
|
--tx-body-file ${SP_NODE_ID}/tx.raw \
|
|
200
223
|
--signing-key-file "$genesisSKey" \
|
|
201
224
|
--signing-key-file "$stakeKey" \
|
|
202
225
|
--testnet-magic 888 \
|
|
203
226
|
--out-file ${SP_NODE_ID}/tx.signed
|
|
204
227
|
|
|
205
|
-
cardano-cli transaction submit \
|
|
228
|
+
cardano-cli conway transaction submit \
|
|
206
229
|
--tx-file ${SP_NODE_ID}/tx.signed \
|
|
207
230
|
--testnet-magic 888
|
|
208
231
|
|
|
@@ -216,53 +239,64 @@ updatePool() {
|
|
|
216
239
|
# register delegator stake address
|
|
217
240
|
echo "Registering delegator stake certificate ${SP_NODE_ID}..."
|
|
218
241
|
|
|
219
|
-
paymentAddr=$(cardano-cli address build --payment-verification-key-file "$delegatorPaymentKey" --stake-verification-key-file "$delegatorStakeKey" --testnet-magic 888)
|
|
242
|
+
paymentAddr=$(cardano-cli conway address build --payment-verification-key-file "$delegatorPaymentKey" --stake-verification-key-file "$delegatorStakeKey" --testnet-magic 888)
|
|
220
243
|
currentBalance=$(getAddressBalance "$paymentAddr")
|
|
221
244
|
|
|
222
245
|
# create pool delegation certificate
|
|
223
|
-
cardano-cli stake-address delegation-certificate \
|
|
246
|
+
cardano-cli conway stake-address stake-delegation-certificate \
|
|
224
247
|
--stake-verification-key-file "$delegatorStakeKey" \
|
|
225
248
|
--stake-pool-id "$POOL_ID" \
|
|
226
249
|
--out-file ${SP_NODE_ID}/deleg.cert
|
|
227
250
|
|
|
228
|
-
utxo=$(cardano-cli query utxo --address "$paymentAddr" --testnet-magic 888 | awk 'NR == 3 {printf("%s#%s", $1, $2)}')
|
|
251
|
+
utxo=$(cardano-cli conway query utxo --address "$paymentAddr" --testnet-magic 888 | awk 'NR == 3 {printf("%s#%s", $1, $2)}')
|
|
229
252
|
|
|
230
|
-
cardano-cli transaction build-raw \
|
|
253
|
+
cardano-cli conway transaction build-raw \
|
|
231
254
|
--tx-in "$utxo" \
|
|
232
255
|
--tx-out "$paymentAddr"+0 \
|
|
233
256
|
--invalid-hereafter 5000000 \
|
|
234
257
|
--fee 0 \
|
|
235
|
-
--out-file ${SP_NODE_ID}/tx.
|
|
258
|
+
--out-file ${SP_NODE_ID}/tx.raw \
|
|
236
259
|
--certificate ${SP_NODE_ID}/deleg.cert
|
|
237
260
|
|
|
238
|
-
|
|
239
|
-
--tx-body-file ${SP_NODE_ID}/tx.tmp \
|
|
240
|
-
--tx-in-count 1 \
|
|
241
|
-
--tx-out-count 1 \
|
|
242
|
-
--testnet-magic 888 \
|
|
243
|
-
--witness-count 2 \
|
|
244
|
-
--byron-witness-count 0 \
|
|
245
|
-
--protocol-params-file ${SP_NODE_ID}/params.json | awk '{ print $1 }')
|
|
246
|
-
|
|
247
|
-
initialBalance=$(getAddressBalance "$paymentAddr")
|
|
248
|
-
txOut=$((initialBalance - fee))
|
|
249
|
-
|
|
250
|
-
cardano-cli transaction build-raw \
|
|
261
|
+
refScriptSize=$(cardano-cli conway query ref-script-size \
|
|
251
262
|
--tx-in "$utxo" \
|
|
252
|
-
--
|
|
253
|
-
--
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
263
|
+
--testnet-magic 888 \
|
|
264
|
+
--output-json | jq '.refInputScriptSize')
|
|
265
|
+
|
|
266
|
+
# Upon applying the fee, the tx size could increase, rendering the fee insuficient
|
|
267
|
+
# Calculate it twice, once with fee 0, then with the calculated fee, to minimise the
|
|
268
|
+
# chance that the tx size increases the second time
|
|
269
|
+
for i in {1..2}; do
|
|
270
|
+
fee=$(cardano-cli conway transaction calculate-min-fee \
|
|
271
|
+
--reference-script-size $refScriptSize \
|
|
272
|
+
--tx-body-file ${SP_NODE_ID}/tx.raw \
|
|
273
|
+
--tx-in-count 1 \
|
|
274
|
+
--tx-out-count 1 \
|
|
275
|
+
--testnet-magic 888 \
|
|
276
|
+
--witness-count 2 \
|
|
277
|
+
--byron-witness-count 0 \
|
|
278
|
+
--protocol-params-file ${SP_NODE_ID}/params.json | awk '{ print $1 }')
|
|
279
|
+
|
|
280
|
+
initialBalance=$(getAddressBalance "$paymentAddr")
|
|
281
|
+
txOut=$((initialBalance - fee))
|
|
282
|
+
|
|
283
|
+
cardano-cli conway transaction build-raw \
|
|
284
|
+
--tx-in "$utxo" \
|
|
285
|
+
--tx-out "$paymentAddr"+"$txOut" \
|
|
286
|
+
--invalid-hereafter 5000000 \
|
|
287
|
+
--fee "$fee" \
|
|
288
|
+
--certificate-file ${SP_NODE_ID}/deleg.cert \
|
|
289
|
+
--out-file ${SP_NODE_ID}/tx.raw
|
|
290
|
+
done
|
|
257
291
|
|
|
258
|
-
cardano-cli transaction sign \
|
|
292
|
+
cardano-cli conway transaction sign \
|
|
259
293
|
--tx-body-file ${SP_NODE_ID}/tx.raw \
|
|
260
294
|
--signing-key-file "$delegatorPaymentSKey" \
|
|
261
295
|
--signing-key-file "$delegatorStakeSKey" \
|
|
262
296
|
--testnet-magic 888 \
|
|
263
297
|
--out-file ${SP_NODE_ID}/tx.signed
|
|
264
298
|
|
|
265
|
-
cardano-cli transaction submit \
|
|
299
|
+
cardano-cli conway transaction submit \
|
|
266
300
|
--tx-file ${SP_NODE_ID}/tx.signed \
|
|
267
301
|
--testnet-magic 888
|
|
268
302
|
|
|
@@ -279,7 +313,7 @@ updatePool() {
|
|
|
279
313
|
|
|
280
314
|
# Only add metadata if given.
|
|
281
315
|
if [ -n "$6" ]; then
|
|
282
|
-
cardano-cli stake-pool registration-certificate \
|
|
316
|
+
cardano-cli conway stake-pool registration-certificate \
|
|
283
317
|
--cold-verification-key-file "$coldVKey" \
|
|
284
318
|
--vrf-verification-key-file "$vrfKey" \
|
|
285
319
|
--pool-pledge "$POOL_PLEDGE" \
|
|
@@ -294,7 +328,7 @@ updatePool() {
|
|
|
294
328
|
--metadata-hash "${METADATA_HASH}" \
|
|
295
329
|
--out-file ${SP_NODE_ID}/pool.cert
|
|
296
330
|
else
|
|
297
|
-
cardano-cli stake-pool registration-certificate \
|
|
331
|
+
cardano-cli conway stake-pool registration-certificate \
|
|
298
332
|
--cold-verification-key-file "$coldVKey" \
|
|
299
333
|
--vrf-verification-key-file "$vrfKey" \
|
|
300
334
|
--pool-pledge "$POOL_PLEDGE" \
|
|
@@ -308,37 +342,48 @@ updatePool() {
|
|
|
308
342
|
--out-file ${SP_NODE_ID}/pool.cert
|
|
309
343
|
fi
|
|
310
344
|
|
|
311
|
-
utxo=$(cardano-cli query utxo --address "$paymentAddr" --testnet-magic 888 | awk 'NR == 3 {printf("%s#%s", $1, $2)}')
|
|
345
|
+
utxo=$(cardano-cli conway query utxo --address "$paymentAddr" --testnet-magic 888 | awk 'NR == 3 {printf("%s#%s", $1, $2)}')
|
|
312
346
|
|
|
313
|
-
cardano-cli transaction build-raw \
|
|
347
|
+
cardano-cli conway transaction build-raw \
|
|
314
348
|
--tx-in "$utxo" \
|
|
315
349
|
--tx-out "$paymentAddr"+"$txOut" \
|
|
316
350
|
--invalid-hereafter 500000 \
|
|
317
351
|
--fee 0 \
|
|
318
352
|
--certificate-file ${SP_NODE_ID}/pool.cert \
|
|
319
|
-
--out-file ${SP_NODE_ID}/tx.
|
|
320
|
-
|
|
321
|
-
fee=$(cardano-cli transaction calculate-min-fee \
|
|
322
|
-
--tx-body-file ${SP_NODE_ID}/tx.tmp \
|
|
323
|
-
--tx-in-count 1 \
|
|
324
|
-
--tx-out-count 1 \
|
|
325
|
-
--testnet-magic 888 \
|
|
326
|
-
--witness-count 3 \
|
|
327
|
-
--byron-witness-count 0 \
|
|
328
|
-
--protocol-params-file ${SP_NODE_ID}/params.json | awk '{ print $1 }')
|
|
329
|
-
|
|
330
|
-
initialBalance=$(getAddressBalance "$paymentAddr")
|
|
331
|
-
txOut=$((initialBalance - fee))
|
|
353
|
+
--out-file ${SP_NODE_ID}/tx.raw
|
|
332
354
|
|
|
333
|
-
cardano-cli
|
|
355
|
+
refScriptSize=$(cardano-cli conway query ref-script-size \
|
|
334
356
|
--tx-in "$utxo" \
|
|
335
|
-
--
|
|
336
|
-
--
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
357
|
+
--testnet-magic 888 \
|
|
358
|
+
--output-json | jq '.refInputScriptSize')
|
|
359
|
+
|
|
360
|
+
# Upon applying the fee, the tx size could increase, rendering the fee insuficient
|
|
361
|
+
# Calculate it twice, once with fee 0, then with the calculated fee, to minimise the
|
|
362
|
+
# chance that the tx size increases the second time
|
|
363
|
+
for i in {1..2}; do
|
|
364
|
+
fee=$(cardano-cli conway transaction calculate-min-fee \
|
|
365
|
+
--reference-script-size $refScriptSize \
|
|
366
|
+
--tx-body-file ${SP_NODE_ID}/tx.raw \
|
|
367
|
+
--tx-in-count 1 \
|
|
368
|
+
--tx-out-count 1 \
|
|
369
|
+
--testnet-magic 888 \
|
|
370
|
+
--witness-count 3 \
|
|
371
|
+
--byron-witness-count 0 \
|
|
372
|
+
--protocol-params-file ${SP_NODE_ID}/params.json | awk '{ print $1 }')
|
|
373
|
+
|
|
374
|
+
initialBalance=$(getAddressBalance "$paymentAddr")
|
|
375
|
+
txOut=$((initialBalance - fee))
|
|
376
|
+
|
|
377
|
+
cardano-cli conway transaction build-raw \
|
|
378
|
+
--tx-in "$utxo" \
|
|
379
|
+
--tx-out "$paymentAddr"+"$txOut" \
|
|
380
|
+
--invalid-hereafter 500000 \
|
|
381
|
+
--fee "$fee" \
|
|
382
|
+
--certificate-file ${SP_NODE_ID}/pool.cert \
|
|
383
|
+
--out-file ${SP_NODE_ID}/tx.raw
|
|
384
|
+
done
|
|
340
385
|
|
|
341
|
-
cardano-cli transaction sign \
|
|
386
|
+
cardano-cli conway transaction sign \
|
|
342
387
|
--tx-body-file ${SP_NODE_ID}/tx.raw \
|
|
343
388
|
--signing-key-file "$delegatorPaymentSKey" \
|
|
344
389
|
--signing-key-file "$coldKey" \
|
|
@@ -346,7 +391,7 @@ updatePool() {
|
|
|
346
391
|
--testnet-magic 888 \
|
|
347
392
|
--out-file ${SP_NODE_ID}/tx.signed
|
|
348
393
|
|
|
349
|
-
cardano-cli transaction submit \
|
|
394
|
+
cardano-cli conway transaction submit \
|
|
350
395
|
--tx-file ${SP_NODE_ID}/tx.signed \
|
|
351
396
|
--testnet-magic 888
|
|
352
397
|
|
|
@@ -371,11 +416,11 @@ deregisterPool() {
|
|
|
371
416
|
done
|
|
372
417
|
|
|
373
418
|
# get the protocol parameters
|
|
374
|
-
cardano-cli query protocol-parameters --testnet-magic 888 --out-file ${SP_NODE_ID}/params.json
|
|
419
|
+
cardano-cli conway query protocol-parameters --testnet-magic 888 --out-file ${SP_NODE_ID}/params.json
|
|
375
420
|
|
|
376
421
|
genesisVKey=network-files/utxo-keys/utxo${SP_NODE_ID}.vkey
|
|
377
422
|
genesisSKey=network-files/utxo-keys/utxo${SP_NODE_ID}.skey
|
|
378
|
-
genesisAddr=$(cardano-cli address build --payment-verification-key-file "$genesisVKey" --testnet-magic 888)
|
|
423
|
+
genesisAddr=$(cardano-cli conway address build --payment-verification-key-file "$genesisVKey" --testnet-magic 888)
|
|
379
424
|
stakeKey=network-files/pools/staking-reward"${SP_NODE_ID}".skey
|
|
380
425
|
coldVKey=network-files/pools/cold"${SP_NODE_ID}".vkey
|
|
381
426
|
coldKey=network-files/pools/cold"${SP_NODE_ID}".skey
|
|
@@ -387,55 +432,66 @@ deregisterPool() {
|
|
|
387
432
|
# We are going to redelegate this stake to dbSync can index it properly.
|
|
388
433
|
echo "Registering delegator stake certificate ${SP_NODE_ID}..."
|
|
389
434
|
|
|
390
|
-
paymentAddr=$(cardano-cli address build --payment-verification-key-file "$delegatorPaymentKey" --stake-verification-key-file "$delegatorStakeKey" --testnet-magic 888)
|
|
435
|
+
paymentAddr=$(cardano-cli conway address build --payment-verification-key-file "$delegatorPaymentKey" --stake-verification-key-file "$delegatorStakeKey" --testnet-magic 888)
|
|
391
436
|
currentBalance=$(getAddressBalance "$paymentAddr")
|
|
392
437
|
|
|
393
|
-
POOL_ID=$(cardano-cli stake-pool id --cold-verification-key-file "$coldVKey" --output-format "hex")
|
|
438
|
+
POOL_ID=$(cardano-cli conway stake-pool id --cold-verification-key-file "$coldVKey" --output-format "hex")
|
|
394
439
|
|
|
395
440
|
# create pool delegation certificate
|
|
396
|
-
cardano-cli stake-address delegation-certificate \
|
|
441
|
+
cardano-cli conway stake-address stake-delegation-certificate \
|
|
397
442
|
--stake-verification-key-file "$delegatorStakeKey" \
|
|
398
443
|
--stake-pool-id "$POOL_ID" \
|
|
399
444
|
--out-file ${SP_NODE_ID}/deleg.cert
|
|
400
445
|
|
|
401
|
-
utxo=$(cardano-cli query utxo --address "$paymentAddr" --testnet-magic 888 | awk 'NR == 3 {printf("%s#%s", $1, $2)}')
|
|
446
|
+
utxo=$(cardano-cli conway query utxo --address "$paymentAddr" --testnet-magic 888 | awk 'NR == 3 {printf("%s#%s", $1, $2)}')
|
|
402
447
|
|
|
403
|
-
cardano-cli transaction build-raw \
|
|
448
|
+
cardano-cli conway transaction build-raw \
|
|
404
449
|
--tx-in "$utxo" \
|
|
405
450
|
--tx-out "$paymentAddr"+0 \
|
|
406
451
|
--invalid-hereafter 5000000 \
|
|
407
452
|
--fee 0 \
|
|
408
|
-
--out-file ${SP_NODE_ID}/tx.
|
|
453
|
+
--out-file ${SP_NODE_ID}/tx.raw \
|
|
409
454
|
--certificate ${SP_NODE_ID}/deleg.cert
|
|
410
455
|
|
|
411
|
-
|
|
412
|
-
--tx-body-file ${SP_NODE_ID}/tx.tmp \
|
|
413
|
-
--tx-in-count 1 \
|
|
414
|
-
--tx-out-count 1 \
|
|
415
|
-
--testnet-magic 888 \
|
|
416
|
-
--witness-count 2 \
|
|
417
|
-
--byron-witness-count 0 \
|
|
418
|
-
--protocol-params-file ${SP_NODE_ID}/params.json | awk '{ print $1 }')
|
|
419
|
-
|
|
420
|
-
initialBalance=$(getAddressBalance "$paymentAddr")
|
|
421
|
-
txOut=$((initialBalance - fee))
|
|
422
|
-
|
|
423
|
-
cardano-cli transaction build-raw \
|
|
456
|
+
refScriptSize=$(cardano-cli conway query ref-script-size \
|
|
424
457
|
--tx-in "$utxo" \
|
|
425
|
-
--
|
|
426
|
-
--
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
458
|
+
--testnet-magic 888 \
|
|
459
|
+
--output-json | jq '.refInputScriptSize')
|
|
460
|
+
|
|
461
|
+
# Upon applying the fee, the tx size could increase, rendering the fee insuficient
|
|
462
|
+
# Calculate it twice, once with fee 0, then with the calculated fee, to minimise the
|
|
463
|
+
# chance that the tx size increases the second time
|
|
464
|
+
for i in {1..2}; do
|
|
465
|
+
fee=$(cardano-cli conway transaction calculate-min-fee \
|
|
466
|
+
--reference-script-size $refScriptSize \
|
|
467
|
+
--tx-body-file ${SP_NODE_ID}/tx.raw \
|
|
468
|
+
--tx-in-count 1 \
|
|
469
|
+
--tx-out-count 1 \
|
|
470
|
+
--testnet-magic 888 \
|
|
471
|
+
--witness-count 2 \
|
|
472
|
+
--byron-witness-count 0 \
|
|
473
|
+
--protocol-params-file ${SP_NODE_ID}/params.json | awk '{ print $1 }')
|
|
474
|
+
|
|
475
|
+
initialBalance=$(getAddressBalance "$paymentAddr")
|
|
476
|
+
txOut=$((initialBalance - fee))
|
|
477
|
+
|
|
478
|
+
cardano-cli conway transaction build-raw \
|
|
479
|
+
--tx-in "$utxo" \
|
|
480
|
+
--tx-out "$paymentAddr"+"$txOut" \
|
|
481
|
+
--invalid-hereafter 5000000 \
|
|
482
|
+
--fee "$fee" \
|
|
483
|
+
--certificate-file ${SP_NODE_ID}/deleg.cert \
|
|
484
|
+
--out-file ${SP_NODE_ID}/tx.raw
|
|
485
|
+
done
|
|
430
486
|
|
|
431
|
-
cardano-cli transaction sign \
|
|
487
|
+
cardano-cli conway transaction sign \
|
|
432
488
|
--tx-body-file ${SP_NODE_ID}/tx.raw \
|
|
433
489
|
--signing-key-file "$delegatorPaymentSKey" \
|
|
434
490
|
--signing-key-file "$delegatorStakeSKey" \
|
|
435
491
|
--testnet-magic 888 \
|
|
436
492
|
--out-file ${SP_NODE_ID}/tx.signed
|
|
437
493
|
|
|
438
|
-
cardano-cli transaction submit \
|
|
494
|
+
cardano-cli conway transaction submit \
|
|
439
495
|
--tx-file ${SP_NODE_ID}/tx.signed \
|
|
440
496
|
--testnet-magic 888
|
|
441
497
|
|
|
@@ -450,42 +506,53 @@ deregisterPool() {
|
|
|
450
506
|
echo "Deregister stake pool ${SP_NODE_ID}..."
|
|
451
507
|
currentBalance=$(getAddressBalance "$genesisAddr")
|
|
452
508
|
|
|
453
|
-
cardano-cli stake-pool deregistration-certificate \
|
|
509
|
+
cardano-cli conway stake-pool deregistration-certificate \
|
|
454
510
|
--cold-verification-key-file "$coldVKey" \
|
|
455
511
|
--epoch "$RETIRING_EPOCH" \
|
|
456
512
|
--out-file ${SP_NODE_ID}/pool.dereg
|
|
457
513
|
|
|
458
|
-
utxo=$(cardano-cli query utxo --address "$genesisAddr" --testnet-magic 888 | awk 'NR == 3 {printf("%s#%s", $1, $2)}')
|
|
514
|
+
utxo=$(cardano-cli conway query utxo --address "$genesisAddr" --testnet-magic 888 | awk 'NR == 3 {printf("%s#%s", $1, $2)}')
|
|
459
515
|
|
|
460
|
-
cardano-cli transaction build-raw \
|
|
516
|
+
cardano-cli conway transaction build-raw \
|
|
461
517
|
--tx-in "$utxo" \
|
|
462
518
|
--tx-out "$genesisAddr"+0 \
|
|
463
519
|
--invalid-hereafter 500000 \
|
|
464
520
|
--fee 0 \
|
|
465
521
|
--certificate-file ${SP_NODE_ID}/pool.dereg \
|
|
466
|
-
--out-file ${SP_NODE_ID}/tx.
|
|
467
|
-
|
|
468
|
-
fee=$(cardano-cli transaction calculate-min-fee \
|
|
469
|
-
--tx-body-file ${SP_NODE_ID}/tx.tmp \
|
|
470
|
-
--tx-in-count 1 \
|
|
471
|
-
--tx-out-count 1 \
|
|
472
|
-
--testnet-magic 888 \
|
|
473
|
-
--witness-count 3 \
|
|
474
|
-
--byron-witness-count 0 \
|
|
475
|
-
--protocol-params-file ${SP_NODE_ID}/params.json | awk '{ print $1 }')
|
|
476
|
-
|
|
477
|
-
initialBalance=$(getAddressBalance "$genesisAddr")
|
|
478
|
-
txOut=$((initialBalance - fee))
|
|
522
|
+
--out-file ${SP_NODE_ID}/tx.raw
|
|
479
523
|
|
|
480
|
-
cardano-cli
|
|
524
|
+
refScriptSize=$(cardano-cli conway query ref-script-size \
|
|
481
525
|
--tx-in "$utxo" \
|
|
482
|
-
--
|
|
483
|
-
--
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
526
|
+
--testnet-magic 888 \
|
|
527
|
+
--output-json | jq '.refInputScriptSize')
|
|
528
|
+
|
|
529
|
+
# Upon applying the fee, the tx size could increase, rendering the fee insuficient
|
|
530
|
+
# Calculate it twice, once with fee 0, then with the calculated fee, to minimise the
|
|
531
|
+
# chance that the tx size increases the second time
|
|
532
|
+
for i in {1..2}; do
|
|
533
|
+
fee=$(cardano-cli conway transaction calculate-min-fee \
|
|
534
|
+
--reference-script-size $refScriptSize \
|
|
535
|
+
--tx-body-file ${SP_NODE_ID}/tx.raw \
|
|
536
|
+
--tx-in-count 1 \
|
|
537
|
+
--tx-out-count 1 \
|
|
538
|
+
--testnet-magic 888 \
|
|
539
|
+
--witness-count 3 \
|
|
540
|
+
--byron-witness-count 0 \
|
|
541
|
+
--protocol-params-file ${SP_NODE_ID}/params.json | awk '{ print $1 }')
|
|
542
|
+
|
|
543
|
+
initialBalance=$(getAddressBalance "$genesisAddr")
|
|
544
|
+
txOut=$((initialBalance - fee))
|
|
545
|
+
|
|
546
|
+
cardano-cli conway transaction build-raw \
|
|
547
|
+
--tx-in "$utxo" \
|
|
548
|
+
--tx-out "$genesisAddr"+"$txOut" \
|
|
549
|
+
--invalid-hereafter 500000 \
|
|
550
|
+
--fee "$fee" \
|
|
551
|
+
--certificate-file ${SP_NODE_ID}/pool.dereg \
|
|
552
|
+
--out-file ${SP_NODE_ID}/tx.raw
|
|
553
|
+
done
|
|
487
554
|
|
|
488
|
-
cardano-cli transaction sign \
|
|
555
|
+
cardano-cli conway transaction sign \
|
|
489
556
|
--tx-body-file ${SP_NODE_ID}/tx.raw \
|
|
490
557
|
--signing-key-file "$genesisSKey" \
|
|
491
558
|
--signing-key-file "$coldKey" \
|
|
@@ -493,7 +560,7 @@ deregisterPool() {
|
|
|
493
560
|
--testnet-magic 888 \
|
|
494
561
|
--out-file ${SP_NODE_ID}/tx.signed
|
|
495
562
|
|
|
496
|
-
cardano-cli transaction submit \
|
|
563
|
+
cardano-cli conway transaction submit \
|
|
497
564
|
--tx-file ${SP_NODE_ID}/tx.signed \
|
|
498
565
|
--testnet-magic 888
|
|
499
566
|
|
|
@@ -141,13 +141,14 @@ cardano-cli conway query utxo --whole-utxo --testnet-magic $NETWORK_MAGIC
|
|
|
141
141
|
|
|
142
142
|
echo "Registering $(cat "${DELEGATORS_DIR}/payment${NODE_ID}.addr")"
|
|
143
143
|
|
|
144
|
+
keyDeposit=2000000
|
|
144
145
|
stakeAddr="$(cat "${DELEGATORS_DIR}/payment1.addr")"
|
|
145
146
|
currentBalance=$(getAddressBalance "$stakeAddr")
|
|
146
147
|
|
|
147
148
|
for NODE_ID in ${SP_NODES_ID}; do
|
|
148
149
|
cardano-cli conway stake-address registration-certificate \
|
|
149
150
|
--stake-verification-key-file "${DELEGATORS_DIR}/staking${NODE_ID}.vkey" \
|
|
150
|
-
--key-reg-deposit-amt
|
|
151
|
+
--key-reg-deposit-amt ${keyDeposit} \
|
|
151
152
|
--out-file "${TRANSACTIONS_DIR}/staking${NODE_ID}reg.cert"
|
|
152
153
|
|
|
153
154
|
cardano-cli conway transaction build \
|
|
@@ -28,6 +28,8 @@ echo "Run"
|
|
|
28
28
|
./scripts/make-babbage.sh
|
|
29
29
|
./network-files/run/all.sh &
|
|
30
30
|
|
|
31
|
+
if [ -d /sdk-ipc ] ; then cp -a config/network /sdk-ipc/config ; fi
|
|
32
|
+
|
|
31
33
|
export CARDANO_NODE_SOCKET_PATH=$PWD/network-files/node-sp1/node.sock
|
|
32
34
|
|
|
33
35
|
while [ ! -S "$CARDANO_NODE_SOCKET_PATH" ]; do
|
|
@@ -366,7 +366,17 @@
|
|
|
366
366
|
"verifyEd25519Signature-memory-arguments": 10,
|
|
367
367
|
"verifySchnorrSecp256k1Signature-cpu-arguments-intercept": 38887044,
|
|
368
368
|
"verifySchnorrSecp256k1Signature-cpu-arguments-slope": 32947,
|
|
369
|
-
"verifySchnorrSecp256k1Signature-memory-arguments": 10
|
|
369
|
+
"verifySchnorrSecp256k1Signature-memory-arguments": 10,
|
|
370
|
+
"integerToByteString-cpu-arguments-c0": 10,
|
|
371
|
+
"integerToByteString-cpu-arguments-c1": 10,
|
|
372
|
+
"integerToByteString-cpu-arguments-c2": 10,
|
|
373
|
+
"integerToByteString-memory-arguments-intercept": 10,
|
|
374
|
+
"integerToByteString-memory-arguments-slope": 10,
|
|
375
|
+
"byteStringToInteger-cpu-arguments-c0": 10,
|
|
376
|
+
"byteStringToInteger-cpu-arguments-c1": 10,
|
|
377
|
+
"byteStringToInteger-cpu-arguments-c2": 10,
|
|
378
|
+
"byteStringToInteger-memory-arguments-intercept": 10,
|
|
379
|
+
"byteStringToInteger-memory-arguments-slope": 10
|
|
370
380
|
}
|
|
371
381
|
}
|
|
372
382
|
}
|