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

[Feature request] - expose whether the node is synced in /v2/info #4672

Open
hstove opened this issue Apr 10, 2024 · 1 comment
Open

[Feature request] - expose whether the node is synced in /v2/info #4672

hstove opened this issue Apr 10, 2024 · 1 comment
Assignees
Labels
3.0-later 3.0 good first issue Appropriate for a new open source contribution.

Comments

@hstove
Copy link
Contributor

hstove commented Apr 10, 2024

I've heard from a few different people that they'd like to have an easier way of answering the question "is my node synced with the network". One suggestion was to add this information to /v2/info, but I don't think that should be a requirement.

One thing I have noticed is that the prometheus metric stacks_node_stacks_tip_height isn't ever set until the node has finished syncing, so that does act as a kind of way to answer this question, but it would still be helpful to have other easier mechanisms.

It seems like you can answer this question by seeing if SortitionDB::get_canonical_stacks_chain_tip_hash returns an Ok, though I'm not sure.

@hstove hstove added the good first issue Appropriate for a new open source contribution. label Apr 10, 2024
@saralab saralab added the 3.0 label Apr 16, 2024
@hstove
Copy link
Contributor Author

hstove commented Apr 25, 2024

Note from Jude: you can get this information from the network state machine. You want to check whether the p2p stack is in "initial block download" (IBD) mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.0-later 3.0 good first issue Appropriate for a new open source contribution.
Projects
Status: Status: 📋 Backlog
Development

No branches or pull requests

3 participants