-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Collective: dynamic deposit based on number of proposals #3151
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
Merged
Merged
Changes from all commits
Commits
Show all changes
68 commits
Select commit
Hold shift + click to select a range
cbfd5b3
deposit trait and types, proposal deposit
muharem bff29ac
upgrade to benchmarks v2
muharem 9bc7f8a
fixes
muharem 09f7b3f
benchmarks
muharem cc9a9e3
imports
muharem de84000
tests
muharem a775365
fix
muharem 311eb49
prdoc
muharem 5100036
fix prdoc title
muharem b8b927a
fix pallet alliance
muharem 563e7ad
Merge remote-tracking branch 'origin/master' into muharem-collective-…
muharem bb704fa
docify examples
muharem feb84e6
fix pallet utility
muharem f076867
fmt
muharem f7072fe
geometric and round types
muharem 737b4ce
doc fix
muharem 357af6f
Merge branch 'master' of https://github.com/paritytech/polkadot-sdk i…
0dd1d70
".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime…
cf71614
Merge remote-tracking branch 'origin/master' into muharem-collective-…
muharem 2e13ff1
Merge remote-tracking branch 'origin/master' into muharem-collective-…
muharem 36f1855
remove unused import
muharem c8dd9c4
".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime…
05633e3
Merge branch 'master' into muharem-collective-deposit
muharem b213af4
Merge remote-tracking branch 'origin/master' into muharem-collective-…
muharem 94c35f9
use considerations
muharem 29bfd87
improve doc
muharem 61dba53
remove unused imports
muharem 23d6385
fixes
muharem a687855
fixe benches
muharem f67e747
fix pr doc
muharem ccb7035
Merge branch 'master' of https://github.com/paritytech/polkadot-sdk i…
c5eaefd
".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime…
1d88228
Merge branch 'master' into muharem-collective-deposit
muharem 615c5ff
Merge remote-tracking branch 'origin/master' into muharem-collective-…
muharem f505e78
fix import
muharem de9a123
fixes
muharem 692e62d
Apply suggestions from code review
muharem 5ee2439
fix weights
muharem fbddc7a
fix weights
muharem 33965f8
collectives westend collective pallet weights
muharem d3e76cb
Apply suggestions from code review
muharem 87016f3
Merge branch 'master' of https://github.com/paritytech/polkadot-sdk i…
9b6dae2
".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime…
75d6ad9
Merge branch 'master' of https://github.com/paritytech/polkadot-sdk i…
f7a7742
".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime…
ddb8d23
".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime…
0b09a4a
update round type
muharem 5f2fa9f
update prdoc
muharem 4e95fe4
Merge branch 'master' into muharem-collective-deposit
muharem a0a8f73
Merge remote-tracking branch 'origin/master' into muharem-collective-…
muharem a0ddd4c
not optional considerations
muharem 16eb8d2
Merge branch 'master' into muharem-collective-deposit
muharem 82e6889
remove debug outputs
muharem 46cb545
Merge remote-tracking branch 'origin/master' into muharem-collective-…
muharem 3f8a76c
maybe consideration
muharem d92f622
prdoc fix
muharem 0246fa8
fix benches
muharem 9e89a72
update pr doc
muharem 7884b85
improve doc
muharem bf272d6
Merge branch 'master' of https://github.com/paritytech/polkadot-sdk i…
4f04c4b
".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime…
318958a
Merge branch 'master' of https://github.com/paritytech/polkadot-sdk i…
da151e1
".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime…
e6b5891
Update from mordamax running command 'bench --runtime dev --pallet pa…
actions-user c47e3b5
Merge branch 'master' into muharem-collective-deposit
muharem fbb88c9
fix weights
muharem 4520950
".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime…
7582764
Merge branch 'master' into muharem-collective-deposit
muharem File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.