Skip to content
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 client bug preventing a validator with no self-bonds from voting in governance #2877

Merged
merged 12 commits into from
Apr 12, 2024

Conversation

brentstone
Copy link
Collaborator

@brentstone brentstone commented Mar 10, 2024

Describe your changes

Closes #2865. The client was preventing a validator that has delegations but no self-bonds from submitting a governance proposal vote tx. Now fixed.

Indicate on which release or other PRs this topic is based on

Based on #2803, which is based on v0.32.0.

Checklist before merging to draft

  • I have added a changelog
  • Git history is in acceptable state

Copy link

codecov bot commented Mar 10, 2024

Codecov Report

Attention: Patch coverage is 92.04956% with 154 lines in your changes are missing coverage. Please review.

Project coverage is 55.15%. Comparing base (5e0b162) to head (5c0fbeb).
Report is 4 commits behind head on main.

Files Patch % Lines
crates/sdk/src/tx.rs 0.00% 50 Missing ⚠️
crates/apps/src/lib/client/rpc.rs 0.00% 32 Missing ⚠️
...rates/apps/src/lib/node/ledger/shell/governance.rs 16.00% 21 Missing ⚠️
crates/governance/src/storage/proposal.rs 0.00% 13 Missing ⚠️
crates/apps/src/lib/cli.rs 0.00% 10 Missing ⚠️
crates/namada/src/ledger/governance/mod.rs 99.70% 5 Missing ⚠️
crates/sdk/src/lib.rs 0.00% 5 Missing ⚠️
crates/governance/src/storage/mod.rs 0.00% 4 Missing ⚠️
crates/sdk/src/args.rs 0.00% 3 Missing ⚠️
crates/sdk/src/signing.rs 0.00% 3 Missing ⚠️
... and 5 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2877      +/-   ##
==========================================
+ Coverage   53.44%   55.15%   +1.70%     
==========================================
  Files         310      309       -1     
  Lines      101574   102694    +1120     
==========================================
+ Hits        54288    56638    +2350     
+ Misses      47286    46056    -1230     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

brentstone added a commit that referenced this pull request Mar 10, 2024
@brentstone brentstone requested a review from Fraccaman March 10, 2024 21:33
@brentstone brentstone marked this pull request as ready for review March 10, 2024 21:33
Fraccaman
Fraccaman previously approved these changes Mar 11, 2024
));
}
let delegations = if is_validator {
let current_epoch = query_epoch(context.client()).await?;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dont need to query for the epoch, can you the one from received in the parameters

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah thx, missed that

brentstone added a commit that referenced this pull request Mar 15, 2024
@brentstone brentstone force-pushed the brent/fix-val-voting-no-self-bonds branch from 6d94e5d to e6149fa Compare March 15, 2024 21:39
brentstone added a commit that referenced this pull request Mar 15, 2024
@brentstone brentstone force-pushed the brent/fix-val-voting-no-self-bonds branch from e6149fa to c1cab03 Compare March 15, 2024 21:45
brentstone added a commit that referenced this pull request Mar 19, 2024
@brentstone brentstone force-pushed the brent/fix-val-voting-no-self-bonds branch from c1cab03 to 7278b50 Compare March 19, 2024 16:29
@brentstone brentstone force-pushed the brent/fix-val-voting-no-self-bonds branch from 7278b50 to 5c0fbeb Compare March 19, 2024 16:37
tzemanovic added a commit that referenced this pull request Apr 1, 2024
* origin/brent/fix-val-voting-no-self-bonds:
  fmt
  fix rebase
  remove unnecessary epoch query
  changelog: add #2877
  fix client bug preventing a validator with no self-bonds from voting
  fmt
  changelog: add #2803
  fmt + clippy
  more tests
  added unit tests
  fix governance vp
  remove offline governance, refactor tally types
tzemanovic added a commit that referenced this pull request Apr 10, 2024
* origin/brent/fix-val-voting-no-self-bonds:
  fmt
  fix rebase
  remove unnecessary epoch query
  changelog: add #2877
  fix client bug preventing a validator with no self-bonds from voting
@tzemanovic tzemanovic merged commit 20732bf into main Apr 12, 2024
18 of 19 checks passed
@tzemanovic tzemanovic deleted the brent/fix-val-voting-no-self-bonds branch April 12, 2024 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problem with voting
3 participants