You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With a recent update, substrate changed the default requirements of a pallet's storage and dispatchable arguments. See paritytech/substrate#10652. This default shall become mandatory in the future for all pallets.
For most of our types, we can simply add a derive attribute MaxEncodedLen, which specifies the maximum number of bytes that an encoded value can have. To support this in all pallets, we need:
#2)
* See encointer/pallets#132. This means we can't use `Vec<u8>` as the field for the `GeoHash`.
I chose to go for a const generic approach as it is more efficient than a `bounded_vec` approach. Further, the bounded_vec approach would require checking each operation if it lets the vec grow beyond its size.
Other changes:
* GeoHash field is private now: Implies that every GeoHash object does now contain a valid geo hash, as all construction helpers would fail upon construction.
* Implemented some more conversion traits.
With a recent update, substrate changed the default requirements of a pallet's storage and dispatchable arguments. See paritytech/substrate#10652. This default shall become mandatory in the future for all pallets.
For most of our types, we can simply add a derive attribute
MaxEncodedLen
, which specifies the maximum number of bytes that an encoded value can have. To support this in all pallets, we need:MaxEncodedLen
for all types in:MaxEncodedLen
for all types typenum#2MaxEncodedLen
for all fixed types substrate-fixed#14MaxEncodedLen
for it. geohash#2WeakBoundedVec
orBoundedVec
and give them a sensible default for the size.PalletString
type to aBoundedVec
, which unfortunately means that we can't use the convenientString
type in std.For the time being, I added the pallet attribute
#[pallet::without_storage_info]
to pallets not yet supporting theMaxEncodedLen
.Pallets that still need migration:
The text was updated successfully, but these errors were encountered: