Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
5d7f6d5
set up data types and control flow for statement distribution
rphmeier Jun 27, 2020
28f12c5
add some set-like methods to View
rphmeier Jun 27, 2020
f8992a2
implement sending to peers
rphmeier Jun 27, 2020
72b339b
start fixing equivocation handling
rphmeier Jun 29, 2020
6a16cd7
Add a section to the statement distribution subsystem on equivocation…
rphmeier Jun 30, 2020
ca3b523
fix typo and amend wording
rphmeier Jun 30, 2020
8464686
implement flood protection
rphmeier Jul 1, 2020
cac9adc
have peer knowledge tracker follow when peer first learns about a can…
rphmeier Jul 1, 2020
1be7e37
send dependents after circulating
rphmeier Jul 1, 2020
47f2df8
add another TODO
rphmeier Jul 1, 2020
cd30c21
trigger send in one more place
rphmeier Jul 1, 2020
a39ad10
refactors from review
rphmeier Jul 1, 2020
751122b
send new statements to candidate backing
rphmeier Jul 1, 2020
d413426
instantiate active head data with runtime API values
rphmeier Jul 1, 2020
7b82e1b
track our view changes and peer view changes
rphmeier Jul 1, 2020
94a69ff
apply a benefit to peers who send us statements we want
rphmeier Jul 1, 2020
a3b4b6a
remove unneeded TODO
rphmeier Jul 1, 2020
eb51e80
add some comments and improve Hash implementation
rphmeier Jul 1, 2020
b9876ae
start tests and fix `note_statement`
rphmeier Jul 2, 2020
f605ed2
test active_head seconding logic
rphmeier Jul 2, 2020
5650620
test that the per-peer tracking logic works
rphmeier Jul 2, 2020
dd00108
test per-peer knowledge tracker
rphmeier Jul 2, 2020
c93b545
test that peer view updates lead to messages being sent
rphmeier Jul 2, 2020
19ee505
test statement circulation
rphmeier Jul 2, 2020
9093736
address review comments
rphmeier Jul 2, 2020
6d18b62
have view set methods return references
rphmeier Jul 2, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix typo and amend wording
  • Loading branch information
rphmeier committed Jun 30, 2020
commit ca3b523fd223f0570375b8076d104e80c1b981a7
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@ First: We may be aware of two equivocated `Seconded` statements issued by a vali
The fix is to track, per-peer, the hashes of up to 4 candidates per validator (per relay-parent) that the peer is aware of. It is 4 because we may send them 2 and they may send us 2 different ones. We track the data that they are aware of as the union of things we have sent them and things they have sent us. If we receive a 1st or 2nd `Seconded` statement from a peer, we note it in the peer's known candidates even if we do disregard the data locally. And then, upon receipt of any data dependent on that statement, we do not reduce that peer's standing in our eyes, as the data was not undesired.

There is another caveat to the fix: we don't want to allow the peer to flood us because it has set things up in a way that it knows we will drop all of its traffic.
We also track how many statements we have received per peer, per candidate, and per chain-head. This is any statement concerning a particular statement: `Seconded`, `Valid`, or `Invalid. If we ever receive a statement from a peer which would push any of these counters beyond twice the amount of validators at the chain-head, we begin to lower the peer's standing and eventually disconnect. This bound is a massive overestimate and could be reduced to twice the number of validators in the corresponding validator group. It is worth noting that the goal at the time of writing is to ensure any finite bound on the amount of stored data, as any equivocation results in a large slash.
We also track how many statements we have received per peer, per candidate, and per chain-head. This is any statement concerning a particular candidate: `Seconded`, `Valid`, or `Invalid`. If we ever receive a statement from a peer which would push any of these counters beyond twice the amount of validators at the chain-head, we begin to lower the peer's standing and eventually disconnect. This bound is a massive overestimate and could be reduced to twice the number of validators in the corresponding validator group. It is worth noting that the goal at the time of writing is to ensure any finite bound on the amount of stored data, as any equivocation results in a large slash.