-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Conversation
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.
I didn't take a hard look at the tests but logic changes seem OK.
Why do we consider 're-import' of votes at all? Re: #4854 we could just use the 'fresh' check and not double-count. |
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.
I verified two tests explicitly and the logic change is inline with the stated changeset.
bot merge |
Waiting for commit status. |
bot merge cancel |
Merge cancelled. |
23e719b
to
b624454
Compare
We are not double counting, because we will only increment spam slots once per candidate & validator. One side effect exists though. Assuming a validator Consequences should be minor though:
Either way, that should be improved as well (carefully) as changes to this code tend to open up security issues. I am about to create a separate issue for that. |
* master: (27 commits) Bump `tokio` to 1.17.0 (#4965) bump transaction_version (#4956) Bump tracing-subscriber from 0.3.8 to 0.3.9 (#4954) staking miner: reuse ws conn for remote-ext (#4849) Revert "collator-protocol: short-term fixes for connectivity (#4640)" (#4914) Bump tracing from 0.1.30 to 0.1.31 (#4941) Better spam slots handling (#4845) Bump proc-macro-crate from 1.1.0 to 1.1.2 (#4936) corrected paras code validation event comments (#4932) Companion for refactor election score #10834 (#4927) Companion CI: Make sure to pass the update crates properly (#4928) update digest to v0.10.2 (#4907) Companion for #10832 (#4918) Companion for `Remove u32_trait` (#4920) Bump serde_json from 1.0.78 to 1.0.79 (#4916) Bump rand from 0.8.4 to 0.8.5 (#4917) Remove stale migrations post 9.16 release (#4848) Add proxy type for Kappa Sigma Mu (#4851) Baseline weights for `force_apply_min_commission` (#4896) Allow two Parachains to swap (#4772) ...
and a few more tests.
We should actually only increment spam slots on voting invalid validators, as only those actually could raise a dispute. A valid vote is either backing or approval or an explicit
Valid
vote, but the later is only ever accepted if some other validator previously already voted invalid on that candidate - it is enough to count this vote as spam.