Luxor/reduce council budget#5062
Conversation
|
@ignazio-bovo please change target branch to |
kdembler
left a comment
There was a problem hiding this comment.
Look good to me, will approve once we finalize the params for proposal, waiting for council feedback
| voting_period: days!(3), | ||
| grace_period: 0, | ||
| approval_quorum_percentage: TWO_OUT_OF_THREE, | ||
| approval_threshold_percentage: TWO_OUT_OF_THREE, | ||
| slashing_quorum_percentage: ALL, | ||
| slashing_threshold_percentage: ALL, | ||
| required_stake: Some(dollars!(50)), | ||
| constitutionality: 1, |
There was a problem hiding this comment.
We need to adjust those, will get back to you
There was a problem hiding this comment.
Council has approved a signal to make this 3/3 approval, 1 constitutionality: https://pioneer.joyutils.org/#/proposals/preview/797
There was a problem hiding this comment.
Let me know if also the quorum percentage is correct
… metadatat" This reverts commit 4041f80.
bf8cf0c to
c2acd1e
Compare
mnaamani
left a comment
There was a problem hiding this comment.
Runtime implementation looks good.
I think you ran the query-node build before the runtime spec was updated, that is why the query-node/chain-metadata/2002.json file is modified. Please revert it to one from master.
The integration test fails because the mappings do not handle case of the new proposal, so the processor fails to handle the event. Do you want to add the mapping and schema update for QN in this PR or a separately?
|
The QN part is handled separately |
mnaamani
left a comment
There was a problem hiding this comment.
Just need to add a weight function for the decrease_council_budget dispatch call.
runtime-modules/council/src/lib.rs
Outdated
| /// - db: | ||
| /// - `O(1)` doesn't depend on the state or parameters | ||
| /// # </weight> | ||
| #[weight = 10_000_000] // TODO: adjust |
There was a problem hiding this comment.
Should we add a weight function for this dispatch
There was a problem hiding this comment.
This was part of a bigger issue that there are no benchmarks.
I have added that for the reduce_council_budget, thanks for pointing it out
| OperationsWorkingGroupBeta: working_group::<Instance7>::{Pallet, Call, Storage, Event<T>}, | ||
| OperationsWorkingGroupGamma: working_group::<Instance8>::{Pallet, Call, Storage, Event<T>}, | ||
| DistributionWorkingGroup: working_group::<Instance9>::{Pallet, Call, Storage, Event<T>}, | ||
| Council: council::{Pallet, Call, Storage, Event<T>}, |
There was a problem hiding this comment.
Why did you find it necessary to move the Council pallet down here.
There was a problem hiding this comment.
error[E0277]: the trait bound `RuntimeEvent: From<pallet_council::RawEvent<u64, u64, u64, u64>>` is not satisfied
--> runtime-modules/proposals/codex/src/tests/mock.rs:696:25
|
696 | type RuntimeEvent = RuntimeEvent;
| ^^^^^^^^^^^^ the trait `From<pallet_council::RawEvent<u64, u64, u64, u64>>` is not implemented for `RuntimeEvent`
There was a problem hiding this comment.
without that
There was a problem hiding this comment.
Is is something about the way this particular mock is implemented with respect to types. We do not seem to need to do the same for the main runtime/lib.rs
[QN] Luxor: Reduce council budget mappings
Fix decrease council budget proposal amount value
mnaamani
left a comment
There was a problem hiding this comment.
I think this is good to merge, just left some general comments.
| event: SubstrateEvent, | ||
| store: DatabaseManager, | ||
| proposalDetails: RuntimeProposalDetails_V1001 | RuntimeProposalDetails_V2002 | ||
| proposalDetails: RuntimeProposalDetails_V2003 |
There was a problem hiding this comment.
I think this change is okay, although we probably should implement this function in future to account for any removed proposals between runtimes. To date we have only been adding new proposals.
| /// - `O(1)` doesn't depend on the state or parameters | ||
| /// # </weight> | ||
| #[weight = CouncilWeightInfo::<T>::decrease_council_budget()] | ||
| pub fn decrease_council_budget(origin, reduction_amount: Balance<T>) -> Result<(), Error<T>> { |
There was a problem hiding this comment.
when adding a new dispatch that is invoked by a proposal, it is best to try to add it at the end so that the method index of existing dispatches doesn't change, so we can have the option to not remove all pending proposals on runtime upgrades.
| OperationsWorkingGroupBeta: working_group::<Instance7>::{Pallet, Call, Storage, Event<T>}, | ||
| OperationsWorkingGroupGamma: working_group::<Instance8>::{Pallet, Call, Storage, Event<T>}, | ||
| DistributionWorkingGroup: working_group::<Instance9>::{Pallet, Call, Storage, Event<T>}, | ||
| Council: council::{Pallet, Call, Storage, Event<T>}, |
There was a problem hiding this comment.
Is is something about the way this particular mock is implemented with respect to types. We do not seem to need to do the same for the main runtime/lib.rs
addresses: #3494
Budget is simply reduced by the amount (there is no token minting until workers/councilors gets paid)
I have also added a proposal, with the same parameters as the
freeze_palletproposal