7

We're updating our weights to weights 2.0 but we're getting a lot of Proof Skipped lines in the output. What is the impact of this, and how do we fix it?

Example output:

/// Proof Skipped: Escrow Locked (max_values: None, max_size: None, mode: Measured)

1 Answer 1

6

Good question and sorry for the confusion - the comment is poorly chosen.

It indicates that the worst-case Proof Size limit could not be estimated. This can come from either:

  • The pallet of the storage item does not expose storage information. You can check this by looking for #[pallet::without_storage_info] in the accessed pallet. It needs to be removed in order to have correct proof benchmarking.
  • The storage item is not MaxEncodedLen bound (MEL). This implies the former. As soon as there is a not MEL bound storage item in a pallet, it cannot expose these storage info.

If your pallet is missing this exact information then FRAME measures the proof size that was required, hence the indication mode: Measured instead of mode: MaxEncodedLen. The impact is that the results may not reflect the worst-case scenario. So to say; there could scenarios to exploit that and inflate the PoV over the pre-dispatch estimations. In the worst case this means missed block production slots and stalled para-chains.
However for relay chains this is not an issue, since they do not produce proofs. You can basically ignore that for all pallets that will only be used on relay/solo chains.

Storage bounding pallets is not that easy. We tried in Substrate and it is quite time intensive. One tip is to use the Preimage pallet for large blobs instead of trying to re-implement something like that.

MEL

A T: MaxEncodedLen bound expresses that all instances of T will always encode to at most MaxEncodedLen::max_encoded_len() bytes. This is important since it provides up-front information about the worst case storage requirement for encoding any T. It is used to calculate the worst-case size of the Proof.

3
  • IIUC, you're saying that proof skipped or the proof-size cannot be estimated iff the pallet uses without_storage_info or doesn't use any storage items at all? I have a pallet that doesn't have storage items and I get a lot of Proof Skipped messages, thus my question. Commented Aug 2, 2023 at 7:26
  • The message was just wrong in a few places. It should disappear with recent Substrate. How is the without_storage_info deprecated? Sure it should not be used for parachain pallets, but that was always the case. Commented Aug 17, 2023 at 10:00
  • Apologies you're right! I might have confused not using it with deprecated. Thanks for the correction. Commented Aug 17, 2023 at 12:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.