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

Map Signer Key to Reward Slots #2084

Open
sbond14 opened this issue Sep 23, 2024 · 3 comments
Open

Map Signer Key to Reward Slots #2084

sbond14 opened this issue Sep 23, 2024 · 3 comments
Assignees

Comments

@sbond14
Copy link

sbond14 commented Sep 23, 2024

Is your feature request related to a problem? Please describe.
I would like to be able to collect reward slots by the signer that that stacker is stacked to.

In my specific use case, I run a signer that is delegated to by Stacking DAO. Since they use the same POX address for delegations to multiple signers, it is currently impossible for me to determine which reward slots correspond to the STX stacked to my individual signer.

Describe the solution you'd like
An inclusion of a signer_key field in the response of the first 4 reward queries here https://docs.hiro.so/stacks/api/stacking-rewards. This mapping of (signer key -> reward slot) would likely need to be done at the application level in order to allow the API to query for it.

Describe alternatives you've considered
I have tried collecting these rewards by POX address, but since the same POX address is used on multiple signers, this doesn't allow me to query reward slots for a specific signer. I understand that rewards are earned by stackers (not signers), which is why only POX address is currently included, but the additional mapping of a signer key would be very useful to me to help monitor my individual signer processes.

@diwakergupta
Copy link
Member

@sbond14 actually, I think this (work-in-progress) PR in the stacks-core repo should meet your requirements:

Add RPC endpoint /v3/signer/{signer_pubkey}/{reward_cycle} that returns number of blocks signed by signer during given reward cycle

If so, please close this issue and watch that one instead. Thanks!

@sbond14
Copy link
Author

sbond14 commented Sep 23, 2024

@diwakergupta that is not exactly what I am looking for. Your linked PR would return how many block were signed by the signer post-Nakamoto (which would be all blocks in the cycle in an ideal scenario)

What I am requesting is a way to tie reward slots to a signer.

Say a single stacker has 2 delegations to 2 separate signers, and uses the same POX address for both of them. The reward slots assigned to that stacker would be indistinguishable from each other. I would like the signer address which that delegation of STX is attached to to also be returned when querying for that reward slot.

@jferrant
Copy link

Currently we only have /v3/stacker_set/{cycle_number} which returns the reward set and the list of signing keys and their total amount of signing weight. There is no API call though that maps a specific locked amount of stacks to an associated signer. You would have to search for the associated stack-stx and aggregate transactions to know. I don't think there is a reason to NOT provide this API call though or a link to the associated txid per signing key.

@andresgalante andresgalante moved this from 🆕 New to 📋 Backlog in API Board Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📋 Backlog
Development

No branches or pull requests

4 participants