mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-18 20:01:03 +00:00
Enable changing executor params through governance (#6934)
* Add a pallet call to change executor params * Use `OptionQuery`; Avoid runtime panic * Move pending executor params to `configuration` * Move `ExecutorParams` to `HostConfiguration` structure * Add executor params to the v5 migration * Add an `ExecutorParams` benchmark * ".git/.scripts/commands/bench/bench.sh" runtime polkadot runtime_parachains::configuration * Add to `WeightInfo` * Add dummy weights to other networks * ".git/.scripts/commands/bench/bench.sh" runtime kusama runtime_parachains::configuration * ".git/.scripts/commands/bench/bench.sh" runtime rococo runtime_parachains::configuration * ".git/.scripts/commands/bench/bench.sh" runtime westend runtime_parachains::configuration * Use real weight * Fix comment --------- Co-authored-by: command-bot <>
This commit is contained in:
@@ -29,6 +29,7 @@ use sp_std::{ops::Deref, time::Duration, vec, vec::Vec};
|
||||
|
||||
/// The different executor parameters for changing the execution environment semantics.
|
||||
#[derive(Clone, Debug, Encode, Decode, PartialEq, Eq, TypeInfo)]
|
||||
#[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))]
|
||||
pub enum ExecutorParam {
|
||||
/// Maximum number of memory pages (64KiB bytes per page) the executor can allocate.
|
||||
#[codec(index = 1)]
|
||||
@@ -93,6 +94,7 @@ impl sp_std::fmt::LowerHex for ExecutorParamsHash {
|
||||
// new entries and removing old ones. At the moment, there's no mandatory parameters defined. If
|
||||
// they show up, they must be clearly documented as mandatory ones.
|
||||
#[derive(Clone, Debug, Encode, Decode, PartialEq, Eq, TypeInfo)]
|
||||
#[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))]
|
||||
pub struct ExecutorParams(Vec<ExecutorParam>);
|
||||
|
||||
impl ExecutorParams {
|
||||
|
||||
@@ -1708,6 +1708,7 @@ impl PvfCheckStatement {
|
||||
|
||||
/// Type discriminator for PVF preparation timeouts
|
||||
#[derive(Encode, Decode, TypeInfo, Clone, Copy, Debug, PartialEq, Eq)]
|
||||
#[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))]
|
||||
pub enum PvfPrepTimeoutKind {
|
||||
/// For prechecking requests, the time period after which the preparation worker is considered
|
||||
/// unresponsive and will be killed.
|
||||
@@ -1721,6 +1722,7 @@ pub enum PvfPrepTimeoutKind {
|
||||
|
||||
/// Type discriminator for PVF execution timeouts
|
||||
#[derive(Encode, Decode, TypeInfo, Clone, Copy, Debug, PartialEq, Eq)]
|
||||
#[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))]
|
||||
pub enum PvfExecTimeoutKind {
|
||||
/// The amount of time to spend on execution during backing.
|
||||
Backing,
|
||||
|
||||
Reference in New Issue
Block a user