Skip to content

fix: wait for the Leios voting committee epoch - #3650

Merged
mkoura merged 1 commit into
masterfrom
leios_voting_epoch
Aug 21, 2026
Merged

fix: wait for the Leios voting committee epoch#3650
mkoura merged 1 commit into
masterfrom
leios_voting_epoch

Conversation

@mkoura

@mkoura mkoura commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

The Leios voting committee is drawn from a stake distribution snapshot that stays empty until epoch 3 on a freshly started cluster instance. Until then every pool answers each EB announcement with NotOnCommittee, so no EB can be voted on or certified.

test_eb_logs searched for votes and certificates from the moment it started, which on a fresh instance was always before epoch 3, so the vote and certificate messages could never show up. Wait for the epoch in which the committee becomes active, and schedule the test at the end of the testrun so the wait is normally a no-op.

Add test_no_voting_before_committee_epoch, scheduled near the start of the testrun, to check the other side of the same behavior: no vote and no certificate is reported before epoch 3, while the pools do report that they are not on the committee. The searched log window must not cross an epoch boundary, otherwise a vote from epoch 3 could land in it, so wait_for_epoch_interval positions the search early enough in an epoch for the whole window to fit into it. The epoch and the position in it are read from a single tip before that wait, so the test skips right away instead of burning a whole epoch when no epoch before the voting one has room left. The epoch is read again after the wait and after the search, as only the second read tells which epoch the search ran in.

The Leios voting committee is drawn from a stake distribution snapshot
that stays empty until epoch 3 on a freshly started cluster instance.
Until then every pool answers each EB announcement with
`NotOnCommittee`, so no EB can be voted on or certified.

`test_eb_logs` searched for votes and certificates from the moment it
started, which on a fresh instance was always before epoch 3, so the
vote and certificate messages could never show up. Wait for the epoch
in which the committee becomes active, and schedule the test at the end
of the testrun so the wait is normally a no-op.

Add `test_no_voting_before_committee_epoch`, scheduled near the start of
the testrun, to check the other side of the same behavior: no vote and
no certificate is reported before epoch 3, while the pools do report
that they are not on the committee. The searched log window must not
cross an epoch boundary, otherwise a vote from epoch 3 could land in it,
so `wait_for_epoch_interval` positions the search early enough in an
epoch for the whole window to fit into it. The epoch and the position in
it are read from a single tip before that wait, so the test skips right
away instead of burning a whole epoch when no epoch before the voting
one has room left. The epoch is read again after the wait and after the
search, as only the second read tells which epoch the search ran in.
@mkoura
mkoura requested a review from saratomaz as a code owner August 21, 2026 12:52
@mkoura
mkoura merged commit 4484013 into master Aug 21, 2026
3 checks passed
@mkoura
mkoura deleted the leios_voting_epoch branch August 21, 2026 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant