Change best effort queue behaviour in `dispute-coordinator` (#6275)
* Change best effort queue behaviour in `dispute-coordinator` Use the same type of queue (`BTreeMap<CandidateComparator, ParticipationRequest>`) for best effort and priority in `dispute-coordinator`. Rework `CandidateComparator` to handle unavailable parent block numbers. Best effort queue will order disputes the same way as priority does - by parent's block height. Disputes on candidates for which the parent's block number can't be obtained will be treated with the lowest priority. * Fix tests: Handle `ChainApiMessage::BlockNumber` in `handle_sync_queries` * Some tests are deadlocking on sending messages via overseer so change `SingleItemSink`to `mpsc::Sender` with a buffer of 1 * Fix a race in test after adding a buffered queue for overseer messages * Fix the rest of the tests * Guide update - best-effort queue * Guide update: clarification about spam votes * Fix tests in `availability-distribution` * Update comments * Add `make_buffered_subsystem_context` in `subsystem-test-helpers` * Code review feedback * Code review feedback * Code review feedback * Don't add best effort candidate if it is already in priority queue * Remove an old comment * Fix insert in best_effort
Showing
- polkadot/node/core/dispute-coordinator/src/participation/queues/mod.rs 88 additions, 97 deletions.../core/dispute-coordinator/src/participation/queues/mod.rs
- polkadot/node/core/dispute-coordinator/src/participation/queues/tests.rs 97 additions, 28 deletions...ore/dispute-coordinator/src/participation/queues/tests.rs
- polkadot/node/core/dispute-coordinator/src/participation/tests.rs 67 additions, 22 deletions.../node/core/dispute-coordinator/src/participation/tests.rs
- polkadot/node/core/dispute-coordinator/src/tests.rs 14 additions, 8 deletionspolkadot/node/core/dispute-coordinator/src/tests.rs
- polkadot/node/network/availability-distribution/src/tests/state.rs 2 additions, 2 deletions...node/network/availability-distribution/src/tests/state.rs
- polkadot/node/subsystem-test-helpers/src/lib.rs 15 additions, 4 deletionspolkadot/node/subsystem-test-helpers/src/lib.rs
- polkadot/roadmap/implementers-guide/src/node/disputes/dispute-coordinator.md 45 additions, 34 deletions...plementers-guide/src/node/disputes/dispute-coordinator.md
Please register or sign in to comment