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

PoS: re-usable bonds and unbonds query #1518

Merged
merged 3 commits into from
Jun 14, 2023
Merged

Conversation

tzemanovic
Copy link
Member

@tzemanovic tzemanovic commented Jun 7, 2023

based on 0.17.0

The bonds and unbonds query calculations performed for the CLI are moved to the shared crate fn enriched_bonds_and_unbonds to allow re-use.

Additionally, the withdrawable amounts didn't respect the current epoch (it was just a sum of unbonds) which is now checked properly.

@tzemanovic tzemanovic force-pushed the tomas/pos-bonds-query-reuse branch from 405cb92 to 8d4af14 Compare June 7, 2023 08:12
@tzemanovic tzemanovic marked this pull request as ready for review June 7, 2023 08:14
@emccorson
Copy link

I might be missing some way to call the function, but do the new functions need to be added to ledger/queries/vp/pos.rs to be used? That's how we are calling the other functions from the interface.

@tzemanovic
Copy link
Member Author

I might be missing some way to call the function, but do the new functions need to be added to ledger/queries/vp/pos.rs to be used? That's how we are calling the other functions from the interface.

ah sry, my misunderstanding - I'll move it there instead

@tzemanovic
Copy link
Member Author

moved the new function and types in 2c5f461

brentstone
brentstone previously approved these changes Jun 8, 2023
Copy link
Collaborator

@brentstone brentstone left a comment

Choose a reason for hiding this comment

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

LGTM

tzemanovic added a commit that referenced this pull request Jun 12, 2023
* tomas/pos-bonds-query-reuse:
  changelog: add #1518
  app/client/rpc: use enriched bonds and unbonds query
  shared/rpc: add bonds and unbonds details query enriched with extras
@tzemanovic tzemanovic mentioned this pull request Jun 12, 2023
Fraccaman added a commit that referenced this pull request Jun 14, 2023
* origin/tomas/pos-bonds-query-reuse:
  changelog: add #1518
  app/client/rpc: use enriched bonds and unbonds query
  shared/rpc: add bonds and unbonds details query enriched with extras
Fraccaman pushed a commit that referenced this pull request Jun 14, 2023
@Fraccaman Fraccaman merged commit b913066 into main Jun 14, 2023
@Fraccaman Fraccaman deleted the tomas/pos-bonds-query-reuse branch June 14, 2023 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants