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

vspinfo endpoint ideas #232

Closed
xaur opened this issue Jan 24, 2021 · 4 comments
Closed

vspinfo endpoint ideas #232

xaur opened this issue Jan 24, 2021 · 4 comments

Comments

@xaur
Copy link

xaur commented Jan 24, 2021

Some ideas from looking at vspinfo API response.

Add fields:

  • statusmessage: server operator's custom message with a sane character limit (must fit important messages + 1-2 links)
  • votingwalletsonline and votingwalletstotal could be used by automated health check crawlers
  • ticketsmissed (dcrstakepool reported this)

Change fields:

  • vspclosed
    • first, the code often looks a bit cleaner if booleans have positive boolean names (...up, ...enabled)
    • second, a string-based enum would capture more possible statuses than just up and down. I would call it just status

Group ticket stats in a namespace:

  • rename voting to ticketslive
  • rename revoked to ticketsrevoked
  • rename voted to ticketsvoted

Related: decred/dcrstakepool#628 (comment)

@jholdstock
Copy link
Member

Cannot add missed tickets, see comment in #268

@jholdstock
Copy link
Member

Your renaming suggestions do make sense, but the existing names will be kept as they are because changing them will break existing API consumers for minimal benefit.

vspclosed is a boolean because it has exactly two states - either the VSP is currently accepting new tickets or it is not. Perhaps acceptingtickets would be a better name, but I refer back to the previous point.

There is already an endpoint for checking voting wallet status, but it requires authenticating with the admin credentials. We could explore opening this up for public consumption, but please open a new dedicated issue for that discussion because its a slightly wider topic than just updating the /vspinfo endpoint.

@xaur
Copy link
Author

xaur commented Jun 10, 2021

Agreed re keeping the names to not break consumers. iirc I had this idea earlier but didn't submit it with good advance time before v1.0 final. Do you think it could be batched with other breaking changes, e.g. in v2.0, or will it still not worth it?

@xaur xaur mentioned this issue Jun 10, 2021
@jholdstock
Copy link
Member

Will definitely consider it if/when a new API version is introduced. Some possible scenarios which may make a new API version necessary:

  • Improving the UX for staking on Trezor (see conversation starting here)
  • LN/multi-owner ticket purchasing as described by matheus here
  • Rumoured PQ-crypto changes in a future dcrd/dcrwallet release

Closing this issue now - #272 is opened and all of the other points have been addressed. Thanks for the suggestions.

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

No branches or pull requests

2 participants