disputes pallet: Filter unconfirmed disputes#6330
Conversation
|
A tiny change - I want it merged before I start removing spam slots. |
runtime/parachains/src/disputes.rs
Outdated
|
|
||
| // Reject disputes containing less votes than needed for confirmation. | ||
| if summary.state.validators_for.count_ones() + summary.state.validators_against.count_ones() < | ||
| supermajority_threshold(summary.state.validators_for.len()) |
There was a problem hiding this comment.
How does it handle duplicate votes? Shouldn't the definition of a confirmed dispute be count_ones of a union of bitvecs, not the sum of count_ones?
There was a problem hiding this comment.
Yes, I haven't thought about double voting.
There was a problem hiding this comment.
Also why does it use supermajority threshold?
There was a problem hiding this comment.
Two bugs in one line - this is a good PR! :)
Should be byzantine_threshold(). +1 if used on the line above.
|
Would be nice to add some tests. |
This change breaks a lot of spam slots related tests. I think fixing them is worhless considering that we want to remove them. I'll stack the PR for spam slot removal on top of this one and I'll write/modify tests for both of them in the second one. |
81b54a3 to
ac5b9f7
Compare
|
The CI pipeline was cancelled due to failure one of the required jobs. |
|
The changes in this PR are 'transferred' to #6345 to avoid merge/rebase hell. |
On dispute import pallet disputes - don't include any disputes with less than required votes for dispute confirmation.
Part of #6331