paritytech / polkadot-sdk

The Parity Polkadot Blockchain SDK
https://polkadot.com/
1.92k stars 707 forks source link

[Deprecation] remove `pallet::getter` usage from all pallets #3326

Open muraca opened 9 months ago

muraca commented 9 months ago

This issue tracks the removal of pallet::getter in all pallets, as per #223. The preferred syntax is Key::<T>::get(). This approach avoids a huge PR and lots of merge conflicts, a mistake I already made when I tried to perform this task last year.

As these PRs introduce breaking changes, a prdoc file is required. An example is this one I wrote for #3371 I suggest to use the prdoc cli tool.

Bridges:

Cumulus:

Polkadot:

FRAME:

cc @kianenigma @shawntabrizi

k-gunjan commented 9 months ago

I want to work on pallet-aura

PolkadotDom commented 6 months ago

@muraca Did we come to consensus on what to do about storage values that lose visibility due to being pub(super), etc? Are we standing behind value::<T, I>::get() usage so staunchly that we should just mark them pub? Or should we implement getters such that they remain read-only?

muraca commented 6 months ago

In the past PRs I have done I have marked all the storage items as pub, however take my words with a grain of salt as I'm just a mere open source contributor, I don't want any responsibility on this 😄

PolkadotDom commented 6 months ago

Hahah sounds good! I'm going to try the 'implement a replacement getter' approach and we'll see if I get yelled at. I feel data authority is important enough for this to be the route.

Aideepakchaudhary commented 5 months ago

I want to work on Pallet-tips

PolkadotDom commented 4 months ago

I want to work on Pallet-tips

Go for it! And to catch you up, basically all storage values are to be changed to pub (from pub(super) lets say) and all removed getters are to be reimplemented explicitly such that the public API remains the same. This is according to #223 and an example PR is #4840

In addition - we've been converting syntax over to turbo fish as well

Zebedeusz commented 1 month ago

I'm taking on pallet-offences

Zebedeusz commented 1 month ago

I'm starting to work on pallet-staking