-
Notifications
You must be signed in to change notification settings - Fork 711
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Collective: dynamic deposit based on number of proposals (#3151)
Introduce a dynamic proposal deposit mechanism influenced by the total number of active proposals, with the option to set the deposit to none. The potential cost (e.g., balance hold) for proposal submission and storage is determined by the implementation of the `Consideration` trait. The footprint is defined as `proposal_count`, representing the total number of active proposals in the system, excluding the one currently being proposed. This cost may vary based on the proposal count. The pallet also offers various types to define a cost strategy based on the number of proposals. Two new calls are introduced: - kill(origin, proposal_hash): the cancellation of a proposal, accompanied by the burning of the associated cost/consideration ticket. - release_proposal_cost(origin, proposal_hash): the release of the cost for a non-active proposal. Additionally change: - benchmarks have been upgraded to benchmarks::v2 for collective pallet; - `ensure_successful` function added to the `Consideration` under `runtime-benchmarks` feature. --------- Co-authored-by: command-bot <> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: GitHub Action <action@github.com>
- Loading branch information
1 parent
db41fab
commit cc3b7bb
Showing
13 changed files
with
1,402 additions
and
426 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
274 changes: 156 additions & 118 deletions
274
cumulus/parachains/runtimes/collectives/collectives-westend/src/weights/pallet_collective.rs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0 | ||
# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json | ||
|
||
title: Dynamic deposit based on number of proposals | ||
|
||
doc: | ||
- audience: | ||
- Runtime User | ||
- Runtime Dev | ||
description: | | ||
Introduce a dynamic proposal deposit mechanism influenced by the total number of active | ||
proposals, with the option to set the deposit to none. | ||
|
||
The potential cost (e.g., balance hold) for proposal submission and storage is determined | ||
by the implementation of the `Consideration` trait. The footprint is defined as `proposal_count`, | ||
representing the total number of active proposals in the system, excluding the one currently | ||
being proposed. This cost may vary based on the proposal count. The pallet also offers various | ||
types to define a cost strategy based on the number of proposals. | ||
|
||
Two new calls are introduced: | ||
- kill(origin, proposal_hash): the cancellation of a proposal, accompanied by the burning | ||
of the associated cost/consideration ticket. | ||
- release_proposal_cost(origin, proposal_hash): the release of the cost for a non-active proposal. | ||
|
||
New config parameters: | ||
- DisapproveOrigin: origin from which a proposal in any status may be disapproved without | ||
associated cost for a proposer; | ||
- KillOrigin: Origin from which any malicious proposal may be killed with associated cost | ||
for a proposer; | ||
- Consideration: mechanism to assess the necessity of some cost for publishing and storing | ||
a proposal. Set to unit type to have not submission cost; | ||
|
||
Additionally change: | ||
- benchmarks have been upgraded to benchmarks::v2 for collective pallet; | ||
- `ensure_successful` function added to the `Consideration` under `runtime-benchmarks` feature. | ||
|
||
crates: | ||
- name: pallet-collective | ||
bump: major | ||
- name: collectives-westend-runtime | ||
bump: major | ||
- name: kitchensink-runtime | ||
bump: major | ||
- name: pallet-alliance | ||
bump: patch | ||
- name: pallet-balances | ||
bump: patch | ||
- name: pallet-utility | ||
bump: patch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.