Use explicit call indices (#6449)

* cargo update -p sp-io

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Use explicit call indices

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
Oliver Tale-Yazdi
2022-12-19 23:13:34 +01:00
committed by GitHub
parent b9a55985bd
commit d387338fb0
21 changed files with 309 additions and 180 deletions
@@ -521,6 +521,7 @@ pub mod pallet {
#[pallet::call]
impl<T: Config> Pallet<T> {
/// Set the validation upgrade cooldown.
#[pallet::call_index(0)]
#[pallet::weight((
T::WeightInfo::set_config_with_block_number(),
DispatchClass::Operational,
@@ -536,6 +537,7 @@ pub mod pallet {
}
/// Set the validation upgrade delay.
#[pallet::call_index(1)]
#[pallet::weight((
T::WeightInfo::set_config_with_block_number(),
DispatchClass::Operational,
@@ -551,6 +553,7 @@ pub mod pallet {
}
/// Set the acceptance period for an included candidate.
#[pallet::call_index(2)]
#[pallet::weight((
T::WeightInfo::set_config_with_block_number(),
DispatchClass::Operational,
@@ -566,6 +569,7 @@ pub mod pallet {
}
/// Set the max validation code size for incoming upgrades.
#[pallet::call_index(3)]
#[pallet::weight((
T::WeightInfo::set_config_with_u32(),
DispatchClass::Operational,
@@ -578,6 +582,7 @@ pub mod pallet {
}
/// Set the max POV block size for incoming upgrades.
#[pallet::call_index(4)]
#[pallet::weight((
T::WeightInfo::set_config_with_u32(),
DispatchClass::Operational,
@@ -590,6 +595,7 @@ pub mod pallet {
}
/// Set the max head data size for paras.
#[pallet::call_index(5)]
#[pallet::weight((
T::WeightInfo::set_config_with_u32(),
DispatchClass::Operational,
@@ -602,6 +608,7 @@ pub mod pallet {
}
/// Set the number of parathread execution cores.
#[pallet::call_index(6)]
#[pallet::weight((
T::WeightInfo::set_config_with_u32(),
DispatchClass::Operational,
@@ -614,6 +621,7 @@ pub mod pallet {
}
/// Set the number of retries for a particular parathread.
#[pallet::call_index(7)]
#[pallet::weight((
T::WeightInfo::set_config_with_u32(),
DispatchClass::Operational,
@@ -626,6 +634,7 @@ pub mod pallet {
}
/// Set the parachain validator-group rotation frequency
#[pallet::call_index(8)]
#[pallet::weight((
T::WeightInfo::set_config_with_block_number(),
DispatchClass::Operational,
@@ -641,6 +650,7 @@ pub mod pallet {
}
/// Set the availability period for parachains.
#[pallet::call_index(9)]
#[pallet::weight((
T::WeightInfo::set_config_with_block_number(),
DispatchClass::Operational,
@@ -656,6 +666,7 @@ pub mod pallet {
}
/// Set the availability period for parathreads.
#[pallet::call_index(10)]
#[pallet::weight((
T::WeightInfo::set_config_with_block_number(),
DispatchClass::Operational,
@@ -671,6 +682,7 @@ pub mod pallet {
}
/// Set the scheduling lookahead, in expected number of blocks at peak throughput.
#[pallet::call_index(11)]
#[pallet::weight((
T::WeightInfo::set_config_with_u32(),
DispatchClass::Operational,
@@ -683,6 +695,7 @@ pub mod pallet {
}
/// Set the maximum number of validators to assign to any core.
#[pallet::call_index(12)]
#[pallet::weight((
T::WeightInfo::set_config_with_option_u32(),
DispatchClass::Operational,
@@ -698,6 +711,7 @@ pub mod pallet {
}
/// Set the maximum number of validators to use in parachain consensus.
#[pallet::call_index(13)]
#[pallet::weight((
T::WeightInfo::set_config_with_option_u32(),
DispatchClass::Operational,
@@ -710,6 +724,7 @@ pub mod pallet {
}
/// Set the dispute period, in number of sessions to keep for disputes.
#[pallet::call_index(14)]
#[pallet::weight((
T::WeightInfo::set_config_with_u32(),
DispatchClass::Operational,
@@ -722,6 +737,7 @@ pub mod pallet {
}
/// Set the dispute post conclusion acceptance period.
#[pallet::call_index(15)]
#[pallet::weight((
T::WeightInfo::set_config_with_block_number(),
DispatchClass::Operational,
@@ -737,6 +753,7 @@ pub mod pallet {
}
/// Set the maximum number of dispute spam slots.
#[pallet::call_index(16)]
#[pallet::weight((
T::WeightInfo::set_config_with_u32(),
DispatchClass::Operational,
@@ -749,6 +766,7 @@ pub mod pallet {
}
/// Set the dispute conclusion by time out period.
#[pallet::call_index(17)]
#[pallet::weight((
T::WeightInfo::set_config_with_block_number(),
DispatchClass::Operational,
@@ -765,6 +783,7 @@ pub mod pallet {
/// Set the no show slots, in number of number of consensus slots.
/// Must be at least 1.
#[pallet::call_index(18)]
#[pallet::weight((
T::WeightInfo::set_config_with_u32(),
DispatchClass::Operational,
@@ -777,6 +796,7 @@ pub mod pallet {
}
/// Set the total number of delay tranches.
#[pallet::call_index(19)]
#[pallet::weight((
T::WeightInfo::set_config_with_u32(),
DispatchClass::Operational,
@@ -789,6 +809,7 @@ pub mod pallet {
}
/// Set the zeroth delay tranche width.
#[pallet::call_index(20)]
#[pallet::weight((
T::WeightInfo::set_config_with_u32(),
DispatchClass::Operational,
@@ -801,6 +822,7 @@ pub mod pallet {
}
/// Set the number of validators needed to approve a block.
#[pallet::call_index(21)]
#[pallet::weight((
T::WeightInfo::set_config_with_u32(),
DispatchClass::Operational,
@@ -813,6 +835,7 @@ pub mod pallet {
}
/// Set the number of samples to do of the `RelayVRFModulo` approval assignment criterion.
#[pallet::call_index(22)]
#[pallet::weight((
T::WeightInfo::set_config_with_u32(),
DispatchClass::Operational,
@@ -825,6 +848,7 @@ pub mod pallet {
}
/// Sets the maximum items that can present in a upward dispatch queue at once.
#[pallet::call_index(23)]
#[pallet::weight((
T::WeightInfo::set_config_with_u32(),
DispatchClass::Operational,
@@ -837,6 +861,7 @@ pub mod pallet {
}
/// Sets the maximum total size of items that can present in a upward dispatch queue at once.
#[pallet::call_index(24)]
#[pallet::weight((
T::WeightInfo::set_config_with_u32(),
DispatchClass::Operational,
@@ -849,6 +874,7 @@ pub mod pallet {
}
/// Set the critical downward message size.
#[pallet::call_index(25)]
#[pallet::weight((
T::WeightInfo::set_config_with_u32(),
DispatchClass::Operational,
@@ -861,6 +887,7 @@ pub mod pallet {
}
/// Sets the soft limit for the phase of dispatching dispatchable upward messages.
#[pallet::call_index(26)]
#[pallet::weight((
T::WeightInfo::set_config_with_weight(),
DispatchClass::Operational,
@@ -873,6 +900,7 @@ pub mod pallet {
}
/// Sets the maximum size of an upward message that can be sent by a candidate.
#[pallet::call_index(27)]
#[pallet::weight((
T::WeightInfo::set_config_with_u32(),
DispatchClass::Operational,
@@ -885,6 +913,7 @@ pub mod pallet {
}
/// Sets the maximum number of messages that a candidate can contain.
#[pallet::call_index(28)]
#[pallet::weight((
T::WeightInfo::set_config_with_u32(),
DispatchClass::Operational,
@@ -900,6 +929,7 @@ pub mod pallet {
}
/// Sets the number of sessions after which an HRMP open channel request expires.
#[pallet::call_index(29)]
#[pallet::weight((
T::WeightInfo::set_hrmp_open_request_ttl(),
DispatchClass::Operational,
@@ -911,6 +941,7 @@ pub mod pallet {
}
/// Sets the amount of funds that the sender should provide for opening an HRMP channel.
#[pallet::call_index(30)]
#[pallet::weight((
T::WeightInfo::set_config_with_balance(),
DispatchClass::Operational,
@@ -924,6 +955,7 @@ pub mod pallet {
/// Sets the amount of funds that the recipient should provide for accepting opening an HRMP
/// channel.
#[pallet::call_index(31)]
#[pallet::weight((
T::WeightInfo::set_config_with_balance(),
DispatchClass::Operational,
@@ -936,6 +968,7 @@ pub mod pallet {
}
/// Sets the maximum number of messages allowed in an HRMP channel at once.
#[pallet::call_index(32)]
#[pallet::weight((
T::WeightInfo::set_config_with_u32(),
DispatchClass::Operational,
@@ -948,6 +981,7 @@ pub mod pallet {
}
/// Sets the maximum total size of messages in bytes allowed in an HRMP channel at once.
#[pallet::call_index(33)]
#[pallet::weight((
T::WeightInfo::set_config_with_u32(),
DispatchClass::Operational,
@@ -960,6 +994,7 @@ pub mod pallet {
}
/// Sets the maximum number of inbound HRMP channels a parachain is allowed to accept.
#[pallet::call_index(34)]
#[pallet::weight((
T::WeightInfo::set_config_with_u32(),
DispatchClass::Operational,
@@ -975,6 +1010,7 @@ pub mod pallet {
}
/// Sets the maximum number of inbound HRMP channels a parathread is allowed to accept.
#[pallet::call_index(35)]
#[pallet::weight((
T::WeightInfo::set_config_with_u32(),
DispatchClass::Operational,
@@ -990,6 +1026,7 @@ pub mod pallet {
}
/// Sets the maximum size of a message that could ever be put into an HRMP channel.
#[pallet::call_index(36)]
#[pallet::weight((
T::WeightInfo::set_config_with_u32(),
DispatchClass::Operational,
@@ -1002,6 +1039,7 @@ pub mod pallet {
}
/// Sets the maximum number of outbound HRMP channels a parachain is allowed to open.
#[pallet::call_index(37)]
#[pallet::weight((
T::WeightInfo::set_config_with_u32(),
DispatchClass::Operational,
@@ -1017,6 +1055,7 @@ pub mod pallet {
}
/// Sets the maximum number of outbound HRMP channels a parathread is allowed to open.
#[pallet::call_index(38)]
#[pallet::weight((
T::WeightInfo::set_config_with_u32(),
DispatchClass::Operational,
@@ -1032,6 +1071,7 @@ pub mod pallet {
}
/// Sets the maximum number of outbound HRMP messages can be sent by a candidate.
#[pallet::call_index(39)]
#[pallet::weight((
T::WeightInfo::set_config_with_u32(),
DispatchClass::Operational,
@@ -1047,6 +1087,7 @@ pub mod pallet {
}
/// Sets the maximum amount of weight any individual upward message may consume.
#[pallet::call_index(40)]
#[pallet::weight((
T::WeightInfo::set_config_with_weight(),
DispatchClass::Operational,
@@ -1059,6 +1100,7 @@ pub mod pallet {
}
/// Enable or disable PVF pre-checking. Consult the field documentation prior executing.
#[pallet::call_index(41)]
#[pallet::weight((
// Using u32 here is a little bit of cheating, but that should be fine.
T::WeightInfo::set_config_with_u32(),
@@ -1072,6 +1114,7 @@ pub mod pallet {
}
/// Set the number of session changes after which a PVF pre-checking voting is rejected.
#[pallet::call_index(42)]
#[pallet::weight((
T::WeightInfo::set_config_with_u32(),
DispatchClass::Operational,
@@ -1087,6 +1130,7 @@ pub mod pallet {
/// upgrade taking place.
///
/// See the field documentation for information and constraints for the new value.
#[pallet::call_index(43)]
#[pallet::weight((
T::WeightInfo::set_config_with_block_number(),
DispatchClass::Operational,
@@ -1103,6 +1147,7 @@ pub mod pallet {
/// Setting this to true will disable consistency checks for the configuration setters.
/// Use with caution.
#[pallet::call_index(44)]
#[pallet::weight((
T::DbWeight::get().writes(1),
DispatchClass::Operational,