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

Proposal to deprecate and remove RPCs related to missed and expired tickets #2774

Closed
davecgh opened this issue Nov 1, 2021 · 1 comment · Fixed by #2911
Closed

Proposal to deprecate and remove RPCs related to missed and expired tickets #2774

davecgh opened this issue Nov 1, 2021 · 1 comment · Fixed by #2911
Assignees
Labels
rpc server api change Issues and/or pull requests that involve a new RPC server version or breaking to change to the API.
Milestone

Comments

@davecgh
Copy link
Member

davecgh commented Nov 1, 2021

I would like to propose the missedtickets, existsmissedtickets, existsexpiredtickets, rebroadcastmissed, and notifyspentandmissedtickets RPCs be deprecated in the v1.7.0 release and then removed entirely in the release after that. The only known way these RPCs are used is to support wallet staking statistics, but due to the upcoming automatic revocations consensus change, wallets will not really need the RPCs to calculate the vast majority of the information anymore since they can detect missed and expired tickets through a combination of seeing the revocation and comparing the number of confirmations against the ticket purchase height.

Further, these RPCs are really not something that dcrd should be maintaining by default anyway because they have some fairly significant downsides:

  • The set of missed tickets and revoked tickets are both unbounded which means they take up more and more resources over time
  • With the upcoming automatic revocations consensus change, the entire notion of a missed category will effectively no longer exist
  • The sets are already large enough that they take a non-trivial amount of RAM and I/O and will only become more burdensome over time
  • Even though the missed category will effectively no longer exist, continued support of these RPCs requires the current ticket database and related consensus code to continue to be able to track and manipulate these unbounded sets

That final point is perhaps one of the most important ones, because the ticket database design can be significantly optimized due to the introduction of the automatic revocations consensus change so long as the RPCs in question are no longer supported.

Proposed Roadmap

If we decide to move forward with this, I would expect the v1.7.0 release to:

  • Mark the relevant RPCs and supporting blockchain and stake code as deprecated

Then, in the following release:

  • Remove the relevant RPCs and supporting blockchain and stake code
@davecgh davecgh added the rpc server api change Issues and/or pull requests that involve a new RPC server version or breaking to change to the API. label Nov 1, 2021
@davecgh davecgh added this to the 1.8.0 milestone Nov 1, 2021
@davecgh davecgh self-assigned this Jan 15, 2022
@davecgh
Copy link
Member Author

davecgh commented Jan 15, 2022

Updated this to split the bit about redesigning the ticket database into a separate issue (#2870) since that is not a requirement for the removal of the RPCs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rpc server api change Issues and/or pull requests that involve a new RPC server version or breaking to change to the API.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant