-
Notifications
You must be signed in to change notification settings - Fork 699
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
removed without_storage_info
from pallet-collective
#1445
base: master
Are you sure you want to change the base?
Conversation
6d401ff
to
c2751c4
Compare
@ggwpez @juangirini this is ready for review, and needs new weights |
cumulus/parachains/runtimes/collectives/collectives-polkadot/src/impls.rs
Outdated
Show resolved
Hide resolved
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.
Looking good!
On the migration side, this needs:
- An implementation of
OnRuntimeUpgrade
including pre/post_upgrade hooks to ensure successful migration - Unit tests for the
OnRuntimeUpgrade
struct - The
OnRuntimeUpgrade
added to theExecutive
palletMigrations
tuple for all runtimes that use the pallet
Let me know if you have any questions
c987be4
to
f52aac8
Compare
bot bench $ pallet dev pallet-collective |
@liamaharon Positional arguments are not supported anymore. I guess you meant |
bot bench substrate-pallet --pallet=pallet-collective |
@liamaharon option '--pallet ' argument 'pallet-collective' is invalid. argument pallet is not matching rule ^([a-z_]+)([:]{2}[a-z_]+)?$ |
bot bench substrate-pallet --pallet=pallet_collective |
Signed-off-by: muraca <mmuraca247@gmail.com>
…=dev --target_dir=substrate --pallet=pallet_collective
Signed-off-by: muraca <mmuraca247@gmail.com>
Signed-off-by: muraca <mmuraca247@gmail.com>
Signed-off-by: muraca <mmuraca247@gmail.com>
Signed-off-by: muraca <mmuraca247@gmail.com>
Signed-off-by: muraca <mmuraca247@gmail.com>
Signed-off-by: muraca <mmuraca247@gmail.com>
…=dev --target_dir=substrate --pallet=pallet_collective
Signed-off-by: muraca <mmuraca247@gmail.com>
Signed-off-by: Matteo Muraca <mmuraca247@gmail.com>
Signed-off-by: Matteo Muraca <mmuraca247@gmail.com>
this needs another benchmark please |
CC @ggwpez |
please 🥹 |
pub struct VersionUncheckedMigrateToV5<T, I>(sp_std::marker::PhantomData<(T, I)>); | ||
impl<T: Config<I>, I: 'static> OnRuntimeUpgrade for VersionUncheckedMigrateToV5<T, I> { | ||
#[cfg(feature = "try-runtime")] | ||
fn pre_upgrade() -> Result<Vec<u8>, sp_runtime::TryRuntimeError> { |
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.
doc?
let mut weight = Weight::zero(); | ||
|
||
// ProposalOf | ||
for (hash, proposal) in old::ProposalOf::<T, I>::drain() { |
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.
Probably need to make this a multi-block migration.
old_proposals.len() as u32 == crate::Voting::<T, I>::count(), | ||
"the number of proposals should be the same", | ||
); | ||
for old in old_proposals { |
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.
can we also check that the state of each new proposal is correct (relative to the old proposal state)?
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.
Proposal is saved in a key-value store, where the key is the hash of the value, and is being migrated to Preimages.
We are moving the content here
for (hash, proposal) in old::ProposalOf::<T, I>::drain() { |
did you mean that I should do an integrity check on the content in the post-upgrade check as well?
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.
Yes, post_upgrade
should check every piece of data migrated against the pre-upgrade data and ensure it's in the correct
bot bench substrate-pallet --pallet=pallet_collective sry did not see the notifications. |
@ggwpez https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/5738413 was started for your command Comment |
@ggwpez Command |
Benchmarks dont compile... weird error: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/5738413 |
Closes #167
Voting might eventually be converted into a BoundedMap theorized in #141
Polkadot address: 12poSUQPtcF1HUPQGY3zZu2P8emuW9YnsPduA4XG3oCEfJVp