Skip to content

Patch pallet-multisig in stable2412 - incompatible weighs vs benchmark #8334

@bkontur

Description

@bkontur

Benchmarks for pallet-multisig generates incompatible weights for stable2412 (master and stable2503 are ok).
So probably something was not backported to the stable2412 or we didn't generate benchmarks for pallet-multisig in polkadot-sdk.

For example for approve_as_multi_create benchmark contains z component:
https://github.com/paritytech/polkadot-sdk/blob/stable2412/substrate/frame/multisig/src/benchmarking.rs#L200-L203

#[benchmark]
	fn approve_as_multi_create(
		s: Linear<2, { T::MaxSignatories::get() }>,
		z: Linear<0, 10_000>,
	) -> Result<(), BenchmarkError> {

But the weighs trait does not: https://github.com/paritytech/polkadot-sdk/blob/stable2412/substrate/frame/multisig/src/weights.rs#L57

fn approve_as_multi_create(s: u32, ) -> Weight;

The result is that runtime does not compile:

Compiling staging-kusama-runtime v1.0.0 (/home/bkontur/cargo-remote-builds-fellows/3744595396643541023/relay/kusama)
  error[E0050]: method `approve_as_multi_create` has 2 parameters but the declaration in trait `approve_as_multi_create` has 1
     --> /home/bkontur/cargo-remote-builds-fellows/3744595396643541023/relay/kusama/src/weights/pallet_multisig.rs:121:32
      |
  121 |     fn approve_as_multi_create(s: u32, _z: u32, ) -> Weight {
      |                                   ^^^^^^^^^^^^ expected 1 parameter, found 2
      |
      = note: `approve_as_multi_create` from trait: `fn(u32) -> sp_runtime::Weight`

  error[E0050]: method `approve_as_multi_approve` has 2 parameters but the declaration in trait `approve_as_multi_approve` has 1
     --> /home/bkontur/cargo-remote-builds-fellows/3744595396643541023/relay/kusama/src/weights/pallet_multisig.rs:137:33
      |
  137 |     fn approve_as_multi_approve(s: u32, z: u32, ) -> Weight {
      |                                    ^^^^^^^^^^^ expected 1 parameter, found 2
      |
      = note: `approve_as_multi_approve` from trait: `fn(u32) -> sp_runtime::Weight`

  error[E0050]: method `cancel_as_multi` has 2 parameters but the declaration in trait `cancel_as_multi` has 1
     --> /home/bkontur/cargo-remote-builds-fellows/3744595396643541023/relay/kusama/src/weights/pallet_multisig.rs:155:24
      |
  155 |     fn cancel_as_multi(s: u32, _z: u32, ) -> Weight {
      |                           ^^^^^^^^^^^^ expected 1 parameter, found 2
      |
      = note: `cancel_as_multi` from trait: `fn(u32) -> sp_runtime::Weight`

  For more information about this error, try `rustc --explain E0050`.
  error: could not compile `staging-kusama-runtime` (lib) due to 3 previous errors

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions