Skip to content

vspd: add chain sync status to webserver and prevent vspd from accepting tickets if it's behind the chain #497

@artikozel

Description

@artikozel

Recent issues with two Voting Service Providers (https://vspd.99split.com/ and https://decred.stake.fun/) have caused users to miss tickets. While the first one has resolved its issues, the second one, at the time of submission, still reports being behind the chain, as well as only having 2 out of the 3 recommended voting wallets online
{"apiversions":[3],"timestamp":1734685038,"pubkey":"3J+5DpkwDC5JKFux72M2XdmU9c+laIwAhHt11HNL+rA=","feepercentage":0.5,"vspclosed":false,"vspclosedmsg":"","network":"mainnet","vspdversion":"1.3.1","voting":61,"voted":30631,"totalvotingwallets":3,"votingwalletsonline":2,"revoked":190,"expired":185,"missed":5,"blockheight":932276,"estimatednetworkproportion":0.0014703047}

At the same time, https://decred.org/vsp/ produces a familiar-looking "last updated" response for it, which may mislead the users into believing the VSP is working as expected, which may not be the case.
image

As such, users are able to submit their tickets to such a VSP and have their tickets miss due to VSP misconfiguration lacking an easy reference to its sync status.
It would be beneficial for users to have a way of double checking whether the VSP is functioning as expected beyond the simple API response by displaying its sync status with the chain on the VSP main page.

Additionally, better protection against users shooting themselves in the foot could be achieved by the VSP refusing to accept and register new tickets if it significantly falls behind the chain.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions