overseer becomes orchestra (#5542)

* rename overseer-gen to orchestra

Also drop `gum` and use `tracing`.

* make orchestra compile as standalone

* introduce Spawner trait to split from sp_core

Finalizes the independence of orchestra from polkadot-overseer

* slip of the pen

* other fixins

* remove unused import

* Update node/overseer/orchestra/proc-macro/src/impl_builder.rs

Co-authored-by: Vsevolod Stakhov <vsevolod.stakhov@parity.io>

* Update node/overseer/orchestra/proc-macro/src/impl_builder.rs

Co-authored-by: Vsevolod Stakhov <vsevolod.stakhov@parity.io>

* orchestra everywhere

* leaky data

* Bump scale-info from 2.1.1 to 2.1.2 (#5552)

Bumps [scale-info](https://github.com/paritytech/scale-info) from 2.1.1 to 2.1.2.
- [Release notes](https://github.com/paritytech/scale-info/releases)
- [Changelog](https://github.com/paritytech/scale-info/blob/master/CHANGELOG.md)
- [Commits](https://github.com/paritytech/scale-info/compare/v2.1.1...v2.1.2)

---
updated-dependencies:
- dependency-name: scale-info
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add missing markdown code block delimiter (#5555)

* bitfield-signing: remove util::jobs usage  (#5523)

* Switch to pooling copy-on-write instantiation strategy for WASM (companion for Substrate#11232) (#5337)

* Switch to pooling copy-on-write instantiation strategy for WASM

* Fix compilation of `polkadot-test-service`

* Update comments

* Move `max_memory_size` to `Semantics`

* Rename `WasmInstantiationStrategy` to `WasmtimeInstantiationStrategy`

* Update a safety comment

* update lockfile for {"substrate"}

Co-authored-by: parity-processbot <>

* Fix build

Co-authored-by: Vsevolod Stakhov <vsevolod.stakhov@parity.io>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Malte Kliemann <mail@maltekliemann.com>
Co-authored-by: Chris Sosnin <48099298+slumber@users.noreply.github.com>
Co-authored-by: Koute <koute@users.noreply.github.com>
This commit is contained in:
Bernhard Schuster
2022-05-19 14:42:02 +02:00
committed by GitHub
parent d9eff4ecd4
commit 450ca2baca
117 changed files with 1174 additions and 1077 deletions
+5 -5
View File
@@ -36,7 +36,7 @@ use polkadot_node_primitives::{AvailableData, ErasureChunk};
use polkadot_node_subsystem::{
errors::{ChainApiError, RuntimeApiError},
messages::{AvailabilityStoreMessage, ChainApiMessage},
overseer, ActiveLeavesUpdate, FromOverseer, OverseerSignal, SpawnedSubsystem, SubsystemError,
overseer, ActiveLeavesUpdate, FromOrchestra, OverseerSignal, SpawnedSubsystem, SubsystemError,
};
use polkadot_node_subsystem_util as util;
use polkadot_primitives::v2::{
@@ -558,8 +558,8 @@ async fn run_iteration<Context>(
select! {
incoming = ctx.recv().fuse() => {
match incoming.map_err(|_| Error::ContextChannelClosed)? {
FromOverseer::Signal(OverseerSignal::Conclude) => return Ok(true),
FromOverseer::Signal(OverseerSignal::ActiveLeaves(
FromOrchestra::Signal(OverseerSignal::Conclude) => return Ok(true),
FromOrchestra::Signal(OverseerSignal::ActiveLeaves(
ActiveLeavesUpdate { activated, .. })
) => {
for activated in activated.into_iter() {
@@ -567,7 +567,7 @@ async fn run_iteration<Context>(
process_block_activated(ctx, subsystem, activated.hash).await?;
}
}
FromOverseer::Signal(OverseerSignal::BlockFinalized(hash, number)) => {
FromOrchestra::Signal(OverseerSignal::BlockFinalized(hash, number)) => {
let _timer = subsystem.metrics.time_process_block_finalized();
subsystem.finalized_number = Some(number);
@@ -579,7 +579,7 @@ async fn run_iteration<Context>(
number,
).await?;
}
FromOverseer::Communication { msg } => {
FromOrchestra::Communication { msg } => {
let _timer = subsystem.metrics.time_process_message();
process_message(subsystem, msg)?;
}
+15 -15
View File
@@ -146,7 +146,7 @@ const TIMEOUT: Duration = Duration::from_millis(100);
async fn overseer_send(overseer: &mut VirtualOverseer, msg: AvailabilityStoreMessage) {
gum::trace!(meg = ?msg, "sending message");
overseer
.send(FromOverseer::Communication { msg })
.send(FromOrchestra::Communication { msg })
.timeout(TIMEOUT)
.await
.expect(&format!("{:?} is more than enough for sending messages.", TIMEOUT));
@@ -172,7 +172,7 @@ async fn overseer_recv_with_timeout(
async fn overseer_signal(overseer: &mut VirtualOverseer, signal: OverseerSignal) {
overseer
.send(FromOverseer::Signal(signal))
.send(FromOrchestra::Signal(signal))
.timeout(TIMEOUT)
.await
.expect(&format!("{:?} is more than enough for sending signals.", TIMEOUT));
@@ -426,7 +426,7 @@ fn store_block_works() {
tx,
};
virtual_overseer.send(FromOverseer::Communication { msg: block_msg }).await;
virtual_overseer.send(FromOrchestra::Communication { msg: block_msg }).await;
assert_eq!(rx.await.unwrap(), Ok(()));
let pov = query_available_data(&mut virtual_overseer, candidate_hash).await.unwrap();
@@ -479,7 +479,7 @@ fn store_pov_and_query_chunk_works() {
tx,
};
virtual_overseer.send(FromOverseer::Communication { msg: block_msg }).await;
virtual_overseer.send(FromOrchestra::Communication { msg: block_msg }).await;
assert_eq!(rx.await.unwrap(), Ok(()));
@@ -525,7 +525,7 @@ fn query_all_chunks_works() {
tx,
};
virtual_overseer.send(FromOverseer::Communication { msg: block_msg }).await;
virtual_overseer.send(FromOrchestra::Communication { msg: block_msg }).await;
assert_eq!(rx.await.unwrap(), Ok(()));
}
@@ -557,7 +557,7 @@ fn query_all_chunks_works() {
};
virtual_overseer
.send(FromOverseer::Communication { msg: store_chunk_msg })
.send(FromOrchestra::Communication { msg: store_chunk_msg })
.await;
assert_eq!(rx.await.unwrap(), Ok(()));
}
@@ -566,7 +566,7 @@ fn query_all_chunks_works() {
let (tx, rx) = oneshot::channel();
let msg = AvailabilityStoreMessage::QueryAllChunks(candidate_hash_1, tx);
virtual_overseer.send(FromOverseer::Communication { msg }).await;
virtual_overseer.send(FromOrchestra::Communication { msg }).await;
assert_eq!(rx.await.unwrap().len(), n_validators as usize);
}
@@ -574,7 +574,7 @@ fn query_all_chunks_works() {
let (tx, rx) = oneshot::channel();
let msg = AvailabilityStoreMessage::QueryAllChunks(candidate_hash_2, tx);
virtual_overseer.send(FromOverseer::Communication { msg }).await;
virtual_overseer.send(FromOrchestra::Communication { msg }).await;
assert_eq!(rx.await.unwrap().len(), 1);
}
@@ -582,7 +582,7 @@ fn query_all_chunks_works() {
let (tx, rx) = oneshot::channel();
let msg = AvailabilityStoreMessage::QueryAllChunks(candidate_hash_3, tx);
virtual_overseer.send(FromOverseer::Communication { msg }).await;
virtual_overseer.send(FromOrchestra::Communication { msg }).await;
assert_eq!(rx.await.unwrap().len(), 0);
}
virtual_overseer
@@ -613,7 +613,7 @@ fn stored_but_not_included_data_is_pruned() {
tx,
};
virtual_overseer.send(FromOverseer::Communication { msg: block_msg }).await;
virtual_overseer.send(FromOrchestra::Communication { msg: block_msg }).await;
rx.await.unwrap().unwrap();
@@ -665,7 +665,7 @@ fn stored_data_kept_until_finalized() {
tx,
};
virtual_overseer.send(FromOverseer::Communication { msg: block_msg }).await;
virtual_overseer.send(FromOrchestra::Communication { msg: block_msg }).await;
rx.await.unwrap().unwrap();
@@ -900,7 +900,7 @@ fn forkfullness_works() {
tx,
};
virtual_overseer.send(FromOverseer::Communication { msg }).await;
virtual_overseer.send(FromOrchestra::Communication { msg }).await;
rx.await.unwrap().unwrap();
@@ -912,7 +912,7 @@ fn forkfullness_works() {
tx,
};
virtual_overseer.send(FromOverseer::Communication { msg }).await;
virtual_overseer.send(FromOrchestra::Communication { msg }).await;
rx.await.unwrap().unwrap();
@@ -1003,7 +1003,7 @@ async fn query_available_data(
let (tx, rx) = oneshot::channel();
let query = AvailabilityStoreMessage::QueryAvailableData(candidate_hash, tx);
virtual_overseer.send(FromOverseer::Communication { msg: query }).await;
virtual_overseer.send(FromOrchestra::Communication { msg: query }).await;
rx.await.unwrap()
}
@@ -1016,7 +1016,7 @@ async fn query_chunk(
let (tx, rx) = oneshot::channel();
let query = AvailabilityStoreMessage::QueryChunk(candidate_hash, index, tx);
virtual_overseer.send(FromOverseer::Communication { msg: query }).await;
virtual_overseer.send(FromOrchestra::Communication { msg: query }).await;
rx.await.unwrap()
}