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 · 4 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.

@saralab saralab moved this from Status: 🆕 New to Status: 📋 Backlog in Stacks Core Eng Jan 22, 2024
@saralab saralab moved this from Status: 📋 Backlog to Status: In Review in Stacks Core Eng Jan 22, 2024
@saralab saralab moved this from Status: In Review to Status: ✅ Done in Stacks Core Eng Jan 30, 2024
@saralab saralab closed this as completed Jan 30, 2024
@blockstack-devops
Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@stacks-network stacks-network locked as resolved and limited conversation to collaborators Oct 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

No branches or pull requests

4 participants