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

[RPC] Add Rewards Endpoint #1480

Open
jessicadaugherty opened this issue Oct 4, 2022 · 0 comments
Open

[RPC] Add Rewards Endpoint #1480

jessicadaugherty opened this issue Oct 4, 2022 · 0 comments
Labels

Comments

@jessicadaugherty
Copy link
Contributor

Please explain the goal of the RFP.

Currently there are no 100% accurate sources of reward information for the Pocket protocol. We have been trying to build get our internal indexer to be 100% accurate for months, to no avail. Its also difficult because of the lack of documentation and dev support from protocol.

Pocket validators already do the exact calculation to keep track of the state. It does not make sense to replicate this complicated calculation externally when we can let the PCC do it, for it is the source of truth.

This would be something tremendously beneficial for the entire ecosystem, unfortunately we don’t have the bandwidth right now to do it. I think everyone has recreated their own indexer in some way, which is not an efficient use of resources as it can be included directly into the client. Its even more complicated when there are bugs like after the noncustodial upgrade where nodes didn’t earn rewards, it takes a lot of time to update an indexer accordingly.

Please provide a justification for your RFP.

Not having accuracy is problematic for many reasons:

  • Unable to discern with confidence how your infrastructure compares to other providers and setups
  • Unable to give clients reports based on rewards and instead having to rely on the actual balance of the nodes
  • Unnecessary time spent looking for sources of discrepancy

Please provide a success criteria for proposals responding to this RFP.

  • Pass in txhash of a proof and return # of relays and reward earned
  • Pass in a block number and return a list of all the proofs with # of relays and rewards earned

Add aditional context regarding this RFP.

This function handles all the proof logic. Takes a proof obj as input, grabs its relevant claim, and calculates the token reward. I'm not sure from what context this is typically called, (I would imagine this runs only as the node is syncing and building the state), so might have to make an additional function thats read-only, or modify this function to be queryable without modifying state and return the other values needed (relays,chain)

func handleProofMsg(ctx sdk.Ctx, k keeper.Keeper, proof types.MsgProof) sdk.Result {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Backlog
Development

No branches or pull requests

1 participant