@cardano-sdk/e2e 0.18.0 → 0.19.1
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 +1 -1
- package/CHANGELOG.md +19 -0
- package/dist/cjs/factories.d.ts.map +1 -1
- package/dist/cjs/factories.js +3 -6
- package/dist/cjs/factories.js.map +1 -1
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/esm/factories.d.ts.map +1 -1
- package/dist/esm/factories.js +3 -6
- package/dist/esm/factories.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/docker-compose.yml +8 -0
- package/local-network/README.md +1 -1
- package/local-network/scripts/cardano-node-ogmios.sh +1 -1
- package/local-network/scripts/get-epoch.sh +0 -1
- package/local-network/scripts/make-babbage.sh +61 -61
- package/local-network/scripts/mint-handles.sh +1 -1
- package/local-network/scripts/mint-tokens.sh +0 -1
- package/local-network/scripts/mnemonic_keys.sh +7 -7
- package/local-network/scripts/nodes-configuration.sh +1 -1
- package/local-network/scripts/plutus-transaction.sh +8 -10
- package/local-network/scripts/pools/update-node-utils.sh +210 -221
- package/local-network/scripts/reference-input-transaction.sh +30 -38
- package/local-network/scripts/start.sh +1 -2
- package/local-network/templates/babbage/byron-configuration.yaml +9 -14
- package/package.json +19 -19
- package/src/factories.ts +3 -14
- package/test/k6/README.md +3 -4
- package/test/projection/offline-fork.test.ts +1 -1
- package/test/projection/single-tenant-utxo.test.ts +2 -2
- package/test/tsconfig.json +1 -0
|
@@ -21,38 +21,37 @@ clean() {
|
|
|
21
21
|
|
|
22
22
|
getAddressBalance() {
|
|
23
23
|
cardano-cli query utxo \
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
--address "$1" \
|
|
25
|
+
--testnet-magic 888 >fullUtxo.out
|
|
26
26
|
|
|
27
|
-
tail -n +3 fullUtxo.out | sort -k3 -nr >
|
|
27
|
+
tail -n +3 fullUtxo.out | sort -k3 -nr >balance.out
|
|
28
28
|
|
|
29
29
|
total_balance=0
|
|
30
30
|
while read -r utxo; do
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
done <
|
|
31
|
+
utxo_balance=$(awk '{ print $3 }' <<<"${utxo}")
|
|
32
|
+
total_balance=$(("$total_balance" + "$utxo_balance"))
|
|
33
|
+
done <balance.out
|
|
34
34
|
|
|
35
35
|
echo ${total_balance}
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
getBiggestUtxo() {
|
|
39
39
|
cardano-cli query utxo \
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
--address "$1" \
|
|
41
|
+
--testnet-magic 888 >fullUtxo.out
|
|
42
42
|
|
|
43
|
-
tail -n +3 fullUtxo.out | sort -k3 -nr >
|
|
43
|
+
tail -n +3 fullUtxo.out | sort -k3 -nr >balance.out
|
|
44
44
|
|
|
45
45
|
current_biggest=0
|
|
46
46
|
utxo_id=''
|
|
47
47
|
while read -r utxo; do
|
|
48
|
-
utxo_balance=$(awk '{ print $3 }' <<<
|
|
48
|
+
utxo_balance=$(awk '{ print $3 }' <<<"${utxo}")
|
|
49
49
|
|
|
50
|
-
if [[
|
|
51
|
-
then
|
|
50
|
+
if [[ $utxo_balance -ge $current_biggest ]]; then
|
|
52
51
|
current_biggest=$utxo_balance
|
|
53
|
-
utxo_id=$(awk '{printf("%s#%s", $1, $2)}' <<<
|
|
52
|
+
utxo_id=$(awk '{printf("%s#%s", $1, $2)}' <<<"${utxo}")
|
|
54
53
|
fi
|
|
55
|
-
done <
|
|
54
|
+
done <balance.out
|
|
56
55
|
|
|
57
56
|
echo "${utxo_id} ${current_biggest}"
|
|
58
57
|
}
|
|
@@ -67,7 +66,7 @@ done
|
|
|
67
66
|
# LOCK REFERENCE UTXO
|
|
68
67
|
|
|
69
68
|
genesisAddr=$(cardano-cli address build --payment-verification-key-file network-files/utxo-keys/utxo2.vkey --testnet-magic 888)
|
|
70
|
-
utxo=$(awk '{printf("%s", $1)}' <<<
|
|
69
|
+
utxo=$(awk '{printf("%s", $1)}' <<<"$(getBiggestUtxo "$genesisAddr")")
|
|
71
70
|
currentBalance=$(getAddressBalance "$REFERENCE_INPUT_ADDR")
|
|
72
71
|
|
|
73
72
|
echo "Locking reference UTXO..."
|
|
@@ -95,8 +94,7 @@ cardano-cli transaction submit --testnet-magic 888 --tx-file tx-script.signed
|
|
|
95
94
|
|
|
96
95
|
updatedBalance=$(getAddressBalance "$REFERENCE_INPUT_ADDR")
|
|
97
96
|
|
|
98
|
-
while [ "$currentBalance" -eq "$updatedBalance" ]
|
|
99
|
-
do
|
|
97
|
+
while [ "$currentBalance" -eq "$updatedBalance" ]; do
|
|
100
98
|
updatedBalance=$(getAddressBalance "$REFERENCE_INPUT_ADDR")
|
|
101
99
|
sleep 1
|
|
102
100
|
done
|
|
@@ -105,7 +103,7 @@ echo "Locked"
|
|
|
105
103
|
# LOCK REFERENCE SCRIPT UTXO
|
|
106
104
|
|
|
107
105
|
genesisAddr=$(cardano-cli address build --payment-verification-key-file network-files/utxo-keys/utxo2.vkey --testnet-magic 888)
|
|
108
|
-
utxo=$(awk '{printf("%s", $1)}' <<<
|
|
106
|
+
utxo=$(awk '{printf("%s", $1)}' <<<"$(getBiggestUtxo "$genesisAddr")")
|
|
109
107
|
currentBalance=$(getAddressBalance "$REFERENCE_SCRIPT_ADDR")
|
|
110
108
|
|
|
111
109
|
echo "Locking reference script UTXO (Multisignature)..."
|
|
@@ -130,15 +128,14 @@ cardano-cli transaction submit --testnet-magic 888 --tx-file tx-script.signed
|
|
|
130
128
|
|
|
131
129
|
updatedBalance=$(getAddressBalance "$REFERENCE_SCRIPT_ADDR")
|
|
132
130
|
|
|
133
|
-
while [ "$currentBalance" -eq "$updatedBalance" ]
|
|
134
|
-
do
|
|
131
|
+
while [ "$currentBalance" -eq "$updatedBalance" ]; do
|
|
135
132
|
updatedBalance=$(getAddressBalance "$REFERENCE_SCRIPT_ADDR")
|
|
136
133
|
sleep 1
|
|
137
134
|
done
|
|
138
135
|
echo "Locked"
|
|
139
136
|
|
|
140
137
|
genesisAddr=$(cardano-cli address build --payment-verification-key-file network-files/utxo-keys/utxo2.vkey --testnet-magic 888)
|
|
141
|
-
utxo=$(awk '{printf("%s", $1)}' <<<
|
|
138
|
+
utxo=$(awk '{printf("%s", $1)}' <<<"$(getBiggestUtxo "$genesisAddr")")
|
|
142
139
|
currentBalance=$(getAddressBalance "$REFERENCE_SCRIPT_ADDR")
|
|
143
140
|
|
|
144
141
|
echo "Locking reference script UTXO (Timelock)..."
|
|
@@ -163,15 +160,14 @@ cardano-cli transaction submit --testnet-magic 888 --tx-file tx-script.signed
|
|
|
163
160
|
|
|
164
161
|
updatedBalance=$(getAddressBalance "$REFERENCE_SCRIPT_ADDR")
|
|
165
162
|
|
|
166
|
-
while [ "$currentBalance" -eq "$updatedBalance" ]
|
|
167
|
-
do
|
|
163
|
+
while [ "$currentBalance" -eq "$updatedBalance" ]; do
|
|
168
164
|
updatedBalance=$(getAddressBalance "$REFERENCE_SCRIPT_ADDR")
|
|
169
165
|
sleep 1
|
|
170
166
|
done
|
|
171
167
|
echo "Locked"
|
|
172
168
|
|
|
173
169
|
genesisAddr=$(cardano-cli address build --payment-verification-key-file network-files/utxo-keys/utxo2.vkey --testnet-magic 888)
|
|
174
|
-
utxo=$(awk '{printf("%s", $1)}' <<<
|
|
170
|
+
utxo=$(awk '{printf("%s", $1)}' <<<"$(getBiggestUtxo "$genesisAddr")")
|
|
175
171
|
currentBalance=$(getAddressBalance "$REFERENCE_SCRIPT_ADDR")
|
|
176
172
|
|
|
177
173
|
echo "Locking reference script UTXO (Plutus V1)..."
|
|
@@ -196,15 +192,14 @@ cardano-cli transaction submit --testnet-magic 888 --tx-file tx-script.signed
|
|
|
196
192
|
|
|
197
193
|
updatedBalance=$(getAddressBalance "$REFERENCE_SCRIPT_ADDR")
|
|
198
194
|
|
|
199
|
-
while [ "$currentBalance" -eq "$updatedBalance" ]
|
|
200
|
-
do
|
|
195
|
+
while [ "$currentBalance" -eq "$updatedBalance" ]; do
|
|
201
196
|
updatedBalance=$(getAddressBalance "$REFERENCE_SCRIPT_ADDR")
|
|
202
197
|
sleep 1
|
|
203
198
|
done
|
|
204
199
|
echo "Locked"
|
|
205
200
|
|
|
206
201
|
genesisAddr=$(cardano-cli address build --payment-verification-key-file network-files/utxo-keys/utxo2.vkey --testnet-magic 888)
|
|
207
|
-
utxo=$(awk '{printf("%s", $1)}' <<<
|
|
202
|
+
utxo=$(awk '{printf("%s", $1)}' <<<"$(getBiggestUtxo "$genesisAddr")")
|
|
208
203
|
currentBalance=$(getAddressBalance "$REFERENCE_SCRIPT_ADDR")
|
|
209
204
|
|
|
210
205
|
echo "Locking reference script UTXO (Plutus V2)..."
|
|
@@ -229,8 +224,7 @@ cardano-cli transaction submit --testnet-magic 888 --tx-file tx-script.signed
|
|
|
229
224
|
|
|
230
225
|
updatedBalance=$(getAddressBalance "$REFERENCE_SCRIPT_ADDR")
|
|
231
226
|
|
|
232
|
-
while [ "$currentBalance" -eq "$updatedBalance" ]
|
|
233
|
-
do
|
|
227
|
+
while [ "$currentBalance" -eq "$updatedBalance" ]; do
|
|
234
228
|
updatedBalance=$(getAddressBalance "$REFERENCE_SCRIPT_ADDR")
|
|
235
229
|
sleep 1
|
|
236
230
|
done
|
|
@@ -238,7 +232,7 @@ echo "Locked"
|
|
|
238
232
|
|
|
239
233
|
# LOCK FUNDS IN SCRIPT
|
|
240
234
|
echo "Locking funds in script..."
|
|
241
|
-
utxo=$(awk '{printf("%s", $1)}' <<<
|
|
235
|
+
utxo=$(awk '{printf("%s", $1)}' <<<"$(getBiggestUtxo "$genesisAddr")")
|
|
242
236
|
currentBalance=$(getAddressBalance "$REFERENCE_INPUT_SCRIPT_ADDR")
|
|
243
237
|
|
|
244
238
|
cardano-cli transaction build \
|
|
@@ -261,8 +255,7 @@ cardano-cli transaction submit --testnet-magic 888 --tx-file test-babbage.signed
|
|
|
261
255
|
|
|
262
256
|
updatedBalance=$(getAddressBalance "$REFERENCE_INPUT_SCRIPT_ADDR")
|
|
263
257
|
|
|
264
|
-
while [ "$currentBalance" -eq "$updatedBalance" ]
|
|
265
|
-
do
|
|
258
|
+
while [ "$currentBalance" -eq "$updatedBalance" ]; do
|
|
266
259
|
updatedBalance=$(getAddressBalance "$REFERENCE_INPUT_SCRIPT_ADDR")
|
|
267
260
|
sleep 1
|
|
268
261
|
done
|
|
@@ -270,10 +263,10 @@ echo "Locked"
|
|
|
270
263
|
|
|
271
264
|
# UNLOCK FUNDS
|
|
272
265
|
echo "Unlocking funds from script..."
|
|
273
|
-
utxo=$(awk '{printf("%s", $1)}' <<<
|
|
274
|
-
utxoVal=$(awk '{printf("%s", $2)}' <<<
|
|
275
|
-
referenceInputUtxo=$(awk '{printf("%s", $1)}' <<<
|
|
276
|
-
scriptUtxo=$(awk '{printf("%s", $1)}' <<<
|
|
266
|
+
utxo=$(awk '{printf("%s", $1)}' <<<"$(getBiggestUtxo "$genesisAddr")")
|
|
267
|
+
utxoVal=$(awk '{printf("%s", $2)}' <<<"$(getBiggestUtxo "$genesisAddr")")
|
|
268
|
+
referenceInputUtxo=$(awk '{printf("%s", $1)}' <<<"$(getBiggestUtxo "$REFERENCE_INPUT_ADDR")")
|
|
269
|
+
scriptUtxo=$(awk '{printf("%s", $1)}' <<<"$(getBiggestUtxo "$REFERENCE_INPUT_SCRIPT_ADDR")")
|
|
277
270
|
currentBalance=$(getAddressBalance "$REFERENCE_INPUT_SCRIPT_ADDR")
|
|
278
271
|
returnCollateralVal=$(("$utxoVal" - 1450000))
|
|
279
272
|
|
|
@@ -303,8 +296,7 @@ cardano-cli transaction submit --testnet-magic 888 --tx-file test-babbage2.signe
|
|
|
303
296
|
|
|
304
297
|
updatedBalance=$(getAddressBalance "$REFERENCE_INPUT_SCRIPT_ADDR")
|
|
305
298
|
|
|
306
|
-
while [ "$currentBalance" -eq "$updatedBalance" ]
|
|
307
|
-
do
|
|
299
|
+
while [ "$currentBalance" -eq "$updatedBalance" ]; do
|
|
308
300
|
updatedBalance=$(getAddressBalance "$REFERENCE_INPUT_SCRIPT_ADDR")
|
|
309
301
|
sleep 1
|
|
310
302
|
done
|
|
@@ -23,8 +23,7 @@ echo "Run"
|
|
|
23
23
|
./network-files/run/all.sh &
|
|
24
24
|
|
|
25
25
|
for ID in ${SP_NODES_ID}; do
|
|
26
|
-
if [ -f "./scripts/pools/update-node-sp$ID.sh" ]; # Only update the pool if a script exists for that pool.
|
|
27
|
-
then
|
|
26
|
+
if [ -f "./scripts/pools/update-node-sp$ID.sh" ]; then # Only update the pool if a script exists for that pool.
|
|
28
27
|
CARDANO_NODE_SOCKET_PATH=$PWD/network-files/node-sp"$ID"/node.sock ./scripts/pools/update-node-sp"$ID".sh
|
|
29
28
|
fi
|
|
30
29
|
done
|
|
@@ -3,16 +3,15 @@
|
|
|
3
3
|
############### Cardano Byron Node Configuration #########
|
|
4
4
|
##########################################################
|
|
5
5
|
|
|
6
|
-
|
|
7
6
|
##### Locations #####
|
|
8
7
|
|
|
9
8
|
GenesisFile: genesis.json
|
|
10
9
|
|
|
11
10
|
##### Hashes Protocol
|
|
12
11
|
|
|
13
|
-
ByronGenesisHash:
|
|
14
|
-
ShelleyGenesisHash:
|
|
15
|
-
AlonzoGenesisHash:
|
|
12
|
+
ByronGenesisHash: '576a1b4687c7668b2f1d734fecaa7ca994b597f37177606d4942d339875009d6'
|
|
13
|
+
ShelleyGenesisHash: '4315428096763404ae322ce69eea7323c94dead3281cd306b5be7e80288626ce'
|
|
14
|
+
AlonzoGenesisHash: 'eaa32942a4f2b3028928cb47be679bb36fa128f6d7dddc04ae592d27f2818c16'
|
|
16
15
|
|
|
17
16
|
##### Blockfetch Protocol
|
|
18
17
|
|
|
@@ -48,7 +47,6 @@ LastKnownBlockVersion-Alt: 0
|
|
|
48
47
|
ApplicationName: cardano-sl
|
|
49
48
|
ApplicationVersion: 1
|
|
50
49
|
|
|
51
|
-
|
|
52
50
|
##### Logging configuration #####
|
|
53
51
|
|
|
54
52
|
# Enable or disable logging overall
|
|
@@ -120,7 +118,7 @@ defaultBackends:
|
|
|
120
118
|
# be specified in the defaults below or overridden on a per-scribe basis here.
|
|
121
119
|
setupScribes:
|
|
122
120
|
- scKind: FileSK
|
|
123
|
-
scName:
|
|
121
|
+
scName: 'logs/testnet.log'
|
|
124
122
|
scFormat: ScText
|
|
125
123
|
|
|
126
124
|
- scKind: StdoutSK
|
|
@@ -131,7 +129,7 @@ setupScribes:
|
|
|
131
129
|
# output is sent to if it is not configured to be sent to other scribes.
|
|
132
130
|
defaultScribes:
|
|
133
131
|
- - FileSK
|
|
134
|
-
-
|
|
132
|
+
- 'logs/testnet.log'
|
|
135
133
|
- - StdoutSK
|
|
136
134
|
- stdout
|
|
137
135
|
|
|
@@ -139,9 +137,8 @@ defaultScribes:
|
|
|
139
137
|
# in the setupScribes above for specific scribes.
|
|
140
138
|
rotation:
|
|
141
139
|
rpLogLimitBytes: 5000000
|
|
142
|
-
rpKeepFilesNum:
|
|
143
|
-
rpMaxAgeHours:
|
|
144
|
-
|
|
140
|
+
rpKeepFilesNum: 3
|
|
141
|
+
rpMaxAgeHours: 24
|
|
145
142
|
|
|
146
143
|
##### Coarse grained logging control #####
|
|
147
144
|
|
|
@@ -258,7 +255,6 @@ TraceTxOutbound: False
|
|
|
258
255
|
# Trace TxSubmission protocol messages.
|
|
259
256
|
TraceTxSubmissionProtocol: False
|
|
260
257
|
|
|
261
|
-
|
|
262
258
|
##### Fine grained logging control #####
|
|
263
259
|
|
|
264
260
|
# It is also possible to have more fine grained control over filtering of
|
|
@@ -267,7 +263,6 @@ TraceTxSubmissionProtocol: False
|
|
|
267
263
|
# much more precise control.
|
|
268
264
|
|
|
269
265
|
options:
|
|
270
|
-
|
|
271
266
|
# This routes metrics matching specific names to particular backends.
|
|
272
267
|
# This overrides the 'defaultBackends' listed above. And note that it is
|
|
273
268
|
# an override and not an extension so anything matched here will not
|
|
@@ -280,11 +275,11 @@ options:
|
|
|
280
275
|
# type and its name, separated by "::":
|
|
281
276
|
mapScribes:
|
|
282
277
|
cardano.node.metrics:
|
|
283
|
-
-
|
|
278
|
+
- 'FileSK::logs/testnet.log'
|
|
284
279
|
|
|
285
280
|
# apply a filter on message severity on messages in a specific named context.
|
|
286
281
|
# this filter is applied additionally to the global 'minSeverity' and thus
|
|
287
282
|
# needs to be at least as high.
|
|
288
283
|
mapSeverity:
|
|
289
284
|
cardano.node.ChainDB: Notice
|
|
290
|
-
cardano.node.DnsSubscription: Debug
|
|
285
|
+
cardano.node.DnsSubscription: Debug
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cardano-sdk/e2e",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.1",
|
|
4
4
|
"description": "End to end tests for the cardano-js-sdk packages.",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=16.20.1"
|
|
@@ -81,19 +81,19 @@
|
|
|
81
81
|
"dependencies": {
|
|
82
82
|
"@cardano-foundation/ledgerjs-hw-app-cardano": "^6.0.0",
|
|
83
83
|
"@cardano-ogmios/client": "5.6.0",
|
|
84
|
-
"@cardano-sdk/cardano-services": "~0.
|
|
85
|
-
"@cardano-sdk/cardano-services-client": "~0.
|
|
86
|
-
"@cardano-sdk/core": "~0.
|
|
87
|
-
"@cardano-sdk/crypto": "~0.1.
|
|
88
|
-
"@cardano-sdk/hardware-ledger": "~0.3.
|
|
89
|
-
"@cardano-sdk/input-selection": "~0.11.
|
|
90
|
-
"@cardano-sdk/key-management": "~0.
|
|
91
|
-
"@cardano-sdk/ogmios": "~0.12.
|
|
92
|
-
"@cardano-sdk/tx-construction": "~0.
|
|
93
|
-
"@cardano-sdk/util": "~0.13.
|
|
94
|
-
"@cardano-sdk/util-dev": "~0.
|
|
95
|
-
"@cardano-sdk/util-rxjs": "~0.5.
|
|
96
|
-
"@cardano-sdk/wallet": "~0.
|
|
84
|
+
"@cardano-sdk/cardano-services": "~0.16.0",
|
|
85
|
+
"@cardano-sdk/cardano-services-client": "~0.12.0",
|
|
86
|
+
"@cardano-sdk/core": "~0.17.0",
|
|
87
|
+
"@cardano-sdk/crypto": "~0.1.11",
|
|
88
|
+
"@cardano-sdk/hardware-ledger": "~0.3.1",
|
|
89
|
+
"@cardano-sdk/input-selection": "~0.11.6",
|
|
90
|
+
"@cardano-sdk/key-management": "~0.10.0",
|
|
91
|
+
"@cardano-sdk/ogmios": "~0.12.15",
|
|
92
|
+
"@cardano-sdk/tx-construction": "~0.11.0",
|
|
93
|
+
"@cardano-sdk/util": "~0.13.2",
|
|
94
|
+
"@cardano-sdk/util-dev": "~0.15.0",
|
|
95
|
+
"@cardano-sdk/util-rxjs": "~0.5.7",
|
|
96
|
+
"@cardano-sdk/wallet": "~0.20.1",
|
|
97
97
|
"@vespaiach/axios-fetch-adapter": "^0.3.0",
|
|
98
98
|
"axios": "^0.27.2",
|
|
99
99
|
"bunyan": "^1.8.15",
|
|
@@ -122,10 +122,10 @@
|
|
|
122
122
|
"@babel/core": "^7.18.2",
|
|
123
123
|
"@babel/preset-env": "^7.18.2",
|
|
124
124
|
"@babel/preset-typescript": "^7.17.12",
|
|
125
|
-
"@cardano-sdk/dapp-connector": "~0.9.
|
|
126
|
-
"@cardano-sdk/projection": "~0.7.
|
|
127
|
-
"@cardano-sdk/projection-typeorm": "~0.4.
|
|
128
|
-
"@cardano-sdk/web-extension": "~0.14.
|
|
125
|
+
"@cardano-sdk/dapp-connector": "~0.9.13",
|
|
126
|
+
"@cardano-sdk/projection": "~0.7.1",
|
|
127
|
+
"@cardano-sdk/projection-typeorm": "~0.4.1",
|
|
128
|
+
"@cardano-sdk/web-extension": "~0.14.4",
|
|
129
129
|
"@dcspark/cardano-multiplatform-lib-browser": "^3.1.1",
|
|
130
130
|
"@emurgo/cardano-message-signing-asmjs": "^1.0.1",
|
|
131
131
|
"@types/bunyan": "^1.8.8",
|
|
@@ -177,5 +177,5 @@
|
|
|
177
177
|
"webpack-cli": "^4.9.2",
|
|
178
178
|
"webpack-merge": "^5.8.0"
|
|
179
179
|
},
|
|
180
|
-
"gitHead": "
|
|
180
|
+
"gitHead": "1541bc3f0abaef0ec6119426ad2471f0a2aaf420"
|
|
181
181
|
}
|
package/src/factories.ts
CHANGED
|
@@ -309,7 +309,7 @@ const patchInitializeTxToRespectEpochBoundary = <T extends ObservableWallet>(
|
|
|
309
309
|
* @returns an object containing the wallet and providers passed to it
|
|
310
310
|
*/
|
|
311
311
|
export const getWallet = async (props: GetWalletProps) => {
|
|
312
|
-
const { env, idx, logger, name, polling,
|
|
312
|
+
const { env, idx, logger, name, polling, stores, customKeyParams, keyAgent } = props;
|
|
313
313
|
const providers = {
|
|
314
314
|
addressDiscovery: await addressDiscoveryFactory.create(
|
|
315
315
|
env.ADDRESS_DISCOVERY,
|
|
@@ -328,18 +328,7 @@ export const getWallet = async (props: GetWalletProps) => {
|
|
|
328
328
|
env.CHAIN_HISTORY_PROVIDER_PARAMS,
|
|
329
329
|
logger
|
|
330
330
|
),
|
|
331
|
-
handleProvider: await handleProviderFactory.create(
|
|
332
|
-
env.HANDLE_PROVIDER,
|
|
333
|
-
{
|
|
334
|
-
...env.HANDLE_PROVIDER_PARAMS,
|
|
335
|
-
networkInfoProvider: await networkInfoProviderFactory.create(
|
|
336
|
-
env.NETWORK_INFO_PROVIDER,
|
|
337
|
-
env.NETWORK_INFO_PROVIDER_PARAMS,
|
|
338
|
-
logger
|
|
339
|
-
)
|
|
340
|
-
},
|
|
341
|
-
logger
|
|
342
|
-
),
|
|
331
|
+
handleProvider: await handleProviderFactory.create(env.HANDLE_PROVIDER, env.HANDLE_PROVIDER_PARAMS, logger),
|
|
343
332
|
networkInfoProvider: await networkInfoProviderFactory.create(
|
|
344
333
|
env.NETWORK_INFO_PROVIDER,
|
|
345
334
|
env.NETWORK_INFO_PROVIDER_PARAMS,
|
|
@@ -368,7 +357,7 @@ export const getWallet = async (props: GetWalletProps) => {
|
|
|
368
357
|
? () => Promise.resolve(keyAgent)
|
|
369
358
|
: await keyManagementFactory.create(env.KEY_MANAGEMENT_PROVIDER, keyManagementParams, logger),
|
|
370
359
|
createWallet: async (asyncKeyAgent: AsyncKeyAgent) =>
|
|
371
|
-
new PersonalWallet({
|
|
360
|
+
new PersonalWallet({ name, polling }, { ...providers, keyAgent: asyncKeyAgent, logger, stores }),
|
|
372
361
|
logger
|
|
373
362
|
});
|
|
374
363
|
|
package/test/k6/README.md
CHANGED
|
@@ -4,18 +4,17 @@
|
|
|
4
4
|
|
|
5
5
|
1. [K6 installed locally](https://k6.io/docs/get-started/installation/). Needed for `k6 run the-test.js`.
|
|
6
6
|
1. Metrics dashboards & reports: install [K6 Dashboards extension](https://github.com/szkiba/xk6-dashboard#download)
|
|
7
|
-
|
|
7
|
+
- **Make sure you are using `k6` binary downloaded/built from `xk6-dashboard` project** when running or replaying\*\*.
|
|
8
8
|
Otherwise the command will fail with `invalid output type 'dashboard', available types are`.
|
|
9
|
-
|
|
9
|
+
- K6 dashboards are available by default in: http://127.0.0.1:5665
|
|
10
10
|
|
|
11
11
|
## Running
|
|
12
12
|
|
|
13
13
|
- Without K6 dashboards:
|
|
14
|
-
|
|
14
|
+
`k6 run test-file.js --out json=test-file-out.json --out csv=test-file-out.csv`
|
|
15
15
|
|
|
16
16
|
- With K6 dashboards while test is running.
|
|
17
17
|
`k6 run test-file.js --out json=test-file-out.json --out csv=test-file-out.csv --out dashboard`
|
|
18
18
|
|
|
19
19
|
- Open K6 dashboards for a previous run. The `json` out file is needed.
|
|
20
20
|
`k6 dashboard replay test-file-out.json`
|
|
21
|
-
|
|
@@ -121,7 +121,7 @@ describe('resuming projection when intersection is not local tip', () => {
|
|
|
121
121
|
buffer: StabilityWindowBuffer,
|
|
122
122
|
into: ProjectionOperator<Mappers.WithStakeKeys>
|
|
123
123
|
) =>
|
|
124
|
-
Bootstrap.fromCardanoNode({ buffer, cardanoNode, logger }).pipe(
|
|
124
|
+
Bootstrap.fromCardanoNode({ blocksBufferLength: 10, buffer, cardanoNode, logger }).pipe(
|
|
125
125
|
Mappers.withCertificates(),
|
|
126
126
|
Mappers.withStakeKeys(),
|
|
127
127
|
into,
|
|
@@ -100,7 +100,7 @@ describe('single-tenant utxo projection', () => {
|
|
|
100
100
|
afterEach(async () => cleanup());
|
|
101
101
|
|
|
102
102
|
const projectMultiTenant = () =>
|
|
103
|
-
Bootstrap.fromCardanoNode({ buffer, cardanoNode, logger }).pipe(
|
|
103
|
+
Bootstrap.fromCardanoNode({ blocksBufferLength: 10, buffer, cardanoNode, logger }).pipe(
|
|
104
104
|
Mappers.withMint(),
|
|
105
105
|
Mappers.withUtxo(),
|
|
106
106
|
Postgres.withTypeormTransaction({ dataSource$: of(dataSource), logger }),
|
|
@@ -123,7 +123,7 @@ describe('single-tenant utxo projection', () => {
|
|
|
123
123
|
);
|
|
124
124
|
|
|
125
125
|
const projectSingleTenant = (addresses: Cardano.PaymentAddress[]) =>
|
|
126
|
-
Bootstrap.fromCardanoNode({ buffer, cardanoNode, logger }).pipe(
|
|
126
|
+
Bootstrap.fromCardanoNode({ blocksBufferLength: 10, buffer, cardanoNode, logger }).pipe(
|
|
127
127
|
Mappers.withMint(),
|
|
128
128
|
Mappers.withUtxo(),
|
|
129
129
|
Mappers.filterProducedUtxoByAddresses({ addresses }),
|