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

Companion for paritytech/substrate#12828 #1939

Merged
merged 13 commits into from
Mar 6, 2023
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
522 changes: 266 additions & 256 deletions Cargo.lock

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions client/relay-chain-inprocess-interface/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -369,11 +369,10 @@ pub fn build_inprocess_relay_chain(
hwbench,
)?;

let sync_oracle: Arc<dyn SyncOracle + Send + Sync> = Arc::new(full_node.network.clone());
let relay_chain_interface_builder = RelayChainInProcessInterfaceBuilder {
polkadot_client: full_node.client.clone(),
backend: full_node.backend.clone(),
sync_oracle,
sync_oracle: full_node.sync_service.clone(),
overseer_handle: full_node.overseer_handle.clone().ok_or(RelayChainError::GenericError(
"Overseer not running in full node.".to_string(),
))?,
Expand Down
5 changes: 4 additions & 1 deletion client/relay-chain-minimal-node/src/collator_overseer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ pub(crate) struct CollatorOverseerGenArgs<'a> {
pub runtime_client: Arc<BlockChainRpcClient>,
/// Underlying network service implementation.
pub network_service: Arc<sc_network::NetworkService<Block, PHash>>,
/// Syncing oracle.
pub sync_oracle: Box<dyn sp_consensus::SyncOracle + Send>,
/// Underlying authority discovery service.
pub authority_discovery_service: AuthorityDiscoveryService,
/// Receiver for collation request protocol
Expand All @@ -79,6 +81,7 @@ fn build_overseer<'a>(
CollatorOverseerGenArgs {
runtime_client,
network_service,
sync_oracle,
authority_discovery_service,
collation_req_receiver,
available_data_req_receiver,
Expand Down Expand Up @@ -121,7 +124,7 @@ fn build_overseer<'a>(
.network_bridge_rx(NetworkBridgeRxSubsystem::new(
network_service.clone(),
authority_discovery_service.clone(),
Box::new(network_service.clone()),
sync_oracle,
network_bridge_metrics.clone(),
peer_set_protocol_names.clone(),
))
Expand Down
3 changes: 2 additions & 1 deletion client/relay-chain-minimal-node/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ async fn new_minimal_relay_chain(
let (collation_req_receiver, available_data_req_receiver) =
build_request_response_protocol_receivers(&request_protocol_names, &mut config);

let (network, network_starter) =
let (network, network_starter, sync_oracle) =
network::build_collator_network(network::BuildCollatorNetworkParams {
config: &config,
client: relay_chain_rpc_client.clone(),
Expand All @@ -171,6 +171,7 @@ async fn new_minimal_relay_chain(
let overseer_args = CollatorOverseerGenArgs {
runtime_client: relay_chain_rpc_client.clone(),
network_service: network.clone(),
sync_oracle,
authority_discovery_service,
collation_req_receiver,
available_data_req_receiver,
Expand Down
Loading