Proto/test: unflakes the inactivity
What
In the protocol tests, the scenario_bake helpers did not account for attestation in measuring delegates activity.
This led to flaky test for the autostaking, as baker having attested but not baked where deemed inactive in the model and not in the protocol.
Thus the model unstaked the funds while the protocol didn't.
Why
Although a pinch of flakiness can make the salt of life, it was decided it's not welcome in the CI. Let's melt the flakes.
How
keeping track of attesters and update their activity cycle.
Manually testing the MR
dune exec src/proto_alpha/lib_protocol/test/integration/main.exe -- --file src/proto_alpha/lib_protocol/test/integration/test_scenario_autostaking.ml --title 'Alpha: Test auto-staking with overdelegation' --loop
used to fail rapidely on master.
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