Allow to broadcast network messages in parallel (#1409)

This PR addresses multiple issues pending:

* [x] Update orchestra to the recent version and test how the node
performs
* [x] Add some useful metrics for outbound network bridge
* [x] Try to send incoming network requests to all subsystems without
blocking on some particular subsystem in that loop
* [x] Fix all incompatibilities between orchestra and polkadot code
(e.g. malus node)
This commit is contained in:
Vsevolod Stakhov
2023-09-11 19:33:51 +01:00
committed by GitHub
parent 2c8021f998
commit 44dbb73945
15 changed files with 223 additions and 56 deletions
@@ -20,7 +20,7 @@
use polkadot_node_subsystem::{
messages::AllMessages, overseer, FromOrchestra, OverseerSignal, SpawnGlue, SpawnedSubsystem,
SubsystemError, SubsystemResult,
SubsystemError, SubsystemResult, TrySendError,
};
use polkadot_node_subsystem_util::TimeoutExt;
@@ -160,6 +160,14 @@ where
self.tx.send(msg.into()).await.expect("test overseer no longer live");
}
fn try_send_message(
&mut self,
msg: OutgoingMessage,
) -> Result<(), TrySendError<OutgoingMessage>> {
self.tx.unbounded_send(msg.into()).expect("test overseer no longer live");
Ok(())
}
async fn send_messages<I>(&mut self, msgs: I)
where
I: IntoIterator<Item = OutgoingMessage> + Send,