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

Optimize find delegation validators #3043

Merged
merged 13 commits into from
Apr 27, 2024
Merged

Conversation

brentstone
Copy link
Contributor

@brentstone brentstone commented Apr 9, 2024

Describe your changes

Closes #3015.

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

v0.33.0

Checklist before merging to draft

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

@brentstone brentstone mentioned this pull request Apr 9, 2024
2 tasks
@brentstone brentstone marked this pull request as ready for review April 10, 2024 02:29
@brentstone brentstone self-assigned this Apr 10, 2024
Copy link
Member

@tzemanovic tzemanovic left a comment

Choose a reason for hiding this comment

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

looks good besides the tiny comments

brentstone added a commit that referenced this pull request Apr 10, 2024
@brentstone
Copy link
Contributor Author

looks good besides the tiny comments

thanks, think I still may include the pruning of DelegationEpochs data. Realized I left a couple ToDos

Copy link

codecov bot commented Apr 10, 2024

Codecov Report

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

Project coverage is 59.49%. Comparing base (97ec5b4) to head (4336b33).
Report is 4 commits behind head on main.

Files Patch % Lines
crates/proof_of_stake/src/queries.rs 84.84% 10 Missing ⚠️
crates/sdk/src/rpc.rs 0.00% 9 Missing ⚠️
crates/light_sdk/src/reading/asynchronous/pos.rs 0.00% 5 Missing ⚠️
crates/namada/src/ledger/governance/mod.rs 87.09% 4 Missing ⚠️
crates/sdk/src/queries/vp/pos.rs 0.00% 4 Missing ⚠️
crates/proof_of_stake/src/lib.rs 97.79% 3 Missing ⚠️
crates/sdk/src/signing.rs 0.00% 2 Missing ⚠️
crates/sdk/src/tx.rs 0.00% 2 Missing ⚠️
crates/governance/src/storage/mod.rs 50.00% 1 Missing ⚠️
crates/light_sdk/src/transaction/governance.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3043      +/-   ##
==========================================
+ Coverage   59.39%   59.49%   +0.09%     
==========================================
  Files         298      298              
  Lines       92771    92967     +196     
==========================================
+ Hits        55104    55310     +206     
+ Misses      37667    37657      -10     

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

@brentstone brentstone mentioned this pull request Apr 12, 2024
tzemanovic
tzemanovic previously approved these changes Apr 18, 2024
brentstone added a commit that referenced this pull request Apr 18, 2024
* brent/delegation-validators:
  better comment
  use unslashed bond amounts in `find_delegations`
  fix from comments
  changelog: add #3043
  prune old `prev_ranges` data
  fix edge case (fully unbond then rebond)
  fixes from review comments
  fix and finish test
  new approach
  don't merklize delegation targets
  improve nomenclature and comments
  rename and fix rpc fns to get delegator's target validators
  track all validators to which an account has bonded tokens
brentstone added a commit that referenced this pull request Apr 18, 2024
* brent/delegation-validators:
  better comment
  use unslashed bond amounts in `find_delegations`
  fix from comments
  changelog: add #3043
  prune old `prev_ranges` data
  fix edge case (fully unbond then rebond)
  fixes from review comments
  fix and finish test
  new approach
  don't merklize delegation targets
  improve nomenclature and comments
  rename and fix rpc fns to get delegator's target validators
  track all validators to which an account has bonded tokens
@Fraccaman Fraccaman mentioned this pull request Apr 24, 2024
2 tasks
@brentstone brentstone merged commit 9ee11a9 into main Apr 27, 2024
17 of 19 checks passed
@brentstone brentstone deleted the brent/delegation-validators branch April 27, 2024 00:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optimize searching for all validators to which a delegator is bonded
2 participants