Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
334 changes: 157 additions & 177 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions node/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ sc-consensus-uncles = { git = "https://github.com/paritytech/substrate", branch
sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-consensus-slots = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-executor = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-finality-grandpa-warp-sync = { git = "https://github.com/paritytech/substrate", branch = "master", optional = true }
sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" }
Expand Down Expand Up @@ -146,7 +145,6 @@ full-node = [
"polkadot-node-core-runtime-api",
"polkadot-statement-distribution",
"polkadot-approval-distribution",
"sc-finality-grandpa-warp-sync",
"kvdb-rocksdb"
]

Expand Down
15 changes: 12 additions & 3 deletions node/service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -696,15 +696,17 @@ pub fn new_full<RuntimeApi, Executor, OverseerGenerator>(
config.network.extra_sets.extend(peer_sets_info(is_authority));
}

config.network.request_response_protocols.push(sc_finality_grandpa_warp_sync::request_response_config_for_chain(
&config, task_manager.spawn_handle(), backend.clone(), import_setup.1.shared_authority_set().clone(),
));
let request_multiplexer = {
let (multiplexer, configs) = RequestMultiplexer::new();
config.network.request_response_protocols.extend(configs);
multiplexer
};

let warp_sync = Arc::new(grandpa::warp_proof::NetworkProvider::new(
backend.clone(),
import_setup.1.shared_authority_set().clone(),
));

let (network, system_rpc_tx, network_starter) =
service::build_network(service::BuildNetworkParams {
config: &config,
Expand All @@ -714,6 +716,7 @@ pub fn new_full<RuntimeApi, Executor, OverseerGenerator>(
import_queue,
on_demand: None,
block_announce_validator_builder: None,
warp_sync: Some(warp_sync),
})?;

if config.offchain_worker.enabled {
Expand Down Expand Up @@ -1136,6 +1139,11 @@ fn new_light<Runtime, Dispatch>(mut config: Configuration) -> Result<(
telemetry.as_ref().map(|x| x.handle()),
)?;

let warp_sync = Arc::new(grandpa::warp_proof::NetworkProvider::new(
backend.clone(),
grandpa_link.shared_authority_set().clone(),
));

let (network, system_rpc_tx, network_starter) =
service::build_network(service::BuildNetworkParams {
config: &config,
Expand All @@ -1145,6 +1153,7 @@ fn new_light<Runtime, Dispatch>(mut config: Configuration) -> Result<(
import_queue,
on_demand: Some(on_demand.clone()),
block_announce_validator_builder: None,
warp_sync: Some(warp_sync),
})?;

let enable_grandpa = !config.disable_grandpa;
Expand Down
4 changes: 4 additions & 0 deletions runtime/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1727,6 +1727,10 @@ sp_api::impl_runtime_apis! {
Grandpa::grandpa_authorities()
}

fn current_set_id() -> fg_primitives::SetId {
Grandpa::current_set_id()
}

fn submit_report_equivocation_unsigned_extrinsic(
equivocation_proof: fg_primitives::EquivocationProof<
<Block as BlockT>::Hash,
Expand Down
4 changes: 4 additions & 0 deletions runtime/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1304,6 +1304,10 @@ sp_api::impl_runtime_apis! {
Grandpa::grandpa_authorities()
}

fn current_set_id() -> fg_primitives::SetId {
Grandpa::current_set_id()
}

fn submit_report_equivocation_unsigned_extrinsic(
equivocation_proof: fg_primitives::EquivocationProof<
<Block as BlockT>::Hash,
Expand Down
4 changes: 4 additions & 0 deletions runtime/rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1274,6 +1274,10 @@ sp_api::impl_runtime_apis! {
Grandpa::grandpa_authorities()
}

fn current_set_id() -> fg_primitives::SetId {
Grandpa::current_set_id()
}

fn submit_report_equivocation_unsigned_extrinsic(
equivocation_proof: fg_primitives::EquivocationProof<
<Block as BlockT>::Hash,
Expand Down
4 changes: 4 additions & 0 deletions runtime/test-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,10 @@ sp_api::impl_runtime_apis! {
Grandpa::grandpa_authorities()
}

fn current_set_id() -> fg_primitives::SetId {
Grandpa::current_set_id()
}

fn submit_report_equivocation_unsigned_extrinsic(
_equivocation_proof: fg_primitives::EquivocationProof<
<Block as BlockT>::Hash,
Expand Down
4 changes: 4 additions & 0 deletions runtime/westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1311,6 +1311,10 @@ sp_api::impl_runtime_apis! {
Grandpa::grandpa_authorities()
}

fn current_set_id() -> fg_primitives::SetId {
Grandpa::current_set_id()
}

fn submit_report_equivocation_unsigned_extrinsic(
equivocation_proof: fg_primitives::EquivocationProof<
<Block as BlockT>::Hash,
Expand Down