Implement the Statement Distribution Subsystem (#1326)
* set up data types and control flow for statement distribution * add some set-like methods to View * implement sending to peers * start fixing equivocation handling * Add a section to the statement distribution subsystem on equivocations and flood protection * fix typo and amend wording * implement flood protection * have peer knowledge tracker follow when peer first learns about a candidate * send dependents after circulating * add another TODO * trigger send in one more place * refactors from review * send new statements to candidate backing * instantiate active head data with runtime API values * track our view changes and peer view changes * apply a benefit to peers who send us statements we want * remove unneeded TODO * add some comments and improve Hash implementation * start tests and fix `note_statement` * test active_head seconding logic * test that the per-peer tracking logic works * test per-peer knowledge tracker * test that peer view updates lead to messages being sent * test statement circulation * address review comments * have view set methods return references
Showing
- polkadot/Cargo.lock 22 additions, 0 deletionspolkadot/Cargo.lock
- polkadot/Cargo.toml 1 addition, 0 deletionspolkadot/Cargo.toml
- polkadot/node/network/statement-distribution/Cargo.toml 26 additions, 0 deletionspolkadot/node/network/statement-distribution/Cargo.toml
- polkadot/node/network/statement-distribution/src/lib.rs 1380 additions, 0 deletionspolkadot/node/network/statement-distribution/src/lib.rs
- polkadot/node/primitives/src/lib.rs 30 additions, 10 deletionspolkadot/node/primitives/src/lib.rs
- polkadot/node/subsystem/src/messages.rs 4 additions, 1 deletionpolkadot/node/subsystem/src/messages.rs
- polkadot/primitives/src/parachain.rs 13 additions, 1 deletionpolkadot/primitives/src/parachain.rs
- polkadot/roadmap/implementors-guide/src/node/backing/statement-distribution.md 20 additions, 3 deletions...ementors-guide/src/node/backing/statement-distribution.md
Please register or sign in to comment