gear icon indicating copy to clipboard operation
gear copied to clipboard

Invalid pallet kilobyte benches

Open ark0f opened this issue 3 years ago • 0 comments

Problem

In pallets/gear/src/benchmarking/mod.rs:

// `c`: Size of the code in kilobytes.
upload_code {
    let c in 0 .. Perbill::from_percent(49).mul_ceil(T::Schedule::get().limits.code_len);
  • c is actually in bytes
  • Perbill is used incorrectly. It's like 0.49 * 512kb = 256kb

Steps

Possible Solution

No response

Notes

No response

Relevant Log Output

Click to expand/collapse

<Paste your log here>

ark0f avatar Oct 10 '22 15:10 ark0f