substrate
substrate copied to clipboard
Remove `without_storage_info` on pallets
https://github.com/paritytech/substrate/pull/8556
Need to update all instances of Vec in the runtime storage to BoundedVec, which will allow us to start generating worse case scenario PoV sizes.
- [ ] Validators / Session Stuff: https://github.com/paritytech/substrate/issues/8640
- [x] Aura
- [x] Authority Discovery
- [x] Babe
- [x] Grandpa
- [x] Im-Online
- [ ] Session
- [x] Authorship @koute https://github.com/paritytech/substrate/pull/11610
- [x] Beefy @KiChjang #11584
- [ ] Collective @koute
- [x] ConvictionVoting @gavofyork https://github.com/paritytech/substrate/pull/11631
- [x] Democracy @gavofyork https://github.com/paritytech/substrate/pull/11649
- [ ] ElectionProviderMultiPhase
- [ ] ElectionsPhragmen
- [ ] (Examples)
- [x] Lottery https://github.com/paritytech/substrate/pull/10594
- [x] Membership @skunert https://github.com/paritytech/substrate/pull/11591
- [ ] Multisig @shawntabrizi
- [ ] NodeAuthorization @koute https://github.com/paritytech/substrate/pull/11621
- [ ] Offences @ggwpez https://github.com/paritytech/substrate/pull/11585
- [x] Preimage @gavofyork https://github.com/paritytech/substrate/pull/11649
- [x] RankedCollective @shawntabrizi https://github.com/paritytech/substrate/pull/11602/files
- [x] Referenda @gavofyork https://github.com/paritytech/substrate/pull/11631
- [x] Remark @KiChjang #11590
- [x] Scheduler @gavofyork https://github.com/paritytech/substrate/pull/11649
- [ ] ScoredPool @hbulgarini https://github.com/paritytech/substrate/pull/11996
- [x] Society @gavofyork https://github.com/paritytech/substrate/pull/11324
- [ ] Staking
- [x] StateTrieMigration @ggwpez https://github.com/paritytech/substrate/pull/11639
- [ ] Sudo @shawntabrizi https://github.com/paritytech/substrate/pull/11596
- [ ] System @gavofyork Blocked on (Infra 3).
- [ ] Tips @shawntabrizi https://github.com/paritytech/substrate/pull/11596
- [x] TransactionStorage @skunert https://github.com/paritytech/substrate/pull/11668
- [x] Treasury https://github.com/paritytech/substrate/pull/8665
Polkadot:
- [ ] Pallet XCM
- [ ] XCM in general.
Infra stuff:
- [x]
PalletsOrigin@gavofyork https://github.com/paritytech/substrate/pull/11631 - [ ] ~~
Callshould implMaxEncodedLen. Two options:~~
- ~~Any dispatchables whose args do not all impl
MaxEncodedLenshould be marked#[pallet::call(unbounded)]and will not be included inCall. Introduce an additionalUnboundedCalltype which gets created in parallel toCall, and includes all dispatchables but does not implMaxEncodedLen.~~ - ~~Introduce a new Signed Extension
AuxData, from Preimages pallet. This places one or more blobs of data in a non-persistent storage item of Preimages pallet, indexed by its hash. It can be a map which is cleared aton_finalizebut would ideally use https://github.com/paritytech/substrate/issues/5396. The data can be retrieved through the usual Preimages API in exactly the same manner as the persistent preimages. Large arguments forCalls dispatched immediately in a transaction would be encoded and placed in thisAuxDataSigned Extension and referenced through hash. If such aCallwere expected to execution autonomously on-chain then the preimage would need to be registered as usual.note_preimagewould useAuxData,set_codewould use (via the trait interface) Preimages pallet.~~ -
Callneed not impl MEL, instead we can just avoid storing it directly but do so through a preimage. https://github.com/paritytech/substrate/pull/11649
- [ ]
#[pallet::storage(write_only)]for items which cannot/must not be read. the MEL is allowed to be undefined. in this case, and if a newproductionfeature is enabled, then there should be no storage API to read the item (this is a larger refactoring and will need additional changes to storage macros). this together with marking the low-level storage accesses as unsafe APIs will give build-time safety for PoV size. - [ ]
#[derive(MaxEncodedLen)should respect#[codec(skip)].
Before any pallet is checked off above, the final step in this process would be do remove the without_storage_info macro:
#[pallet::pallet]
#[pallet::generate_store(pub(super) trait Store)]
#[pallet::without_storage_info] <--- here
pub struct Pallet<T, I = ()>(PhantomData<(T, I)>);
This tells us that all the storage item in the pallet are compatible with the storage info trait.