-
Notifications
You must be signed in to change notification settings - Fork 114
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
slot index and reward index mismatch #2068
Comments
@obycode do we know if these should be matching from a blockchain core perspective? I'm not sure if the concepts reward index and slot are equivalent everywhere. |
Looked up where they come from on the API end: stacks-blockchain-api/src/event-stream/core-node-message.ts Lines 352 to 365 in 3e2d524
Both are indexes added by the API and show the position in the array given in the event payload. It seems the mismatch occurs on the node in the functions: calculate_paid_rewards and pick_recipients. I don't think the ordering is important -- just double checking |
Closing as not a bug, if we really would want these to match, it would require a node change. But it's not really expected that they match, so I don't know if that change is wanted. |
Describe the bug
When querying
burnchain_rewards
andreward_slot_holders
thereward_index
andslot_index
do not match. Example859045 slot 0 => 31yuSoYmpkV5TDxuMh2GUfchJFef4kHyus
859045 slot 1 => bc1qs0kkdpsrzh3ngqgth7mkavlwlzr7lms2zv3wxe
859045 reward index 0 => bc1qs0kkdpsrzh3ngqgth7mkavlwlzr7lms2zv3wxe
859045 reward index 1 => 31yuSoYmpkV5TDxuMh2GUfchJFef4kHyus
To Reproduce
Steps to reproduce the behavior:
select * from reward_slot_holders rsh where canonical and burn_block_height = 859045
select * from burnchain_rewards br where canonical and burn_block_height = 859045
Expected behavior
Address in
reward_slot_holders
and reward recipient inburnchain_rewards
should be the same for the same slot index.The text was updated successfully, but these errors were encountered: