burnchain rewards change over time
Hi there!
I rely pretty heavily on the burnchain rewards endpoints for constructing state for stacking.club, but i've noticed that over time, sometimes the data associated with a given reward can change. Some things I've noticed are this:
- the reward_index can change
- the block_hash can change
- the recipient of the reward can change (very rarely but it happens)
I understand that much of this behavior is likely a symptom of forking or some other chain state changes. I was curious if there would be some kind of information that can be added to each reward item that can be deterministically generated, eg reward_hash that will persist between chain state changes?
Thanks!
What time periods are you seeing these change? If it's simply re-orgs causing it, then one solution could be only ever using data from blocks that have 3-5 or more confirmations. The app will be a couple hours behind but that's probably okay in this case?
I don't have detailed enough information to know when this happens, i only learn of it when the data is incorrect after the fact.
The confirmations idea makes sense and is actually something i can probably handle in my own service. I think having both would be useful.
I think ideally the rewards item would contain a confirmations key that would update after X confirmations. Do you think that would be possible? that way folks can choose to use the latest data, or data after X confirmations.
I think ideally the rewards item would contain a
confirmationskey that would update after X confirmations. Do you think that would be possible? that way folks can choose to use the latest data, or data after X confirmations.
Yeah I think most payloads could include a confirmations key, it's simply (current block height - block height of item). Would probably be useful to have something like a ?min_confirmations=<number> on a lot of endpoints as well.
it's simply (current block height - block height of item)
Yeah I'm thinking in the short term i can implement some kind of check for this and watch for duplicates that way
Would probably be useful to have something like a ?min_confirmations=
on a lot of endpoints as well.
yeah, agreed!
Closing this one due to age. Please reopen if still requested.