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

[Nakamoto] Emit amount stacked for the subsequent cycle when the PoX anchor block is set #4255

Closed
zone117x opened this issue Jan 18, 2024 · 3 comments

Comments

@zone117x
Copy link
Member

zone117x commented Jan 18, 2024

Related to signer support in the API & Explorer hirosystems/explorer#1248

The API and Explorer need to know the total STX amount for PoX cycles. Ideally, this would be calculated and emitted when the PoX anchor block is set. Ideally it would be part of the existing /new_block payload which is currently the only event that doesn't have race-conditions / out-of-order threading issues.

@zone117x
Copy link
Member Author

@kantai does this sound about right, and is it okay if I assign this to you?

@kantai
Copy link
Member

kantai commented Jan 18, 2024

Yeah -- that's fine. What you're looking for is basically the complete stacker set, right? This is event data that is needed by the signer binary anyways. I'm not sure that it'll be possible to include in /new_block, because the selection of the reward set doesn't occur during the processing of a block.

@zone117x
Copy link
Member Author

zone117x commented Jan 18, 2024

What you're looking for is basically the complete stacker set, right?

I think this issue is probably just for aggregate STX amount, and more complete data is covered by #4256 and #4257 -- does that make sense?

I'm not sure that it'll be possible to include in /new_block

Ah okay, is there a way to ensure this new event doesn't have race-conditions against the /new_block? Almost all other events can come in out-of-order (in relation to each other and/or /new_block) -- the API has different approaches to handle different events like A) complex detection and reconciliation code, B) presenting potentially inconsistent data to clients, C) dropping the event because it's too complex/expensive/damaging to do otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

3 participants