-
Notifications
You must be signed in to change notification settings - Fork 679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Collective pallet - remove without_storage_info
#167
Collective pallet - remove without_storage_info
#167
Comments
Can I take care of this? |
@muraca you are good to go, thanks! |
Please let us know once you have started working on it |
I have started to look into it, please let me know if what I deduced is correct or not. As it is done in pallet scheduler, the RuntimeCall (T::Proposal) can be bounded by using pallet preimage: if the call it's too big, it will store it in pallet preimage's storage, and return a hashed value. It makes sense to join the two different storages for hashes ( |
What you say seems to make sense, though I'd like to hear other opinions from @paritytech/frame-coders |
Indeed the hashing of proposals could be out-sources to I looked a bit into why |
It must go into the preimage pallet but we have the |
@ggwpez paritytech/substrate#11649 is exactly where I was studying the changes made on pallet scheduler. Anyway, I've been working on bounding the /// Info for keeping track of a motion being voted on.
#[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, TypeInfo, MaxEncodedLen)]
#[scale_info(skip_type_params(MaxMembers))]
pub struct Votes<AccountId, BlockNumber, MaxMembers: Get<u32>> {
/// The proposal's unique index.
index: ProposalIndex,
/// The number of approval votes that are needed to pass the motion.
threshold: MemberCount,
/// The current set of voters that approved it.
ayes: BoundedVec<AccountId, MaxMembers>,
/// The current set of voters that rejected it.
nays: BoundedVec<AccountId, MaxMembers>,
/// The hard end time of this vote.
end: BlockNumber,
} To make it work with MaxMembers as a parameter, I derived Eq and PartialEq in the impl_const_get macro and it works locally. |
#[derive(PartialEqNoBound, EqNoBound, CloneNoBound, Encode, Decode, RuntimeDebug, TypeInfo, MaxEncodedLen)] on your struct. |
I'm going to open the PR later today, at most tomorrow, after completing the companions for Polkadot and Cumulus. |
@juangirini @ggwpez since in paritytech/substrate#14355 according to this comment by Oliver basically I overdid it, I re-worked on the PR on a clean branch, you can find it in paritytech/substrate#14585. Looks like it doesn't require any companion PR. |
Hey @juangirini @ggwpez I'm addressing this again on #1445 |
Parent issue #323
The text was updated successfully, but these errors were encountered: