Saner weights + lease calcuation fix. (#2778)

And have proper benchmarks.

---------

Co-authored-by: eskimor <eskimor@no-such-url.com>
Co-authored-by: command-bot <>
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
This commit is contained in:
eskimor
2023-12-27 14:17:59 +01:00
committed by GitHub
parent 7070b65d76
commit dcbc36a1c4
6 changed files with 176 additions and 158 deletions
@@ -245,7 +245,9 @@ impl<T: Config> OnNewSession<BlockNumberFor<T>> for Pallet<T> {
fn mk_coretime_call(call: crate::coretime::CoretimeCalls) -> Instruction<()> {
Instruction::Transact {
origin_kind: OriginKind::Superuser,
require_weight_at_most: Weight::from_parts(1000000000, 200000),
// Largest call is set_lease with 1526 byte:
// Longest call is reserve() with 31_000_000
require_weight_at_most: Weight::from_parts(100_000_000, 20_000),
call: BrokerRuntimePallets::Broker(call).encode().into(),
}
}