Closed ilblackdragon closed 2 years ago
Delta/Granular/Path based updates to policy will also address the concern of snapshotted policy state being overwritten (when there are multiple proposals updating policy & the order they're passed will impact final policy state).
I think we're going to need more detail here in terms of how to approach this. I don't want to set people off on the wrong track. I will note this is a resource for how one might create a JavaScript file that can be run to change a policy: https://hackmd.io/lMmmRVXASuGf9Xrx75Pmlw?view#Add-proposal-to-change-policy
So what is the course of action we want to see here?
I'll give my suggestions here. Add proposal type:
ChangePolicyForRole
ChangePolicyForRole {
name: String,
role_permission: RolePermission
}
ChangeDefaultVotePolicy
ChangeDefaultVotePolicy {
policy: VotePolicy
}
ChangePolicyItem
enum PolicyItem {
ProposalBond,
ProposalPeriod,
BountyBond,
BountyForgivenessPeriod
}
ChangeDefaultVotePolicy {
item: PolicyItem,
value: U128
}
Note that for this one, there are two items (proposal_period
and bounty_forgiveness_period
) that use U64 instead of U128 and we'll be casting them as such.
I'll give my suggestions here. Add proposal type:
ChangePolicyForRole
ChangePolicyForRole { name: String, role_permission: RolePermission }
ChangeDefaultVotePolicy
ChangeDefaultVotePolicy { policy: VotePolicy }
ChangePolicyItem
enum PolicyItem { ProposalBond, ProposalPeriod, BountyBond, BountyForgivenessPeriod } ChangeDefaultVotePolicy { item: PolicyItem, value: U128 }
Note that for this one, there are two items (
proposal_period
andbounty_forgiveness_period
) that use U64 instead of U128 and we'll be casting them as such.
This looks like the perfect split to me.
I can start working on adding the ChangePolicyForRole
which seems to be the most important one, and then add the latter ones as well. How does that sounds?
I can start working on adding the
ChangePolicyForRole
which seems to be the most important one, and then add the latter ones as well. How does that sounds?
Sounds great, thanks Constantine!
This is already implemented here: https://github.com/near-daos/sputnik-dao-contract/pull/62 Please review.
When policy is too large, it's not possible to update it via Web Wallet. Specifically allowing for policy per group and per proposal type.