-
Notifications
You must be signed in to change notification settings - Fork 305
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
feat(governance): 🧊 test that community pool spend proposals can be disabled #4222
Conversation
a988b3a
to
7836575
Compare
this echoes a previous change to some of the staking actions. this is helpful for e.g. manually forming governance proposal submissions with a `TransactionPlan`. this only changes the submission and withdrawal action, deposit claims are left alone for now.
this adds a `community_pool_is_frozen` field to the governance parameters. it is not yet wired into any application logic, this commit solely adjusts protobuffer definitions.
7836575
to
073e56d
Compare
💬 a tertiary discussion pointi see the following parameter: https://github.com/penumbra-zone/penumbra/blob/main/crates/core/component/community-pool/src/params.rs#L10-L13 my understanding is that this is similar, but not completely the same as, |
073e56d
to
94ea042
Compare
94ea042
to
1c9f124
Compare
this adds an invariant to the application, blocking community pool spend proposals when `community_pool_is_frozen` is true.
this adds a complimentary test to the previous test case, showing that we cannot make a community pool deposit if the pool is currently frozen.
first, we write a test that can be used to make a deposit into the community pool. show that the balance is updated accordingly.
1c9f124
to
fedfa8d
Compare
Hmm, it looks pretty much the same to me |
maybe we don't need both? |
cool, i am glad i asked! to state the difference explicitly, this new parameter also prevents community pool deposits when the pool is frozen. whether that is a useful property, i'm unsure. we probably don't need both though, i think that is a fair point nonetheless. in that case @hdevalence, do you think that we should keep the existing option, or remove/deprecate it in favor of this option? |
I think we should just have one parameter, it was an oversight on my part to not check that the work was already completed. The important thing is making sure that there's a chain parameter that prevents any community pool transactions from occurring. |
sounds good. i'll suggest the following course:
at risk of being pedantic again, the existing i think that is fine, but i want to be sure that it serves our needs, re: "prevents any community pool transactions from occurring." if so, this pr doesn't need to be consensus-breaking, and we can just treat this as the addition of more tests. |
9d44cbf
to
e249626
Compare
fixes #4079. related to, but does not finish #2105.
this introduces a new governance parameter that can be used to freeze or unfreeze the community pool. this branch additionally introduces a few mock consensus tests to exercise the governance component, to show that it works when unfrozen, and is properly disabled when frozen.this introduces test coverage to show that community pool spend proposals can be disabled via a chain parameter.
"the point"
the core mechanical change of this branch is made in these commits:see #4222 (comment) below.f88a981 feat(app): ✅ no spend proposals when pool is frozen5129012 feat(app): 🧊 community pool actions not accepted when frozen51e7063 feat(proto): 🏂 addcommunity_pool_is_frozen
to governance paramsNB: this is a consensus-breaking change, as a parameter will now block community pool transactions when this new parameter is active.related changes
some changes made, related to writing tests for the governance component:
Value
accessors for proposal actionsActionPlan: From
for community pool actionsAmount: std::ops::SubAssign
tests
this addresses part of #2105. we should add tests that exercise the other
tallying logic before that issue is complete. tests are added in the following
commits: