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] Add epoch argument to vp::pos::rewards #4297

Closed
wants to merge 17 commits into from

Conversation

tzemanovic
Copy link
Member

Describe your changes

This adds an epoch argument to the rewards() function in vp::pos. It does require a RPC node update in order to work, but it's backwards compatible. Tested with previous build of namadan and results are same as before:

With node on main and client on this branch:

$ ./target/debug/namadac rewards --source tnam1qrtypl0yazfamk8ptmgp608msl8wzrkpmqwppc7w --validator tnam1qxsx2ezu89gx252kwwluqp7hadyp285tkczhaqg0
Current rewards available for claim: 4625.955882 NAM

With both client and node on this branch:

$ ./target/debug/namadac rewards --source tnam1qrtypl0yazfamk8ptmgp608msl8wzrkpmqwppc7w --validator tnam1qxsx2ezu89gx252kwwluqp7hadyp285tkczhaqg0
Current rewards available for claim: 4625.955882 NAM

$ ./target/debug/namadac rewards --source tnam1qrtypl0yazfamk8ptmgp608msl8wzrkpmqwppc7w --validator tnam1qxsx2ezu89gx252kwwluqp7hadyp285tkczhaqg0 --epoch 60
Rewards for epoch 60: 4625.955882 NAM

$ ./target/debug/namadac rewards --source tnam1qrtypl0yazfamk8ptmgp608msl8wzrkpmqwppc7w --validator tnam1qxsx2ezu89gx252kwwluqp7hadyp285tkczhaqg0 --epoch 59
Rewards for epoch 59: 3887.536527 NAM

$ ./target/debug/namadac rewards --source tnam1qrtypl0yazfamk8ptmgp608msl8wzrkpmqwppc7w --validator tnam1qxsx2ezu89gx252kwwluqp7hadyp285tkczhaqg0 --epoch 58
Rewards for epoch 58: 3148.755426 NAM

Checklist before merging

  • If this PR has some consensus breaking changes, I added the corresponding breaking:: labels
    • This will require 2 reviewers to approve the changes
  • If this PR requires changes to the docs or specs, a corresponding PR is opened in the namada-docs repo
    • Relevant PR if applies:
  • If this PR affects services such as namada-indexer or namada-masp-indexer, a corresponding PR is opened in that repo
    • Relevant PR if applies:

Copy link
Contributor

mergify bot commented Feb 3, 2025

⚠️ The sha of the head commit of this PR conflicts with #4196. Mergify cannot evaluate rules on this PR. ⚠️

Copy link

codecov bot commented Feb 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.18%. Comparing base (80223b3) to head (3a0b4be).
Report is 37 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4297      +/-   ##
==========================================
+ Coverage   74.02%   74.18%   +0.16%     
==========================================
  Files         345      345              
  Lines      109920   110565     +645     
==========================================
+ Hits        81367    82024     +657     
+ Misses      28553    28541      -12     

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

Copy link
Contributor

mergify bot commented Feb 3, 2025

⚠️ The sha of the head commit of this PR conflicts with #4196. Mergify cannot evaluate rules on this PR. ⚠️

@tzemanovic tzemanovic closed this Feb 3, 2025
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.

2 participants