You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While testing Lighthouse against the new test vectors I encountered a discrepancy in the attester slashing tests which seems to arise from the spec iterating over the indices to slash in the arbitrary order used by Python's hashset implementation. The buggy line is:
If slashings commuted the order could be arbitrary, but due to the exit_epoch being based upon the churn limit (and therefore the validators who have been previously slashed), you get different exit_epochs and different final states for different slashing orders. One test that exemplifies this is success_double (mainnet) which slashes [2, 143, 287, 353, 464, 475, 487, 496], which in Python set ordering is {353, 2, 487, 143, 464, 496, 475, 287}.
I think the best solution is to specify that the indices should be sorted before iteration, but I'm open to other ideas.
The text was updated successfully, but these errors were encountered:
michaelsproul
added a commit
to michaelsproul/consensus-specs
that referenced
this issue
May 27, 2019
While testing Lighthouse against the new test vectors I encountered a discrepancy in the attester slashing tests which seems to arise from the spec iterating over the indices to slash in the arbitrary order used by Python's hashset implementation. The buggy line is:
in
process_attester_slashing
.If slashings commuted the order could be arbitrary, but due to the
exit_epoch
being based upon the churn limit (and therefore the validators who have been previously slashed), you get differentexit_epoch
s and different final states for different slashing orders. One test that exemplifies this issuccess_double
(mainnet) which slashes[2, 143, 287, 353, 464, 475, 487, 496]
, which in Python set ordering is{353, 2, 487, 143, 464, 496, 475, 287}
.I think the best solution is to specify that the indices should be sorted before iteration, but I'm open to other ideas.
The text was updated successfully, but these errors were encountered: