misbehavior: report multiple offenses per validator as necessary (#2222)
* use proper descriptive generic type names * cleanup * Table stores a list of detected misbehavior per authority * add Table::drain_misbehaviors_for * WIP: unify misbehavior types; report multiple misbehaviors per validator Code checks, but tests don't yet pass. * update drain_misbehaviors: return authority id as well as specific misbehavior * enable unchecked construction of Signed structs in tests * remove test-features feature & unnecessary generic * fix backing tests This took a while to figure out, because where we'd previously been passing around `SignedFullStatement`s, we now needed to construct those on the fly within the test, to take advantage of the signature- checking in the constructor. That, in turn, necessitated changing the iterable type of `drain_misbehaviors` to return the validator index, and passing that validator index along within the misbehavior report. Once that was sorted, however, it became relatively straightforward: just needed to add appropriate methods to deconstruct the misbehavior reports, and then we could construct the signed statements directly. * fix bad merge
Showing
- polkadot/node/core/backing/src/lib.rs 64 additions, 55 deletionspolkadot/node/core/backing/src/lib.rs
- polkadot/node/primitives/src/lib.rs 3 additions, 137 deletionspolkadot/node/primitives/src/lib.rs
- polkadot/node/subsystem/src/messages.rs 3 additions, 2 deletionspolkadot/node/subsystem/src/messages.rs
- polkadot/roadmap/implementers-guide/src/types/overseer-protocol.md 315 additions, 273 deletions...roadmap/implementers-guide/src/types/overseer-protocol.md
- polkadot/statement-table/src/generic.rs 220 additions, 108 deletionspolkadot/statement-table/src/generic.rs
Please register or sign in to comment