-
Notifications
You must be signed in to change notification settings - Fork 983
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
Fix governance bugs #2133
Fix governance bugs #2133
Conversation
@@ -830,22 +830,23 @@ where | |||
pgf_fundings.sort_by(|a, b| a.id.cmp(&b.id)); | |||
|
|||
for funding in pgf_fundings { | |||
if credit_tokens( | |||
if storage_api::token::transfer( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is complete, we also need to update/change https://github.com/anoma/namada/blob/main/apps/src/lib/node/ledger/shell/finalize_block.rs#L858 - I think we can actually use credit_tokens
there, but then we shouldn't send the steward inflation to the PGF account in the first place (https://github.com/anoma/namada/blob/main/apps/src/lib/node/ledger/shell/finalize_block.rs#L812)
shared/src/ledger/governance/mod.rs
Outdated
) -> Result<bool> { | ||
let bond_handle = pos::namada_proof_of_stake::bond_handle( | ||
Ok(pos::namada_proof_of_stake::is_delegator( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could also add a check if address != delegation_address
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Describe your changes
Closes #1107.
Fixes the
is_delegator
function in the governance vp which could return true also for validators with self bonds.Corrects the inflation mechanism for pgf.
Indicate on which release or other PRs this topic is based on
Commit 3a0ecd8 on
base
(v0.25.0)Checklist before merging to
draft