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

connected disconnected state removal #3803

Closed
wants to merge 36 commits into from
Closed
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
0c576f3
X
drahnr Sep 6, 2021
9b10894
fixup proc macro
drahnr Sep 7, 2021
1a90b59
remove connect disconnect state
drahnr Sep 7, 2021
04b48ea
cleanup warnings
drahnr Sep 7, 2021
8f738dc
split new partial
drahnr Sep 7, 2021
9457019
cleanup: overseer residue
drahnr Sep 8, 2021
b5a3f5f
spellcheck
drahnr Sep 8, 2021
b9d1cf1
fixin
drahnr Sep 8, 2021
2ded22d
groundwork to obsolete Overseer::new and AllSubsystemsGen proc-macro
drahnr Sep 8, 2021
ed10d78
Now all malus & tests can be ported to the builder pattern.
drahnr Sep 8, 2021
f895214
spellcheck
drahnr Sep 8, 2021
4865bdf
adjust tests, minor fixes
drahnr Sep 8, 2021
6cac23e
remove derive macro AllSubsystemsGen
drahnr Sep 8, 2021
f95761d
add forgotten file dummy.rs
drahnr Sep 8, 2021
d212767
remove residue
drahnr Sep 8, 2021
00015d4
good news everyone!
drahnr Sep 9, 2021
f7990be
spellcheck
drahnr Sep 9, 2021
9ef9b2e
spellcheck
drahnr Sep 9, 2021
363231f
Merge remote-tracking branch 'origin/master' into bernhard-overseer-c…
drahnr Sep 9, 2021
618fb53
address review comments
drahnr Sep 9, 2021
8ec0361
fixup imports
drahnr Sep 9, 2021
3fb3a70
refactor init code to not require a `OverseerHandle` when we don't ha…
drahnr Sep 9, 2021
814a18f
make it conditional
drahnr Sep 9, 2021
de6f89a
fixup docs
drahnr Sep 10, 2021
1eda912
reduce import
drahnr Sep 10, 2021
05f3155
Merge remote-tracking branch 'origin' into bernhard-overseer-connecte…
drahnr Sep 10, 2021
1ef6d3b
spellcheck
drahnr Sep 10, 2021
8334908
Merge remote-tracking branch 'origin/master' into bernhard-overseer-c…
drahnr Sep 13, 2021
6acee9f
chore: fmt
drahnr Sep 13, 2021
2f60f54
hide basics
drahnr Sep 13, 2021
9e58be3
Merge remote-tracking branch 'origin/master' into bernhard-overseer-c…
drahnr Sep 14, 2021
be948fd
Update node/service/src/relay_chain_selection.rs
drahnr Sep 14, 2021
a10f0f1
Merge remote-tracking branch 'origin' into bernhard-overseer-connecte…
drahnr Sep 16, 2021
e84e6f4
chore: fmt
drahnr Sep 16, 2021
eee560a
chore: spellcheck / nlprules
drahnr Sep 16, 2021
2e1257f
fixup malus variant-a
drahnr Sep 16, 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
12 changes: 1 addition & 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 @@ -72,7 +72,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 @@ -28,7 +28,7 @@ pub use service::{
};

#[cfg(feature = "malus")]
pub use service::create_default_subsystems;
pub use service::overseer::{dummy_overseer_builder, prepared_overseer_builder};
drahnr marked this conversation as resolved.
Show resolved Hide resolved

#[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
23 changes: 9 additions & 14 deletions node/malus/src/variant-a.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@

use color_eyre::eyre;
use polkadot_cli::{
create_default_subsystems,
prepared_overseer_builder,
service::{
AuthorityDiscoveryApi, AuxStore, BabeApi, Block, Error, HeaderBackend, Overseer,
OverseerGen, OverseerGenArgs, OverseerHandle, ParachainHost, ProvideRuntimeApi, SpawnNamed,
OverseerConnector, OverseerGen, OverseerGenArgs, OverseerHandle, ParachainHost,
ProvideRuntimeApi, SpawnNamed,
},
Cli,
};
Expand Down Expand Up @@ -72,22 +73,18 @@ struct BehaveMaleficient;
impl OverseerGen for BehaveMaleficient {
fn generate<'a, Spawner, RuntimeClient>(
&self,
connector: OverseerConnector,
args: OverseerGenArgs<'a, Spawner, RuntimeClient>,
) -> Result<(Overseer<Spawner, Arc<RuntimeClient>>, OverseerHandle), Error>
where
RuntimeClient: 'static + ProvideRuntimeApi<Block> + HeaderBackend<Block> + AuxStore,
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| {
FilteredSubsystem::new(
CandidateValidationSubsystem::with_config(
candidate_validation_config,
Expand All @@ -96,10 +93,8 @@ impl OverseerGen for BehaveMaleficient {
),
Skippy::default(),
)
},
);

Overseer::new(leaves, all_subsystems, registry, runtime_client, spawner)
})
.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
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.26"
lru = "0.6"

Expand Down
17 changes: 0 additions & 17 deletions node/overseer/all-subsystems-gen/Cargo.toml

This file was deleted.

Loading