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

Add specialized rebroadcast handling for RPC server stake transactions #975

Closed
davecgh opened this issue Jan 18, 2018 · 2 comments · Fixed by #979
Closed

Add specialized rebroadcast handling for RPC server stake transactions #975

davecgh opened this issue Jan 18, 2018 · 2 comments · Fixed by #979
Assignees
Milestone

Comments

@davecgh
Copy link
Member

davecgh commented Jan 18, 2018

Whenever a transaction is sent via the sendrawtransaction RPC, it gets added to a rebroadcast handler to ensure the transaction will periodically be rebroadcast until it eventually makes it into a block. This behavior is ideal for non-stake transactions, however stake transactions require special rebroadcast handling because they do not remain valid in all situations.

Consequently, PR #973 disabled rebroadcast handling for all stake transactions to prevent the pathological behavior of continuing to periodically rebroadcast stake transactions which are no longer valid until the server process is reset.

Ideally, as the comment added in the aforementioned PR indicates, the rebroadcast logic would properly handle ticket purchase and ticket revocation rebroadcasting.

I believe the following points adequately cover the desired behavior:

  • A vote is only valid for a specific block, and if it is not cast quickly enough, it will end up being missed anyways, so it makes little sense to try to rebroadcast it some random time in the future and therefore should not be added at all
  • Ticket purchases should be periodically rebroadcast until they show up in a block so long as they have not expired and the ticket price has not changed since they were originally issued
  • Ticket revocations should be periodically rebroadcast until they show up in a block so long as the associated ticket has not been resurrected (from either a missed or expired state) due to a chain reorg.
@dnldd
Copy link
Member

dnldd commented Jan 18, 2018

@davecgh would like to take this on, could you assign me to it.

@davecgh
Copy link
Member Author

davecgh commented Jan 18, 2018

Thanks. Done.

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

Successfully merging a pull request may close this issue.

2 participants