Test Details Overview

Observe online representatives in elections and count only principal ones (#5321)

* Keep every tallied vote within the online set

An election expired only when the active elections loop ticked it, so
with the request loop disabled or a tick running late it could still
tally votes from representatives that had since dropped out of the
online set. Every path that can tally, a vote, a block or a vote
broadcast, now expires an overdue election first.

The representative of a vote that reaches an election is now marked
online by the election itself, before it tallies, instead of by the
vote router, and a debug assert checks that every voter in a ballot
counts as online. The weight minimum for online representatives now
applies only to votes that come too late for their election and to rep
crawler replies, the paths open to anyone.

* Count only principal representatives as online

A vote that arrives after its election ended and a reply to a rep
crawler query both mark their representative as online. Both accepted
any representative above the vote weight minimum, while only the votes
of principal representatives reach an election. The online weight sets
the quorum delta, so it should hold only weight an election can tally.

Both paths now require the principal status of the vote context, the
same one the vote router admits votes to elections by.

Tests pin each way into the online set for both kinds of
representative, and that a cached vote is not delivered once its
representative is no longer principal.

* Read the clock for each election the loop ticks

The election loop took one timestamp for a whole batch, so an election
processed late in the batch was judged, for expiry and pacing, by the
time the batch started. Each election is now ticked with the time it is
processed.

Also test that an overdue election expires when a block is published
to it, next to the existing case for a vote.

__________

Type: commit

Hash: 7d2d7fb95d7fbbf3773e54b7575d13ecc363b9ce

Created: yesterday

__________

gr0v1ty/nano-node:7d2d7fb95d7fbbf3773e54b7575d13ecc363b9ce

Test Results

Test Case Status Duration Median Deviation Log Graph
No test results available yet. Check the GitHub test run for job status and logs.