mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 09:21:04 +00:00
use max_block_proposal_slot_portion (#499)
* use max_block_proposal_slot_portion * remove patch now that Substrate PR is merged Co-authored-by: Robert Habermeier <rphmeier@gmail.com>
This commit is contained in:
Generated
+268
-255
File diff suppressed because it is too large
Load Diff
@@ -110,6 +110,7 @@ where
|
|||||||
slot_duration: SlotDuration,
|
slot_duration: SlotDuration,
|
||||||
telemetry: Option<TelemetryHandle>,
|
telemetry: Option<TelemetryHandle>,
|
||||||
block_proposal_slot_portion: SlotProportion,
|
block_proposal_slot_portion: SlotProportion,
|
||||||
|
max_block_proposal_slot_portion: Option<SlotProportion>,
|
||||||
) -> Self
|
) -> Self
|
||||||
where
|
where
|
||||||
Client: ProvideRuntimeApi<B>
|
Client: ProvideRuntimeApi<B>
|
||||||
@@ -149,6 +150,7 @@ where
|
|||||||
keystore,
|
keystore,
|
||||||
telemetry,
|
telemetry,
|
||||||
block_proposal_slot_portion,
|
block_proposal_slot_portion,
|
||||||
|
max_block_proposal_slot_portion,
|
||||||
});
|
});
|
||||||
|
|
||||||
Self {
|
Self {
|
||||||
@@ -253,6 +255,7 @@ pub struct BuildAuraConsensusParams<PF, BI, RBackend, CIDP, Client, BS, SO> {
|
|||||||
pub slot_duration: SlotDuration,
|
pub slot_duration: SlotDuration,
|
||||||
pub telemetry: Option<TelemetryHandle>,
|
pub telemetry: Option<TelemetryHandle>,
|
||||||
pub block_proposal_slot_portion: SlotProportion,
|
pub block_proposal_slot_portion: SlotProportion,
|
||||||
|
pub max_block_proposal_slot_portion: Option<SlotProportion>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Build the [`AuraConsensus`].
|
/// Build the [`AuraConsensus`].
|
||||||
@@ -273,6 +276,7 @@ pub fn build_aura_consensus<P, Block, PF, BI, RBackend, CIDP, Client, SO, BS, Er
|
|||||||
slot_duration,
|
slot_duration,
|
||||||
telemetry,
|
telemetry,
|
||||||
block_proposal_slot_portion,
|
block_proposal_slot_portion,
|
||||||
|
max_block_proposal_slot_portion,
|
||||||
}: BuildAuraConsensusParams<PF, BI, RBackend, CIDP, Client, BS, SO>,
|
}: BuildAuraConsensusParams<PF, BI, RBackend, CIDP, Client, BS, SO>,
|
||||||
) -> Box<dyn ParachainConsensus<Block>>
|
) -> Box<dyn ParachainConsensus<Block>>
|
||||||
where
|
where
|
||||||
@@ -327,6 +331,7 @@ where
|
|||||||
slot_duration,
|
slot_duration,
|
||||||
telemetry,
|
telemetry,
|
||||||
block_proposal_slot_portion,
|
block_proposal_slot_portion,
|
||||||
|
max_block_proposal_slot_portion,
|
||||||
)
|
)
|
||||||
.build()
|
.build()
|
||||||
}
|
}
|
||||||
@@ -352,6 +357,7 @@ struct AuraConsensusBuilder<P, Block, PF, BI, RBackend, CIDP, Client, SO, BS, Er
|
|||||||
slot_duration: SlotDuration,
|
slot_duration: SlotDuration,
|
||||||
telemetry: Option<TelemetryHandle>,
|
telemetry: Option<TelemetryHandle>,
|
||||||
block_proposal_slot_portion: SlotProportion,
|
block_proposal_slot_portion: SlotProportion,
|
||||||
|
max_block_proposal_slot_portion: Option<SlotProportion>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<Block, PF, BI, RBackend, CIDP, Client, SO, BS, P, Error>
|
impl<Block, PF, BI, RBackend, CIDP, Client, SO, BS, P, Error>
|
||||||
@@ -409,6 +415,7 @@ where
|
|||||||
slot_duration: SlotDuration,
|
slot_duration: SlotDuration,
|
||||||
telemetry: Option<TelemetryHandle>,
|
telemetry: Option<TelemetryHandle>,
|
||||||
block_proposal_slot_portion: SlotProportion,
|
block_proposal_slot_portion: SlotProportion,
|
||||||
|
max_block_proposal_slot_portion: Option<SlotProportion>,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
Self {
|
Self {
|
||||||
_phantom: PhantomData,
|
_phantom: PhantomData,
|
||||||
@@ -425,6 +432,7 @@ where
|
|||||||
slot_duration,
|
slot_duration,
|
||||||
telemetry,
|
telemetry,
|
||||||
block_proposal_slot_portion,
|
block_proposal_slot_portion,
|
||||||
|
max_block_proposal_slot_portion,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -498,6 +506,7 @@ where
|
|||||||
self.slot_duration,
|
self.slot_duration,
|
||||||
self.telemetry,
|
self.telemetry,
|
||||||
self.block_proposal_slot_portion,
|
self.block_proposal_slot_portion,
|
||||||
|
self.max_block_proposal_slot_portion,
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -483,6 +483,8 @@ pub async fn start_rococo_parachain_node(
|
|||||||
slot_duration,
|
slot_duration,
|
||||||
// We got around 500ms for proposing
|
// We got around 500ms for proposing
|
||||||
block_proposal_slot_portion: SlotProportion::new(1f32 / 24f32),
|
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,
|
telemetry,
|
||||||
}))
|
}))
|
||||||
},
|
},
|
||||||
@@ -899,6 +901,8 @@ where
|
|||||||
slot_duration,
|
slot_duration,
|
||||||
// We got around 500ms for proposing
|
// We got around 500ms for proposing
|
||||||
block_proposal_slot_portion: SlotProportion::new(1f32 / 24f32),
|
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,
|
telemetry: telemetry2,
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -625,6 +625,7 @@ pub fn node_config(
|
|||||||
rpc_http_threads: None,
|
rpc_http_threads: None,
|
||||||
rpc_cors: None,
|
rpc_cors: None,
|
||||||
rpc_methods: Default::default(),
|
rpc_methods: Default::default(),
|
||||||
|
rpc_max_payload: None,
|
||||||
prometheus_config: None,
|
prometheus_config: None,
|
||||||
telemetry_endpoints: None,
|
telemetry_endpoints: None,
|
||||||
telemetry_external_transport: None,
|
telemetry_external_transport: None,
|
||||||
|
|||||||
Reference in New Issue
Block a user