validator_discovery: pass PeerSet to the request (#2372)

* validator_discovery: pass PeerSet to the request

* validator_discovery: track PeerSet of connected peers

* validator_discovery: fix tests

* validator_discovery: fix long line

* some fixes

* some validator_discovery logs

* log validator discovery request

* Also connect to validators on `DistributePoV`.

* validator_discovery: store the whole state per peer_set

* bump spec versions in kusama, polkadot and westend

* Correcting doc.

* validator_discovery: bump channel capacity

* pov-distribution: some cleanup

* this should fix the test, but it does not

* I just got some brain damage while fixing this

Why are you even reading this???

* wrap long line

* address some review nits

Co-authored-by: Robert Klotzner <robert.klotzner@gmx.at>
This commit is contained in:
Andronik Ordian
2021-02-08 08:57:59 +01:00
committed by GitHub
parent 28cab8e190
commit 6981a1c366
13 changed files with 228 additions and 119 deletions
@@ -28,7 +28,9 @@ use polkadot_subsystem::{
FromOverseer, OverseerSignal, SubsystemContext,
messages::{AllMessages, CollatorProtocolMessage, NetworkBridgeMessage, NetworkBridgeEvent},
};
use polkadot_node_network_protocol::{v1 as protocol_v1, View, PeerId, RequestId, OurView};
use polkadot_node_network_protocol::{
peer_set::PeerSet, v1 as protocol_v1, View, PeerId, RequestId, OurView,
};
use polkadot_node_subsystem_util::{
validator_discovery,
request_validators_ctx,
@@ -365,6 +367,7 @@ async fn connect_to_validators(
ctx,
relay_parent,
validators,
PeerSet::Collation,
).await?;
state.connection_requests.put(relay_parent, request);