-
Notifications
You must be signed in to change notification settings - Fork 2.6k
pallet-utility: Fix possible mismatch between native/wasm #10121
Conversation
The `batched_calls_limit` constant value includes the `size_of` of the runtime `Call`. As we compile the runtime for native/wasm, we need to align the call size to ensure that it is the same on wasm/native. This also solves the problem of different metadata outputs for the same runtime.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
damn, I didn't foresee this.
in polkadot/kusama we have test that call is not too big and less than 230.
in case native and wasm size are not aligning like 1025 and 1023 we would still have the issue, but I guess 1024 is big enough indeed.
We could also add an integrity test to ensure call size is no more than 1024 as we run integrity test with native it should be fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was there actually a difference in native vs wasm though?
Caused by what?
the size of the call have some type which size are dependent on the platform, like a vec has a different size on 32bit or 64bit platform. |
|
…#10121) * pallet-utility: Fix possible mismatch between native/wasm The `batched_calls_limit` constant value includes the `size_of` of the runtime `Call`. As we compile the runtime for native/wasm, we need to align the call size to ensure that it is the same on wasm/native. This also solves the problem of different metadata outputs for the same runtime. * Review feedback
…#10121) * pallet-utility: Fix possible mismatch between native/wasm The `batched_calls_limit` constant value includes the `size_of` of the runtime `Call`. As we compile the runtime for native/wasm, we need to align the call size to ensure that it is the same on wasm/native. This also solves the problem of different metadata outputs for the same runtime. * Review feedback
The
batched_calls_limit
constant value includes thesize_of
of the runtimeCall
. As we compilethe runtime for native/wasm, we need to align the call size to ensure that it is the same on
wasm/native. This also solves the problem of different metadata outputs for the same runtime.
Progress on: paritytech/polkadot-sdk#934
CC @Slesarew