-
Notifications
You must be signed in to change notification settings - Fork 2.6k
removed without_storage_info
from pallet-collective
#14585
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: muraca <mmuraca247@gmail.com>
@ggwpez could you please run benchmarks? |
bot bench $ pallet dev pallet_collective |
@juangirini https://gitlab.parity.io/parity/mirrors/substrate/-/jobs/3198277 was started for your command Comment |
@juangirini Command |
The CI pipeline was cancelled due to failure one of the required jobs. |
Signed-off-by: muraca <mmuraca247@gmail.com>
pub type ProposalOf<T: Config<I>, I: 'static = ()> = | ||
StorageMap<_, Identity, T::Hash, <T as Config<I>>::Proposal, OptionQuery>; | ||
CountedStorageMap<_, Identity, T::Hash, BoundedVec<u8, ConstU32<MAX_SIZE>>, OptionQuery>; |
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.
Sorry if this was a missunderstanding. We still need to use the preimage pallet, otherwise it is a re-implementation of it #12070. This is not really an unbound lookup, but it wastes massive PoV since the benchmarking will always assume the worst-case of 4 MiB.
Anyway I think you deserve a tip for this already, even if it does not merge 🙈 @juangirini
I think this map should be ProposalHash -> Bounded<Proposal>
. Does it make sense?
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.
@muraca if you want to be tipped please add your Kusaman or Polkadot address in the PR comment with this format
"[Polkadot | Kusama] address: xxxxx"
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.
the benchmarking will always assume the worst-case of 4 MiB.
@ggwpez I took a look at the benchmarks and weight functions before implementing this, and I saw that weights depend on the length bound passed as input parameter in the extrinsics.
If you are positive that this wouldn't work with the PoV size, or that even if it's bounded we don't like to re-implement preimages, a thumbs up is enough for me to proceed and re-add preimages.
I really really dislike the ProposalHash -> Bounded<Proposal>
approach, I feel it just wastes storage space. Alternatively, I could use the note
method to store the preimage and generate a hash to put in a Bounded::Lookup
variant when I need to interact with preimages to request or delete from storage.
/tip small |
@juangirini A small (20 DOT) tip was successfully submitted for @muraca (12poSUQPtcF1HUPQGY3zZu2P8emuW9YnsPduA4XG3oCEfJVp on polkadot). https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/referenda |
Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions. |
Closes paritytech/polkadot-sdk#167
Proposals
was removedProposalOf
is now aCountedStorageMap
to handle theMaxProposals
boundProposalOf
now stores an encodedProposal
in aBoundedVec
that contains at most 4 megabytesVoting
is now boundedMembers
is now boundedCumulus companion: cumulus#2884 here
Polkadot address: 12poSUQPtcF1HUPQGY3zZu2P8emuW9YnsPduA4XG3oCEfJVp