From 948d1ac582421cc10134e3051af03fa5f8e181e0 Mon Sep 17 00:00:00 2001 From: Bernhard Schuster Date: Thu, 15 Dec 2022 16:00:26 +0100 Subject: [PATCH 1/4] update orchestra to v0.0.3 --- node/overseer/Cargo.toml | 3 ++- node/overseer/src/dummy.rs | 3 +++ node/overseer/src/lib.rs | 15 ++++++++------- node/subsystem-types/Cargo.toml | 2 +- node/subsystem-types/src/messages.rs | 18 ------------------ node/subsystem/src/lib.rs | 3 +++ 6 files changed, 17 insertions(+), 27 deletions(-) diff --git a/node/overseer/Cargo.toml b/node/overseer/Cargo.toml index 092ba410a126..589a83f42c19 100644 --- a/node/overseer/Cargo.toml +++ b/node/overseer/Cargo.toml @@ -15,7 +15,7 @@ polkadot-node-primitives = { path = "../primitives" } polkadot-node-subsystem-types = { path = "../subsystem-types" } polkadot-node-metrics = { path = "../metrics" } polkadot-primitives = { path = "../../primitives" } -orchestra = "0.0.2" +orchestra = "0.0.3" gum = { package = "tracing-gum", path = "../gum" } lru = "0.8" sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } @@ -34,3 +34,4 @@ test-helpers = { package = "polkadot-primitives-test-helpers", path = "../../pri [features] default = [] expand = ["orchestra/expand"] +dotgraph = ["orchestra/dotgraph"] diff --git a/node/overseer/src/dummy.rs b/node/overseer/src/dummy.rs index 0706244356aa..cf72774826ea 100644 --- a/node/overseer/src/dummy.rs +++ b/node/overseer/src/dummy.rs @@ -22,6 +22,9 @@ use crate::{ use lru::LruCache; use orchestra::{FromOrchestra, SpawnedSubsystem, Subsystem, SubsystemContext}; use polkadot_node_subsystem_types::{errors::SubsystemError, messages::*}; +// Generated dummy messages +use crate::messages::*; + /// A dummy subsystem that implements [`Subsystem`] for all /// types of messages. Used for tests or as a placeholder. #[derive(Clone, Copy, Debug)] diff --git a/node/overseer/src/lib.rs b/node/overseer/src/lib.rs index 78d1e1fe7889..f6ae43ca0651 100644 --- a/node/overseer/src/lib.rs +++ b/node/overseer/src/lib.rs @@ -74,15 +74,16 @@ use lru::LruCache; use client::{BlockImportNotification, BlockchainEvents, FinalityNotification}; use polkadot_primitives::v2::{Block, BlockNumber, Hash}; +use self::messages::{BitfieldSigningMessage, PvfCheckerMessage}; use polkadot_node_subsystem_types::messages::{ ApprovalDistributionMessage, ApprovalVotingMessage, AvailabilityDistributionMessage, AvailabilityRecoveryMessage, AvailabilityStoreMessage, BitfieldDistributionMessage, - BitfieldSigningMessage, CandidateBackingMessage, CandidateValidationMessage, ChainApiMessage, - ChainSelectionMessage, CollationGenerationMessage, CollatorProtocolMessage, - DisputeCoordinatorMessage, DisputeDistributionMessage, GossipSupportMessage, - NetworkBridgeRxMessage, NetworkBridgeTxMessage, ProvisionerMessage, PvfCheckerMessage, - RuntimeApiMessage, StatementDistributionMessage, + CandidateBackingMessage, CandidateValidationMessage, ChainApiMessage, ChainSelectionMessage, + CollationGenerationMessage, CollatorProtocolMessage, DisputeCoordinatorMessage, + DisputeDistributionMessage, GossipSupportMessage, NetworkBridgeRxMessage, + NetworkBridgeTxMessage, ProvisionerMessage, RuntimeApiMessage, StatementDistributionMessage, }; + pub use polkadot_node_subsystem_types::{ errors::{SubsystemError, SubsystemResult}, jaeger, ActivatedLeaf, ActiveLeavesUpdate, LeafStatus, OverseerSignal, @@ -458,7 +459,7 @@ pub struct Overseer { ])] candidate_validation: CandidateValidation, - #[subsystem(PvfCheckerMessage, sends: [ + #[subsystem(sends: [ CandidateValidationMessage, RuntimeApiMessage, ])] @@ -498,7 +499,7 @@ pub struct Overseer { ])] availability_recovery: AvailabilityRecovery, - #[subsystem(blocking, BitfieldSigningMessage, sends: [ + #[subsystem(blocking, sends: [ AvailabilityStoreMessage, RuntimeApiMessage, BitfieldDistributionMessage, diff --git a/node/subsystem-types/Cargo.toml b/node/subsystem-types/Cargo.toml index 175623dc32d8..452f7b39e004 100644 --- a/node/subsystem-types/Cargo.toml +++ b/node/subsystem-types/Cargo.toml @@ -13,7 +13,7 @@ polkadot-node-primitives = { path = "../primitives" } polkadot-node-network-protocol = { path = "../network/protocol" } polkadot-statement-table = { path = "../../statement-table" } polkadot-node-jaeger = { path = "../jaeger" } -orchestra = "0.0.2" +orchestra = "0.0.3" sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/node/subsystem-types/src/messages.rs b/node/subsystem-types/src/messages.rs index 94562ae6baef..cb0834c5ba34 100644 --- a/node/subsystem-types/src/messages.rs +++ b/node/subsystem-types/src/messages.rs @@ -473,18 +473,6 @@ impl BitfieldDistributionMessage { } } -/// Bitfield signing message. -/// -/// Currently non-instantiable. -#[derive(Debug)] -pub enum BitfieldSigningMessage {} - -impl BoundToRelayParent for BitfieldSigningMessage { - fn relay_parent(&self) -> Hash { - match *self {} - } -} - /// Availability store subsystem message. #[derive(Debug)] pub enum AvailabilityStoreMessage { @@ -950,9 +938,3 @@ pub enum GossipSupportMessage { #[from] NetworkBridgeUpdate(NetworkBridgeEvent), } - -/// PVF checker message. -/// -/// Currently non-instantiable. -#[derive(Debug)] -pub enum PvfCheckerMessage {} diff --git a/node/subsystem/src/lib.rs b/node/subsystem/src/lib.rs index ce5fef2c8b51..6d534f5fd5bd 100644 --- a/node/subsystem/src/lib.rs +++ b/node/subsystem/src/lib.rs @@ -34,6 +34,9 @@ pub use polkadot_node_subsystem_types::{ /// Re-export of all messages type, including the wrapper type. pub mod messages { pub use super::overseer::AllMessages; + // generated, empty message types + pub use super::overseer::messages::*; + // deliberately defined messages pub use polkadot_node_subsystem_types::messages::*; } From e7049a726268ddc10c03827e29519084265b5aa7 Mon Sep 17 00:00:00 2001 From: Bernhard Schuster Date: Thu, 15 Dec 2022 17:28:07 +0100 Subject: [PATCH 2/4] fix locks --- Cargo.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1ad3b99e76f1..2b06077c18a3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4534,9 +4534,9 @@ dependencies = [ [[package]] name = "orchestra" -version = "0.0.2" +version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0aab54694ddaa8a9b703724c6ef04272b2d27bc32d2c855aae5cdd1857216b43" +checksum = "4ea67034d2359719b77aca8f6141e74468ee4f0535d361dc11b047e270f22f0d" dependencies = [ "async-trait", "dyn-clonable", @@ -4551,9 +4551,9 @@ dependencies = [ [[package]] name = "orchestra-proc-macro" -version = "0.0.2" +version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a702b2f6bf592b3eb06c00d80d05afaf7a8eff6b41bb361e397d799acc21b45a" +checksum = "6d72e20cd0143f279f88a0a1be167c27379fc1635a984b9c08b4124c8bbabc2d" dependencies = [ "expander 0.0.6", "itertools", @@ -7530,9 +7530,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.43" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a2ca2c61bc9f3d74d2886294ab7b9853abd9c1ad903a3ac7815c58989bb7bab" +checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" dependencies = [ "unicode-ident", ] @@ -10871,9 +10871,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.98" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c50aef8a904de4c23c788f104b7dddc7d6f79c647c7c8ce4cc8f73eb0ca773dd" +checksum = "60b9b43d45702de4c839cb9b51d9f529c5dd26a4aff255b42b1ebc03e88ee908" dependencies = [ "proc-macro2", "quote", From 127f52d500b0b09dcbfb51e7aa94c8ca9f64ee93 Mon Sep 17 00:00:00 2001 From: Bernhard Schuster Date: Thu, 15 Dec 2022 20:59:28 +0100 Subject: [PATCH 3/4] update orchestra to v0.0.4 --- node/overseer/Cargo.toml | 2 +- node/subsystem-types/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/node/overseer/Cargo.toml b/node/overseer/Cargo.toml index 589a83f42c19..52310422eb4d 100644 --- a/node/overseer/Cargo.toml +++ b/node/overseer/Cargo.toml @@ -15,7 +15,7 @@ polkadot-node-primitives = { path = "../primitives" } polkadot-node-subsystem-types = { path = "../subsystem-types" } polkadot-node-metrics = { path = "../metrics" } polkadot-primitives = { path = "../../primitives" } -orchestra = "0.0.3" +orchestra = "0.0.4" gum = { package = "tracing-gum", path = "../gum" } lru = "0.8" sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/node/subsystem-types/Cargo.toml b/node/subsystem-types/Cargo.toml index 452f7b39e004..22528503ccc4 100644 --- a/node/subsystem-types/Cargo.toml +++ b/node/subsystem-types/Cargo.toml @@ -13,7 +13,7 @@ polkadot-node-primitives = { path = "../primitives" } polkadot-node-network-protocol = { path = "../network/protocol" } polkadot-statement-table = { path = "../../statement-table" } polkadot-node-jaeger = { path = "../jaeger" } -orchestra = "0.0.3" +orchestra = "0.0.4" sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-api = { git = "https://github.com/paritytech/substrate", branch = "master" } sp-consensus-babe = { git = "https://github.com/paritytech/substrate", branch = "master" } From 20354206e04ffa38651626d0283e5347a32f4936 Mon Sep 17 00:00:00 2001 From: Bernhard Schuster Date: Thu, 15 Dec 2022 21:01:05 +0100 Subject: [PATCH 4/4] update lock --- Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2b06077c18a3..fc912dfccc03 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4534,9 +4534,9 @@ dependencies = [ [[package]] name = "orchestra" -version = "0.0.3" +version = "0.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea67034d2359719b77aca8f6141e74468ee4f0535d361dc11b047e270f22f0d" +checksum = "17e7d5b6bb115db09390bed8842c94180893dd83df3dfce7354f2a2aa090a4ee" dependencies = [ "async-trait", "dyn-clonable", @@ -4551,9 +4551,9 @@ dependencies = [ [[package]] name = "orchestra-proc-macro" -version = "0.0.3" +version = "0.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d72e20cd0143f279f88a0a1be167c27379fc1635a984b9c08b4124c8bbabc2d" +checksum = "c2af4dabb2286b0be0e9711d2d24e25f6217048b71210cffd3daddc3b5c84e1f" dependencies = [ "expander 0.0.6", "itertools",