Skip to content

Conversation

@Jeongseup
Copy link
Contributor

Describe your changes

Add some custom rpc queries for extracting onchain data for validators and delegators.

  1. First one is for getting first block height by epoch
    // First block height of the current epoch
    ( "first_block_height_by_epoch" / [epoch: Epoch] ) -> Option<BlockHeight> = first_block_height_by_epoch,
  1. Second one is for getting validators' reward products by epoch.
    ( "rewards_products" / [validator: Address] / [epoch: opt Epoch])
    -> Vec<(Epoch, Dec)> = rewards_products,

Actually, some of validators like us want to make specific epoch reward for validators and delegator. At that time, both of queries will be very useful. If your team want, I can attach calculating logic with that.

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:

@Jeongseup
Copy link
Contributor Author

@tzemanovic Could you please review this PR?

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.

2 participants