enable disputes for known chains, except for polkadot (#4464)

* enable disputes, for all known chains but polkadot

* chore: fmt

* don't propagate disputes either

* review

* remove disputes feature

* remove superfluous line

* Update node/service/src/lib.rs

Co-authored-by: Andronik Ordian <write@reusable.software>

* fixup

* allow being a dummy

* rialto

* add an enum, to make things work better

* overseer

* fix test

* comments

* move condition out

* excess arg

Co-authored-by: Andronik Ordian <write@reusable.software>
This commit is contained in:
Bernhard Schuster
2021-12-17 18:50:48 +01:00
committed by GitHub
parent fad55b95fa
commit 2457c26a08
26 changed files with 219 additions and 247 deletions
@@ -30,6 +30,7 @@ use polkadot_node_core_av_store::Config as AvailabilityConfig;
use polkadot_node_core_candidate_validation::Config as CandidateValidationConfig;
use polkadot_node_core_chain_selection::Config as ChainSelectionConfig;
use polkadot_node_core_dispute_coordinator::Config as DisputeCoordinatorConfig;
use polkadot_node_core_provisioner::ProvisionerConfig;
use polkadot_node_network_protocol::request_response::{v1 as request_v1, IncomingRequestReceiver};
use polkadot_overseer::{
metrics::Metrics as OverseerMetrics, BlockInfo, MetricsTrait, Overseer, OverseerBuilder,
@@ -108,6 +109,8 @@ where
pub chain_selection_config: ChainSelectionConfig,
/// Configuration for the dispute coordinator subsystem.
pub dispute_coordinator_config: DisputeCoordinatorConfig,
/// Configuration for the provisioner subsystem.
pub disputes_enabled: bool,
}
/// Obtain a prepared `OverseerBuilder`, that is initialized
@@ -133,6 +136,7 @@ pub fn prepared_overseer_builder<Spawner, RuntimeClient>(
candidate_validation_config,
chain_selection_config,
dispute_coordinator_config,
disputes_enabled,
}: OverseerGenArgs<'_, Spawner, RuntimeClient>,
) -> Result<
OverseerBuilder<
@@ -218,7 +222,7 @@ where
Box::new(network_service.clone()),
Metrics::register(registry)?,
))
.provisioner(ProvisionerSubsystem::new(spawner.clone(), (), Metrics::register(registry)?))
.provisioner(ProvisionerSubsystem::new(spawner.clone(), ProvisionerConfig { disputes_enabled }, Metrics::register(registry)?))
.runtime_api(RuntimeApiSubsystem::new(
runtime_client.clone(),
Metrics::register(registry)?,
@@ -473,6 +473,7 @@ where
slot_duration_millis: slot_duration.as_millis() as u64,
};
let candidate_validation_config = CandidateValidationConfig {
artifacts_cache_path: config
.database
@@ -581,6 +582,7 @@ where
dispute_req_receiver,
pov_req_receiver,
statement_req_receiver,
disputes_enabled: false,
},
)?;
let handle = Handle::new(overseer_handle);