This is an implementation for : tzip!175, see also : https://forum.tezosagora.org/t/rfc-allow-delegators-to-subsume-their-delegate-votes/4212
dune exec tezt/tests/main.exe -- --color --file manager_voting.ml --verbose
Document the interface of any function added or modified (see the coding guidelines) Document any change to the user interface, including configuration parameters (see node configuration)
Provide automatic testing (see the testing guide).
For new features and bug fixes, add an item in the appropriate changelog (
docs/protocols/alpha.rstfor the protocol and the environment, the
Development Versionsection of
CHANGES.mdfor everything else).
Select suitable reviewers using the
Assigneethe next person who should take action on that MR
At the start of a voting period, the listings, as reported by the RPC
/votes/listings should only contains the active bakers with at least
one roll. The initial voting power of a baker is its full staking
balance at the start of the voting period.
Latter on during the voting cycle, implicit accounts with an active baker at the start of the voting period might be added to the listings. They are lazily added when they cast a vote.
For that purpose, at the start of a voting period the protocol now takes a snapshot of the balance and delegation of all accounts. When the manager of an account cast a vote, she is added to the listings with their snapshotted balance as voting power; and the same amount of voting power is removed from their snapshotted delegate. Thus the total voting power is constant in the listings during the whole voting period. This MR try to be efficient while snapshotting balance of all accounts.