-
Notifications
You must be signed in to change notification settings - Fork 566
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
Fungibles: migrate Democracy pallet #1861
base: master
Are you sure you want to change the base?
Conversation
@@ -1065,7 +1067,7 @@ impl pallet_democracy::Config for Runtime { | |||
// only do it once and it lasts only for the cool-off period. | |||
type VetoOrigin = pallet_collective::EnsureMember<AccountId, TechnicalCollective>; | |||
type CooloffPeriod = CooloffPeriod; | |||
type Slash = Treasury; | |||
type Slash = (); |
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.
We may want to adapt treasury to accept slashes from pallet_democracy here...
substrate/frame/democracy/src/migrations/unlock_and_unreserve_all_funds.rs
Outdated
Show resolved
Hide resolved
Yea, we can make wrapper structs. I wrote these interfaces to act as lowers building blocks, so adding convenience ontop should be fine. Btw what docs did you find? Just asking to see where people look for docs. |
I used @juangirini example mbm PR |
…tech#1861) * MaxValues limit for storage maps in the pallet-bridge-grandpa * remove use from the future PR
…tech#1861) * MaxValues limit for storage maps in the pallet-bridge-grandpa * remove use from the future PR
…tech#1861) * MaxValues limit for storage maps in the pallet-bridge-grandpa * remove use from the future PR
…tech#1861) * MaxValues limit for storage maps in the pallet-bridge-grandpa * remove use from the future PR
…tech#1861) * MaxValues limit for storage maps in the pallet-bridge-grandpa * remove use from the future PR
…tech#1861) * MaxValues limit for storage maps in the pallet-bridge-grandpa * remove use from the future PR
…tech#1861) * MaxValues limit for storage maps in the pallet-bridge-grandpa * remove use from the future PR
…tech#1861) * MaxValues limit for storage maps in the pallet-bridge-grandpa * remove use from the future PR
…tech#1861) * MaxValues limit for storage maps in the pallet-bridge-grandpa * remove use from the future PR
…tech#1861) * MaxValues limit for storage maps in the pallet-bridge-grandpa * remove use from the future PR
The CI pipeline was cancelled due to failure one of the required jobs. |
…tech#1861) * MaxValues limit for storage maps in the pallet-bridge-grandpa * remove use from the future PR
…tech#1861) * MaxValues limit for storage maps in the pallet-bridge-grandpa * remove use from the future PR
…tech#1861) * MaxValues limit for storage maps in the pallet-bridge-grandpa * remove use from the future PR
…tech#1861) * MaxValues limit for storage maps in the pallet-bridge-grandpa * remove use from the future PR
…tech#1861) * MaxValues limit for storage maps in the pallet-bridge-grandpa * remove use from the future PR
* MaxValues limit for storage maps in the pallet-bridge-grandpa * remove use from the future PR
Partial for #226
The (Reservable/Lockable)Currency traits are deprecated after this paritytech/substrate#12951 in favour of the fungible traits.
A few things have changed:
ReservableCurrency::(reserve/unreserve)
becomesfungible::MutateHold::(hold/release)
LockableCurrency::(extend_lock/remove_lock/set_lock)
becomesfungible::MutateFreeze::(extend_freeze/thaw/set_freeze)
Holds and Freezes
Holds are roughly analagous to reserves, but are now explicitly designed to be infallibly slashed. They do not contribute to the ED but do require a provider reference, removing any possibility of account reference counting from being problematic for a slash. They are also always named, ensuring different holds do not accidentally slash each other's balances.
Freezes are essentially the same as locks, except that they overlap with Holds. Since Holds are designed to be infallibly slashed, this means that any logic using a Freeze must handle the possibility of the frozen amount being reduced, potentially to zero. A permissionless function should be provided in order to allow bookkeeping to be updated in this instance.
Both Holds and Freezes require an identifier which is configurable and is expected to be an enum aggregated across all pallet instances of the runtime.
In the Pallet Democracy context we define
HoldReason::Proposal
andFreezeReason::Proposal
.Upgrade notes
The
pallet_democracy::Config
trait now requires new typeRuntimeHoldReason
andRuntimeFreezeReason
:Also,
construct_runtime
needspallet_democracy::HoldReason
and :pallet_democracy::FreezeReason
:Migration
A (multi-block) migration is provided with this PR, which will convert all existing locks to holds and freezes.