-
Notifications
You must be signed in to change notification settings - Fork 997
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some fixes to finality tests #1228
Conversation
|
||
old_finalized = state.finalized_checkpoint | ||
state.previous_justified_checkpoint = c3 | ||
state.previous_justified_checkpoint = c4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels strange to do this as it is not the behaviour one would expect from this test. The problem, however, is that otherwise, a new checkpoint is finalised as the condition of "2nd/3rd most recent epochs are justified, the 2nd using the 3rd as source" is met. This means that in the case where there is insufficient support, assert state.finalized_checkpoint == old_finalized # no new finalized
fails. @djrtwo, please can you check me here (and propose an alternative solution if you have one.)
TLDR: this is required because of an artifact of how the tests are constructed by manipulating what is and isn't justified in the state.
I extended these finalisation fixes to all of the finalisation cases. Fixes include:
|
28a41ce
to
0c29c51
Compare
… committees per slot, and improve bitfield index descriptions
Fixed the attestation creation, since it was broken on mainnet config (multi committees per slot). And also reworded the bitfield indices and justification, it's clear now. |
Fix finality_12. This should be a good base to fix the others.
get_matching_target_
worksaggregation_bitfield
->aggregation_bits
inadd_mock_attestations
(use bool array for init)add_mock_attestations
had bug, settingtarget=source
. fixedadd_mock_attestations
setsshard
inattestation.data.crosslink
. This piece of data is required to figure out what committee is attesting. Previous, all were defaulting to zero so each committee added looked the same.