Skip to content

Commit

Permalink
make withdrawal test more specific
Browse files Browse the repository at this point in the history
  • Loading branch information
pk910 committed Feb 5, 2024
1 parent 057bc9a commit 69a1fd4
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 33 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/_shared-run-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -225,14 +225,24 @@ jobs:
# helper to fetch task status for specific test id
get_tasks_status() {
tasks=$(curl -s ${assertoor_url}/test/$1?json | jq -c ".tasks[] | {index, name, title, status, result}")
tasks=$(curl -s ${assertoor_url}/test/$1?json | jq -c ".tasks[] | {index, parent_index, name, title, status, result}")
declare -A task_graph_map
task_graph_map[0]=""
while read task; do
task_id=$(echo "$task" | jq -r ".index")
task_parent=$(echo "$task" | jq -r ".parent_index")
task_name=$(echo "$task" | jq -r ".name")
task_title=$(echo "$task" | jq -r ".title")
task_status=$(echo "$task" | jq -r ".status")
task_result=$(echo "$task" | jq -r ".result")
task_graph="${task_graph_map[$task_parent]}"
task_graph_map[$task_id]="$task_graph |"
if [ ! -z "$task_graph" ]; then
task_graph="${task_graph}- "
fi
if [ "$task_status" == "pending" ]; then
task_status="${GRAY}pending ${NC}"
elif [ "$task_status" == "running" ]; then
Expand All @@ -249,7 +259,7 @@ jobs:
task_result="${RED}failure${NC}"
fi
echo -e " $task_id\t$task_status\t$task_result\t$task_name \t$task_title"
echo -e " $(printf '%-4s' "$task_id")\t$(printf '%-10s' "$task_graph")\t$task_status\t$task_result\t$(printf '%-20s' "$task_name") \t$task_title"
done <<< $(echo "$tasks")
}
Expand Down
104 changes: 79 additions & 25 deletions assertoor-tests/validator-withdrawal-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,37 +11,91 @@ tasks:
config:
minClientCount: 1

- name: run_task_background
title: "Check if all clients propose blocks with BLS changes"
- name: run_task_matrix
title: "Check if all clients propose blocks with BLS changes that are directly sent to them"
timeout: 1h
configVars:
matrixValues: "validatorPairNames"
config:
onBackgroundComplete: "fail"
backgroundTask:
name: generate_bls_changes
title: "Generate 50 BLS changes (1 bls change per slot)"
runConcurrent: false
matrixVar: "validatorPairName"
task:
name: run_tasks
title: "Check if ${validatorPairName} proposes blocks with BLS changes"
config:
limitTotal: 50
limitPerSlot: 1
indexCount: 100
targetAddress: 0x65D08a056c17Ae13370565B04cF77D2AfA1cB9FA
configVars:
mnemonic: "validatorMnemonic"

foregroundTask:
name: run_task_matrix
title: "Check bls change inclusion with all client pairs"
timeout: 1h
configVars:
matrixValues: "validatorPairNames"
tasks:
- name: check_consensus_proposer_duty
title: "Wait for ${validatorPairName} being selected for proposal in next slot"
configVars:
validatorNamePattern: "validatorPairName"
config:
maxSlotDistance: 1

- name: run_task_background
timeout: 2m
config:
onBackgroundComplete: "ignore"
backgroundTask:
name: generate_bls_changes
title: "Generate 2 BLS changes (1 bls change per slot) and send via ${validatorPairName}"
config:
limitTotal: 25
limitPerSlot: 1
indexCount: 50
targetAddress: 0x65D08a056c17Ae13370565B04cF77D2AfA1cB9FA
configVars:
mnemonic: "validatorMnemonic"
clientPattern: "validatorPairName" # this only works if client names == validator names
foregroundTask:
name: check_consensus_block_proposals
title: "Wait for block proposal with BLS changes from ${validatorPairName}"
configVars:
validatorNamePattern: "validatorPairName"
config:
minBlsChangeCount: 1

- name: run_task_matrix
title: "Check if all clients propose blocks with BLS changes that are sent via another client"
timeout: 1h
configVars:
matrixValues: "validatorPairNames"
config:
runConcurrent: false
matrixVar: "validatorPairName"
task:
name: run_tasks
title: "Check if ${validatorPairName} proposes blocks with BLS changes gossiped from another client"
config:
runConcurrent: true
matrixVar: "validatorPairName"
task:
name: check_consensus_block_proposals
title: "Wait for block proposal with BLS changes from ${validatorPairName}"
tasks:
- name: check_consensus_proposer_duty
title: "Wait for ${validatorPairName} being selected for proposal in next slot"
configVars:
validatorNamePattern: "validatorPairName"
config:
minBlsChangeCount: 1
maxSlotDistance: 2

- name: run_task_background
timeout: 2m
config:
onBackgroundComplete: "ignore"
backgroundTask:
name: generate_bls_changes
title: "Generate 2 BLS changes (1 bls change per slot) and send via another client"
config:
limitTotal: 25
limitPerSlot: 1
indexCount: 50
targetAddress: 0x65D08a056c17Ae13370565B04cF77D2AfA1cB9FA
configVars:
mnemonic: "validatorMnemonic"
excludeClientPattern: "validatorPairName" # this only works if client names == validator names
foregroundTask:
name: check_consensus_block_proposals
title: "Wait for block proposal with BLS changes from ${validatorPairName}"
configVars:
validatorNamePattern: "validatorPairName"
config:
minBlsChangeCount: 1

# ensure first 50 indexes have withdrawal address set
- name: generate_bls_changes
Expand Down
12 changes: 6 additions & 6 deletions tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ tests:
- lighthouse-geth,teku-erigon,nimbus-reth
- lighthouse-besu,prysm-reth,teku-geth
assertoorTests:
- assertoor-tests/stability-check.yaml
- assertoor-tests/block-proposal-check.yaml
- assertoor-tests/eoa-transactions-test.yaml
- assertoor-tests/all-opcodes-test.yaml
#- assertoor-tests/stability-check.yaml
#- assertoor-tests/block-proposal-check.yaml
#- assertoor-tests/eoa-transactions-test.yaml
#- assertoor-tests/all-opcodes-test.yaml
- assertoor-tests/validator-withdrawal-test.yaml
- assertoor-tests/validator-exit-test.yaml
- assertoor-tests/validator-slashing-test.yaml
#- assertoor-tests/validator-exit-test.yaml
#- assertoor-tests/validator-slashing-test.yaml

# kubetest
- id: "kubetest"
Expand Down

0 comments on commit 69a1fd4

Please sign in to comment.