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
@@ -41,7 +41,7 @@ use polkadot_node_subsystem::{
CandidateValidationMessage, CollatorProtocolMessage, DisputeCoordinatorMessage,
ProvisionableData, ProvisionerMessage, RuntimeApiRequest, StatementDistributionMessage,
},
overseer, ActiveLeavesUpdate, FromOverseer, OverseerSignal, PerLeafSpan, SpawnedSubsystem,
overseer, ActiveLeavesUpdate, FromOrchestra, OverseerSignal, PerLeafSpan, SpawnedSubsystem,
Stage, SubsystemError,
};
use polkadot_node_subsystem_util::{
@@ -201,7 +201,7 @@ async fn run_iteration<Context>(
}
from_overseer = ctx.recv().fuse() => {
match from_overseer? {
FromOverseer::Signal(OverseerSignal::ActiveLeaves(update)) => handle_active_leaves_update(
FromOrchestra::Signal(OverseerSignal::ActiveLeaves(update)) => handle_active_leaves_update(
&mut *ctx,
update,
jobs,
@@ -209,9 +209,9 @@ async fn run_iteration<Context>(
&background_validation_tx,
&metrics,
).await?,
FromOverseer::Signal(OverseerSignal::BlockFinalized(..)) => {}
FromOverseer::Signal(OverseerSignal::Conclude) => return Ok(()),
FromOverseer::Communication { msg } => handle_communication(&mut *ctx, jobs, msg).await?,
FromOrchestra::Signal(OverseerSignal::BlockFinalized(..)) => {}
FromOrchestra::Signal(OverseerSignal::Conclude) => return Ok(()),
FromOrchestra::Communication { msg } => handle_communication(&mut *ctx, jobs, msg).await?,
}
}
)
+34 -34
View File
@@ -27,7 +27,7 @@ use polkadot_node_subsystem::{
AllMessages, CollatorProtocolMessage, RuntimeApiMessage, RuntimeApiRequest,
ValidationFailed,
},
ActivatedLeaf, ActiveLeavesUpdate, FromOverseer, LeafStatus, OverseerSignal,
ActivatedLeaf, ActiveLeavesUpdate, FromOrchestra, LeafStatus, OverseerSignal,
};
use polkadot_node_subsystem_test_helpers as test_helpers;
use polkadot_primitives::v2::{
@@ -169,7 +169,7 @@ fn test_harness<T: Future<Output = VirtualOverseer>>(
futures::executor::block_on(future::join(
async move {
let mut virtual_overseer = test_fut.await;
virtual_overseer.send(FromOverseer::Signal(OverseerSignal::Conclude)).await;
virtual_overseer.send(FromOrchestra::Signal(OverseerSignal::Conclude)).await;
},
subsystem,
));
@@ -222,7 +222,7 @@ impl TestCandidateBuilder {
async fn test_startup(virtual_overseer: &mut VirtualOverseer, test_state: &TestState) {
// Start work on some new parent.
virtual_overseer
.send(FromOverseer::Signal(OverseerSignal::ActiveLeaves(ActiveLeavesUpdate::start_work(
.send(FromOrchestra::Signal(OverseerSignal::ActiveLeaves(ActiveLeavesUpdate::start_work(
ActivatedLeaf {
hash: test_state.relay_parent,
number: 1,
@@ -330,7 +330,7 @@ fn backing_second_works() {
pov.clone(),
);
virtual_overseer.send(FromOverseer::Communication { msg: second }).await;
virtual_overseer.send(FromOrchestra::Communication { msg: second }).await;
assert_matches!(
virtual_overseer.recv().await,
@@ -391,7 +391,7 @@ fn backing_second_works() {
);
virtual_overseer
.send(FromOverseer::Signal(OverseerSignal::ActiveLeaves(
.send(FromOrchestra::Signal(OverseerSignal::ActiveLeaves(
ActiveLeavesUpdate::stop_work(test_state.relay_parent),
)))
.await;
@@ -467,7 +467,7 @@ fn backing_works() {
let statement =
CandidateBackingMessage::Statement(test_state.relay_parent, signed_a.clone());
virtual_overseer.send(FromOverseer::Communication { msg: statement }).await;
virtual_overseer.send(FromOrchestra::Communication { msg: statement }).await;
test_dispute_coordinator_notifications(
&mut virtual_overseer,
@@ -558,7 +558,7 @@ fn backing_works() {
let statement =
CandidateBackingMessage::Statement(test_state.relay_parent, signed_b.clone());
virtual_overseer.send(FromOverseer::Communication { msg: statement }).await;
virtual_overseer.send(FromOrchestra::Communication { msg: statement }).await;
test_dispute_coordinator_notifications(
&mut virtual_overseer,
@@ -569,7 +569,7 @@ fn backing_works() {
.await;
virtual_overseer
.send(FromOverseer::Signal(OverseerSignal::ActiveLeaves(
.send(FromOrchestra::Signal(OverseerSignal::ActiveLeaves(
ActiveLeavesUpdate::stop_work(test_state.relay_parent),
)))
.await;
@@ -662,7 +662,7 @@ fn backing_works_while_validation_ongoing() {
let statement =
CandidateBackingMessage::Statement(test_state.relay_parent, signed_a.clone());
virtual_overseer.send(FromOverseer::Communication { msg: statement }).await;
virtual_overseer.send(FromOrchestra::Communication { msg: statement }).await;
test_dispute_coordinator_notifications(
&mut virtual_overseer,
@@ -709,7 +709,7 @@ fn backing_works_while_validation_ongoing() {
let statement =
CandidateBackingMessage::Statement(test_state.relay_parent, signed_b.clone());
virtual_overseer.send(FromOverseer::Communication { msg: statement }).await;
virtual_overseer.send(FromOrchestra::Communication { msg: statement }).await;
test_dispute_coordinator_notifications(
&mut virtual_overseer,
@@ -736,7 +736,7 @@ fn backing_works_while_validation_ongoing() {
let statement =
CandidateBackingMessage::Statement(test_state.relay_parent, signed_c.clone());
virtual_overseer.send(FromOverseer::Communication { msg: statement }).await;
virtual_overseer.send(FromOrchestra::Communication { msg: statement }).await;
test_dispute_coordinator_notifications(
&mut virtual_overseer,
@@ -753,7 +753,7 @@ fn backing_works_while_validation_ongoing() {
tx,
);
virtual_overseer.send(FromOverseer::Communication { msg }).await;
virtual_overseer.send(FromOrchestra::Communication { msg }).await;
let candidates = rx.await.unwrap();
assert_eq!(1, candidates.len());
@@ -774,7 +774,7 @@ fn backing_works_while_validation_ongoing() {
);
virtual_overseer
.send(FromOverseer::Signal(OverseerSignal::ActiveLeaves(
.send(FromOrchestra::Signal(OverseerSignal::ActiveLeaves(
ActiveLeavesUpdate::stop_work(test_state.relay_parent),
)))
.await;
@@ -843,7 +843,7 @@ fn backing_misbehavior_works() {
let statement =
CandidateBackingMessage::Statement(test_state.relay_parent, seconded_2.clone());
virtual_overseer.send(FromOverseer::Communication { msg: statement }).await;
virtual_overseer.send(FromOrchestra::Communication { msg: statement }).await;
test_dispute_coordinator_notifications(
&mut virtual_overseer,
@@ -935,7 +935,7 @@ fn backing_misbehavior_works() {
let statement =
CandidateBackingMessage::Statement(test_state.relay_parent, valid_2.clone());
virtual_overseer.send(FromOverseer::Communication { msg: statement }).await;
virtual_overseer.send(FromOrchestra::Communication { msg: statement }).await;
test_dispute_coordinator_notifications(
&mut virtual_overseer,
@@ -1024,7 +1024,7 @@ fn backing_dont_second_invalid() {
pov_block_a.clone(),
);
virtual_overseer.send(FromOverseer::Communication { msg: second }).await;
virtual_overseer.send(FromOrchestra::Communication { msg: second }).await;
assert_matches!(
virtual_overseer.recv().await,
@@ -1053,7 +1053,7 @@ fn backing_dont_second_invalid() {
pov_block_b.clone(),
);
virtual_overseer.send(FromOverseer::Communication { msg: second }).await;
virtual_overseer.send(FromOrchestra::Communication { msg: second }).await;
assert_matches!(
virtual_overseer.recv().await,
@@ -1108,7 +1108,7 @@ fn backing_dont_second_invalid() {
);
virtual_overseer
.send(FromOverseer::Signal(OverseerSignal::ActiveLeaves(
.send(FromOrchestra::Signal(OverseerSignal::ActiveLeaves(
ActiveLeavesUpdate::stop_work(test_state.relay_parent),
)))
.await;
@@ -1161,7 +1161,7 @@ fn backing_second_after_first_fails_works() {
let statement =
CandidateBackingMessage::Statement(test_state.relay_parent, signed_a.clone());
virtual_overseer.send(FromOverseer::Communication { msg: statement }).await;
virtual_overseer.send(FromOrchestra::Communication { msg: statement }).await;
test_dispute_coordinator_notifications(
&mut virtual_overseer,
@@ -1208,7 +1208,7 @@ fn backing_second_after_first_fails_works() {
pov.clone(),
);
virtual_overseer.send(FromOverseer::Communication { msg: second }).await;
virtual_overseer.send(FromOrchestra::Communication { msg: second }).await;
let pov_to_second = PoV { block_data: BlockData(vec![3, 2, 1]) };
@@ -1232,7 +1232,7 @@ fn backing_second_after_first_fails_works() {
// In order to trigger _some_ actions from subsystem ask it to second another
// candidate. The only reason to do so is to make sure that no actions were
// triggered on the prev step.
virtual_overseer.send(FromOverseer::Communication { msg: second }).await;
virtual_overseer.send(FromOrchestra::Communication { msg: second }).await;
assert_matches!(
virtual_overseer.recv().await,
@@ -1295,7 +1295,7 @@ fn backing_works_after_failed_validation() {
let statement =
CandidateBackingMessage::Statement(test_state.relay_parent, signed_a.clone());
virtual_overseer.send(FromOverseer::Communication { msg: statement }).await;
virtual_overseer.send(FromOrchestra::Communication { msg: statement }).await;
test_dispute_coordinator_notifications(
&mut virtual_overseer,
@@ -1343,7 +1343,7 @@ fn backing_works_after_failed_validation() {
tx,
);
virtual_overseer.send(FromOverseer::Communication { msg }).await;
virtual_overseer.send(FromOrchestra::Communication { msg }).await;
assert_eq!(rx.await.unwrap().len(), 0);
virtual_overseer
});
@@ -1383,7 +1383,7 @@ fn backing_doesnt_second_wrong_collator() {
pov.clone(),
);
virtual_overseer.send(FromOverseer::Communication { msg: second }).await;
virtual_overseer.send(FromOrchestra::Communication { msg: second }).await;
assert_matches!(
virtual_overseer.recv().await,
@@ -1394,7 +1394,7 @@ fn backing_doesnt_second_wrong_collator() {
);
virtual_overseer
.send(FromOverseer::Signal(OverseerSignal::ActiveLeaves(
.send(FromOrchestra::Signal(OverseerSignal::ActiveLeaves(
ActiveLeavesUpdate::stop_work(test_state.relay_parent),
)))
.await;
@@ -1451,11 +1451,11 @@ fn validation_work_ignores_wrong_collator() {
let statement =
CandidateBackingMessage::Statement(test_state.relay_parent, seconding.clone());
virtual_overseer.send(FromOverseer::Communication { msg: statement }).await;
virtual_overseer.send(FromOrchestra::Communication { msg: statement }).await;
// The statement will be ignored because it has the wrong collator.
virtual_overseer
.send(FromOverseer::Signal(OverseerSignal::ActiveLeaves(
.send(FromOrchestra::Signal(OverseerSignal::ActiveLeaves(
ActiveLeavesUpdate::stop_work(test_state.relay_parent),
)))
.await;
@@ -1613,7 +1613,7 @@ fn retry_works() {
// Send in a `Statement` with a candidate.
let statement =
CandidateBackingMessage::Statement(test_state.relay_parent, signed_a.clone());
virtual_overseer.send(FromOverseer::Communication { msg: statement }).await;
virtual_overseer.send(FromOrchestra::Communication { msg: statement }).await;
test_dispute_coordinator_notifications(
&mut virtual_overseer,
@@ -1640,7 +1640,7 @@ fn retry_works() {
let statement =
CandidateBackingMessage::Statement(test_state.relay_parent, signed_b.clone());
virtual_overseer.send(FromOverseer::Communication { msg: statement }).await;
virtual_overseer.send(FromOrchestra::Communication { msg: statement }).await;
test_dispute_coordinator_notifications(
&mut virtual_overseer,
@@ -1672,7 +1672,7 @@ fn retry_works() {
let statement =
CandidateBackingMessage::Statement(test_state.relay_parent, signed_c.clone());
virtual_overseer.send(FromOverseer::Communication { msg: statement }).await;
virtual_overseer.send(FromOrchestra::Communication { msg: statement }).await;
test_dispute_coordinator_notifications(
&mut virtual_overseer,
@@ -1799,12 +1799,12 @@ fn observes_backing_even_if_not_validator() {
let statement =
CandidateBackingMessage::Statement(test_state.relay_parent, signed_a.clone());
virtual_overseer.send(FromOverseer::Communication { msg: statement }).await;
virtual_overseer.send(FromOrchestra::Communication { msg: statement }).await;
let statement =
CandidateBackingMessage::Statement(test_state.relay_parent, signed_b.clone());
virtual_overseer.send(FromOverseer::Communication { msg: statement }).await;
virtual_overseer.send(FromOrchestra::Communication { msg: statement }).await;
test_dispute_coordinator_notifications(
&mut virtual_overseer,
@@ -1829,7 +1829,7 @@ fn observes_backing_even_if_not_validator() {
let statement =
CandidateBackingMessage::Statement(test_state.relay_parent, signed_c.clone());
virtual_overseer.send(FromOverseer::Communication { msg: statement }).await;
virtual_overseer.send(FromOrchestra::Communication { msg: statement }).await;
test_dispute_coordinator_notifications(
&mut virtual_overseer,
@@ -1840,7 +1840,7 @@ fn observes_backing_even_if_not_validator() {
.await;
virtual_overseer
.send(FromOverseer::Signal(OverseerSignal::ActiveLeaves(
.send(FromOrchestra::Signal(OverseerSignal::ActiveLeaves(
ActiveLeavesUpdate::stop_work(test_state.relay_parent),
)))
.await;