Skip to content
Snippets Groups Projects
Commit 8f733a6c authored by André Silva's avatar André Silva Committed by GitHub
Browse files

use max_block_proposal_slot_portion (#499)


* use max_block_proposal_slot_portion

* remove patch now that Substrate PR is merged

Co-authored-by: default avatarRobert Habermeier <rphmeier@gmail.com>
parent 12a2b285
No related merge requests found
This diff is collapsed.
......@@ -110,6 +110,7 @@ where
slot_duration: SlotDuration,
telemetry: Option<TelemetryHandle>,
block_proposal_slot_portion: SlotProportion,
max_block_proposal_slot_portion: Option<SlotProportion>,
) -> Self
where
Client: ProvideRuntimeApi<B>
......@@ -149,6 +150,7 @@ where
keystore,
telemetry,
block_proposal_slot_portion,
max_block_proposal_slot_portion,
});
Self {
......@@ -253,6 +255,7 @@ pub struct BuildAuraConsensusParams<PF, BI, RBackend, CIDP, Client, BS, SO> {
pub slot_duration: SlotDuration,
pub telemetry: Option<TelemetryHandle>,
pub block_proposal_slot_portion: SlotProportion,
pub max_block_proposal_slot_portion: Option<SlotProportion>,
}
/// Build the [`AuraConsensus`].
......@@ -273,6 +276,7 @@ pub fn build_aura_consensus<P, Block, PF, BI, RBackend, CIDP, Client, SO, BS, Er
slot_duration,
telemetry,
block_proposal_slot_portion,
max_block_proposal_slot_portion,
}: BuildAuraConsensusParams<PF, BI, RBackend, CIDP, Client, BS, SO>,
) -> Box<dyn ParachainConsensus<Block>>
where
......@@ -327,6 +331,7 @@ where
slot_duration,
telemetry,
block_proposal_slot_portion,
max_block_proposal_slot_portion,
)
.build()
}
......@@ -352,6 +357,7 @@ struct AuraConsensusBuilder<P, Block, PF, BI, RBackend, CIDP, Client, SO, BS, Er
slot_duration: SlotDuration,
telemetry: Option<TelemetryHandle>,
block_proposal_slot_portion: SlotProportion,
max_block_proposal_slot_portion: Option<SlotProportion>,
}
impl<Block, PF, BI, RBackend, CIDP, Client, SO, BS, P, Error>
......@@ -409,6 +415,7 @@ where
slot_duration: SlotDuration,
telemetry: Option<TelemetryHandle>,
block_proposal_slot_portion: SlotProportion,
max_block_proposal_slot_portion: Option<SlotProportion>,
) -> Self {
Self {
_phantom: PhantomData,
......@@ -425,6 +432,7 @@ where
slot_duration,
telemetry,
block_proposal_slot_portion,
max_block_proposal_slot_portion,
}
}
......@@ -498,6 +506,7 @@ where
self.slot_duration,
self.telemetry,
self.block_proposal_slot_portion,
self.max_block_proposal_slot_portion,
))
}
}
......@@ -483,6 +483,8 @@ pub async fn start_rococo_parachain_node(
slot_duration,
// We got around 500ms for proposing
block_proposal_slot_portion: SlotProportion::new(1f32 / 24f32),
// And a maximum of 750ms if slots are skipped
max_block_proposal_slot_portion: Some(SlotProportion::new(1f32 / 16f32)),
telemetry,
}))
},
......@@ -899,6 +901,8 @@ where
slot_duration,
// We got around 500ms for proposing
block_proposal_slot_portion: SlotProportion::new(1f32 / 24f32),
// And a maximum of 750ms if slots are skipped
max_block_proposal_slot_portion: Some(SlotProportion::new(1f32 / 16f32)),
telemetry: telemetry2,
})
}),
......
......@@ -625,6 +625,7 @@ pub fn node_config(
rpc_http_threads: None,
rpc_cors: None,
rpc_methods: Default::default(),
rpc_max_payload: None,
prometheus_config: None,
telemetry_endpoints: None,
telemetry_external_transport: None,
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment