Test Details Overview

Report the winner tally and per-block final tallies in confirmation_info (#5300)

* Rename vote_info::final () to is_final ()

Name the predicate like nano::vote::is_final_timestamp, which it wraps.

* Expose per-block vote weights from the election ballot

The ballot already computes both the total and the final-only vote
weight behind every voted-for hash, but only the totals left it, through
the ordered tally. Make that pair a public nano::block_weight and add
election_ballot::weights (), which lists every held block and every
voted-for hash with both weights, including hashes the ballot does not
hold. Its overload sums votes that votes_with_weight () already weighed,
without another weight query.

The extended election status takes its votes from votes_with_weight ()
and its block weights from those same votes, in place of the vote map
and the ordered tally, so a block's weight is always exactly what its
voters carry. confirmation_info lists voters with these weights instead
of reading each rep's weight from the ledger again, which could
disagree with the block's tally if weights moved in between, and looks
blocks up by hash instead of rebuilding a hash map from the tally.

* Report the winner tally and per-block final tallies in confirmation_info

confirmation_info reported the winner's final tally but not its total
tally, and each block's total tally but not its final one. Add a
top-level tally next to final_tally, and a final_tally to every block
entry next to its tally.

Both top-level values now come from the winner's entry in the same
snapshot as the blocks and their voters, rather than from the
election's last evaluation, so every number in the response agrees.

* List voted-for hashes the election does not hold in confirmation_info

An election records votes for forks it has not received, and their
weight decides the leader, yet confirmation_info showed only the held
blocks. List every hash from the snapshot's weights instead: each entry
gains a held flag, and an unheld one has its tallies and voters but no
contents. total_tally now includes the weight behind unheld hashes.

__________

Type: commit

Hash: 3c0d0786288b4f0bb8a1afb93ba9fbab2566c82e

Created: today

__________

gr0v1ty/nano-node:3c0d0786288b4f0bb8a1afb93ba9fbab2566c82e

Test Results

Test Case Status Duration Median Deviation Log Graph
5n4pr_conf_10k_bintree PASS 102 s -3.0 s GitHub job logs Show
5n4pr_conf_10k_change PASS 126 s 4.0 s GitHub job logs Show
5n4pr_conf_change_dependant PASS 97 s -12.0 s GitHub job logs -
5n4pr_conf_change_independant PASS 106 s 0.0 s GitHub job logs -
5n4pr_conf_send_dependant PASS 116 s 8.0 s GitHub job logs -
5n4pr_conf_send_independant PASS 123 s 13.0 s GitHub job logs -
5n4pr_rocks_10k_bintree PASS 113 s 8.0 s GitHub job logs -
5n4pr_rocks_10k_change PASS 139 s -13.0 s GitHub job logs -