Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

remove AllSubsystems and AllSubsystemsGen types #3874

Merged
38 commits merged into from
Sep 29, 2021
Merged
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
7195906
introduce the OverseerConnector, use it
drahnr Sep 20, 2021
c945ff9
introduce is_relay_chain to RelayChainSelection
drahnr Sep 20, 2021
8ef93c4
Update node/service/src/lib.rs
drahnr Sep 21, 2021
eae1026
avoid the deferred setting of `is_relay_chain` in `RelayChainSelection`
drahnr Sep 21, 2021
253b430
positive assertion is not mandated, only the negative one, to avoid a…
drahnr Sep 21, 2021
ded4e59
cleanup: overseer residue
drahnr Sep 8, 2021
e5b8fa4
spellcheck
drahnr Sep 8, 2021
c9543ec
fixin
drahnr Sep 8, 2021
d2466e0
groundwork to obsolete Overseer::new and AllSubsystemsGen proc-macro
drahnr Sep 8, 2021
ebc7630
Now all malus & tests can be ported to the builder pattern.
drahnr Sep 8, 2021
79afb80
spellcheck
drahnr Sep 8, 2021
5246592
adjust tests, minor fixes
drahnr Sep 8, 2021
99e201d
remove derive macro AllSubsystemsGen
drahnr Sep 8, 2021
ec87f3a
add forgotten file dummy.rs
drahnr Sep 8, 2021
46112f5
remove residue
drahnr Sep 8, 2021
2920113
good news everyone!
drahnr Sep 9, 2021
88aed66
spellcheck
drahnr Sep 9, 2021
f5bfa42
address review comments
drahnr Sep 9, 2021
a938a0a
fixup imports
drahnr Sep 9, 2021
7884d64
make it conditional
drahnr Sep 9, 2021
6468b01
fixup docs
drahnr Sep 10, 2021
7880976
reduce import
drahnr Sep 10, 2021
5302f20
chore: fmt
drahnr Sep 13, 2021
6268876
chore: fmt
drahnr Sep 16, 2021
d3eb0b8
chore: spellcheck / nlprules
drahnr Sep 16, 2021
7b35901
fixup malus variant-a
drahnr Sep 16, 2021
0af7bc1
fmt
drahnr Sep 17, 2021
c440282
fix
drahnr Sep 21, 2021
3675565
fixins
drahnr Sep 21, 2021
433bafe
pfmt
drahnr Sep 23, 2021
ab7a480
fixins
drahnr Sep 23, 2021
bfc2e67
chore: fmt
drahnr Sep 28, 2021
170a7e9
remove expanded overseer generation
drahnr Sep 29, 2021
9791f8e
tracing version
drahnr Sep 29, 2021
d6ca84b
Update node/network/statement-distribution/src/lib.rs
drahnr Sep 29, 2021
9968684
use future::ready instead
drahnr Sep 29, 2021
d3a7c1e
silence warning
drahnr Sep 29, 2021
6488178
chore: fmt
drahnr Sep 29, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ members = [
"node/overseer",
"node/overseer/overseer-gen",
"node/overseer/overseer-gen/proc-macro",
"node/overseer/all-subsystems-gen",
"node/malus",
"node/primitives",
"node/service",
Expand Down
2 changes: 1 addition & 1 deletion cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub use service::RuntimeApiCollection;
pub use service::{self, Block, CoreApi, IdentifyVariant, ProvideRuntimeApi, TFullClient};

#[cfg(feature = "malus")]
pub use service::create_default_subsystems;
pub use service::overseer::prepared_overseer_builder;

#[cfg(feature = "cli")]
pub use cli::*;
Expand Down
4 changes: 2 additions & 2 deletions node/core/pvf/src/artifacts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ impl Artifacts {

/// Inform the table about the artifact with the given ID. The state will be set to "preparing".
///
/// This function must be used only for brand new artifacts and should never be used for
/// This function must be used only for brand-new artifacts and should never be used for
/// replacing existing ones.
pub fn insert_preparing(&mut self, artifact_id: ArtifactId) {
// See the precondition.
Expand All @@ -159,7 +159,7 @@ impl Artifacts {

/// Insert an artifact with the given ID as "prepared".
///
/// This function must be used only for brand new artifacts and should never be used for
/// This function must be used only for brand-new artifacts and should never be used for
/// replacing existing ones.
#[cfg(test)]
pub fn insert_prepared(&mut self, artifact_id: ArtifactId, last_time_needed: SystemTime) {
Expand Down
25 changes: 9 additions & 16 deletions node/malus/src/variant-a.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@

use color_eyre::eyre;
use polkadot_cli::{
create_default_subsystems,
prepared_overseer_builder,
service::{
AuthorityDiscoveryApi, AuxStore, BabeApi, Block, Error, HeaderBackend, Overseer,
OverseerGen, OverseerGenArgs, ParachainHost, ProvideRuntimeApi, SpawnNamed,
AuthorityDiscoveryApi, AuxStore, BabeApi, Block, Error, HeaderBackend, OverseerGen,
OverseerGenArgs, ParachainHost, ProvideRuntimeApi, SpawnNamed,
},
Cli,
};
Expand All @@ -37,7 +37,7 @@ use polkadot_cli::{
use polkadot_node_core_candidate_validation::CandidateValidationSubsystem;
use polkadot_node_subsystem::{
messages::{AllMessages, CandidateValidationMessage},
overseer::{self, OverseerConnector, OverseerHandle},
overseer::{self, Overseer, OverseerConnector, OverseerHandle},
FromOverseer,
};

Expand Down Expand Up @@ -94,15 +94,10 @@ impl OverseerGen for BehaveMaleficient {
RuntimeClient::Api: ParachainHost<Block> + BabeApi<Block> + AuthorityDiscoveryApi<Block>,
Spawner: 'static + SpawnNamed + Clone + Unpin,
{
let spawner = args.spawner.clone();
let leaves = args.leaves.clone();
let runtime_client = args.runtime_client.clone();
let registry = args.registry.clone();
let candidate_validation_config = args.candidate_validation_config.clone();
// modify the subsystem(s) as needed:
let all_subsystems = create_default_subsystems(args)?.replace_candidate_validation(
// create the filtered subsystem
|orig: CandidateValidationSubsystem| {

prepared_overseer_builder(args)?
.replace_candidate_validation(|orig: CandidateValidationSubsystem| {
InterceptedSubsystem::new(
CandidateValidationSubsystem::with_config(
candidate_validation_config,
Expand All @@ -111,10 +106,8 @@ impl OverseerGen for BehaveMaleficient {
),
Skippy::default(),
)
},
);

Overseer::new(leaves, all_subsystems, registry, runtime_client, spawner, connector)
})
.build_with_connector(connector)
.map_err(|e| e.into())
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ pub struct SessionInfo {
/// validators.
pub validator_groups: Vec<Vec<AuthorityDiscoveryId>>,

/// Information about ourself:
/// Information about ourselves:
pub our_index: ValidatorIndex,

/// Remember to which group we belong, so we won't start fetching chunks for candidates with
Expand Down
2 changes: 1 addition & 1 deletion node/network/availability-recovery/src/futures_undead.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
//! futures will still get polled, but will not count towards length. So length will only count
//! futures, which are still considered live.
//!
//! Usecase: If futures take longer than we would like them too, we maybe able to request the data
//! Usecase: If futures take longer than we would like them too, we may be able to request the data
//! from somewhere else as well. We don't really want to cancel the old future, because maybe it
//! was almost done, thus we would have wasted time with our impatience. By simply making them
//! not count towards length, we can make sure to have enough "live" requests ongoing, while at the
Expand Down
2 changes: 1 addition & 1 deletion node/network/dispute-distribution/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use crate::{sender, LOG_TARGET};
pub enum Error {
/// Fatal errors of dispute distribution.
Fatal(Fatal),
/// Non fatal errors of dispute distribution.
/// Non-fatal errors of dispute distribution.
NonFatal(NonFatal),
}

Expand Down
2 changes: 1 addition & 1 deletion node/network/statement-distribution/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub type FatalResult<T> = std::result::Result<T, Fatal>;
pub enum Error {
/// Fatal errors of dispute distribution.
Fatal(Fatal),
/// Non fatal errors of dispute distribution.
/// Non-fatal errors of dispute distribution.
NonFatal(NonFatal),
}

Expand Down
2 changes: 1 addition & 1 deletion node/network/statement-distribution/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const MAX_LARGE_STATEMENTS_PER_SENDER: usize = 20;

/// The statement distribution subsystem.
pub struct StatementDistribution {
/// Pointer to a keystore, which is required for determining this nodes validator index.
/// Pointer to a keystore, which is required for determining the nodes validator index.
drahnr marked this conversation as resolved.
Show resolved Hide resolved
keystore: SyncCryptoStorePtr,
/// Receiver for incoming large statement requests.
req_receiver: Option<IncomingRequestReceiver<request_v1::StatementFetchingRequest>>,
Expand Down
1 change: 0 additions & 1 deletion node/overseer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ polkadot-node-subsystem-types = { path = "../subsystem-types" }
polkadot-node-metrics = { path = "../metrics" }
polkadot-primitives = { path = "../../primitives" }
polkadot-overseer-gen = { path = "./overseer-gen" }
polkadot-overseer-all-subsystems-gen = { path = "./all-subsystems-gen" }
tracing = "0.1.28"
lru = "0.6"
parity-util-mem = { version = ">= 0.10.1", default-features = false }
Expand Down
17 changes: 0 additions & 17 deletions node/overseer/all-subsystems-gen/Cargo.toml

This file was deleted.

Loading