Skip to content

Commit 54b3a39

Browse files
committed
add fillup-deposit-queue.yaml test
1 parent 294ea22 commit 54b3a39

1 file changed

Lines changed: 95 additions & 0 deletions

File tree

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
2+
id: fillup-deposit-queue
3+
name: "Fillup deposit queue"
4+
timeout: 1h
5+
config:
6+
walletPrivkey: ""
7+
depositCount: 1010
8+
depositMaxIndex: 100
9+
depositContract: "0x4242424242424242424242424242424242424242"
10+
tasks:
11+
- name: check_clients_are_healthy
12+
title: "Check if at least one client is ready"
13+
timeout: 5m
14+
config:
15+
minClientCount: 1
16+
17+
- name: run_shell
18+
id: prepare
19+
title: "Prepare workers"
20+
config:
21+
envVars:
22+
depositCount: "depositCount"
23+
depositMaxIndex: "depositMaxIndex"
24+
command: |
25+
depositCount=$(echo $depositCount | jq -r .)
26+
depositMaxIndex=$(echo $depositMaxIndex | jq -r .)
27+
28+
minDepositCount=$(expr $depositCount \/ $depositMaxIndex)
29+
plusOneDepositCount=$(expr $depositCount - $minDepositCount \* $depositMaxIndex)
30+
31+
workers="[]"
32+
33+
while read index; do
34+
depositCount=$minDepositCount
35+
if [ "$index" -lt "$plusOneDepositCount" ]; then
36+
depositCount=$(expr $depositCount + 1)
37+
fi
38+
39+
worker=$(echo "{\"index\": $index, \"depositCount\": $depositCount}" )
40+
workers=$(echo $workers | jq -c ". += [$worker]")
41+
done <<< $(seq 0 1 $(expr $depositMaxIndex - 1))
42+
43+
echo "::set-out-json workers $workers"
44+
45+
- name: run_task_matrix
46+
title: "Generate ${depositCount} topup deposits for first ${depositMaxIndex} keys"
47+
configVars:
48+
matrixValues: "tasks.prepare.outputs.workers"
49+
config:
50+
runConcurrent: true
51+
matrixVar: "worker"
52+
task:
53+
name: run_tasks
54+
title: "Generate ${{worker.depositCount}} topup deposits for key ${{worker.index}}"
55+
config:
56+
tasks:
57+
- name: check_consensus_validator_status
58+
title: "Get validator pubkey for key ${{worker.index}}"
59+
id: "get_validator"
60+
timeout: 1m
61+
configVars:
62+
validatorIndex: "worker.index"
63+
64+
- name: generate_child_wallet
65+
id: depositor_wallet
66+
title: "Generate wallet for lifecycle test"
67+
configVars:
68+
walletSeed: "| \"fillup-deposit-queue-\" + (.worker.index | tostring)"
69+
prefundMinBalance: "| (.worker.depositCount + 1) * 1000000000000000000"
70+
privateKey: "walletPrivkey"
71+
72+
- name: sleep
73+
title: "Sleep 10s to ensure propagation of last block with wallet fundings to all clients"
74+
config:
75+
duration: 10s
76+
77+
- name: run_task_options
78+
title: "Generate ${{worker.depositCount}} top up deposits with 1 ETH each"
79+
config:
80+
task:
81+
name: generate_deposits
82+
title: "Generate top up deposits for key ${{worker.index}} (${{tasks.get_validator.outputs.pubkey}})"
83+
config:
84+
limitPerSlot: 20
85+
limitPending: 40
86+
depositAmount: 1
87+
topUpDeposit: true
88+
awaitReceipt: true
89+
failOnReject: true
90+
configVars:
91+
limitTotal: "worker.depositCount"
92+
walletPrivkey: "tasks.depositor_wallet.outputs.childWallet.privkey"
93+
publicKey: "tasks.get_validator.outputs.pubkey"
94+
depositContract: "depositContract"
95+

0 commit comments

Comments
 (0)