Proto/SWRR: integration of SWRR under feature flag
What
TODO: protocol migration test.
Changes in select_distribution_for_cycle, baking_rights_owner and cycle_end functions to include SWRR logic under feature flag.
Why
How
Using feature flag to choose between old and new sampling method at cycle end. For baking_rights_owner we check first that the new method is available, and default to the old method if it is not.
Manually testing the MR
In sandbox mode, use RPCs get /chains/main/blocks/head/helpers/swrr_credits and get /chains/main/blocks/head/helpers/swrr_selected_bakers.
Checklist
- 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,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the
Reviewersfield below. -
Select as
Assigneethe next person who should take action on that MR
Edited by Olha Nemkovych