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

[WIP] stakepoold: fix newly matured tkt edge case #250

Closed
wants to merge 1 commit into from
Closed

[WIP] stakepoold: fix newly matured tkt edge case #250

wants to merge 1 commit into from

Conversation

jolan
Copy link
Contributor

@jolan jolan commented Jan 23, 2018

As mentioned in the linked issue, there's an edge case where a ticket
can mature and be picked to vote in the same block. When this happens
it's basically just the luck of the draw as to if the new ticket
notification arrives before the winning ticket notification. If it
doesn't, then we will fail to vote since we aren't aware of its presence
when we go to vote it. This keeps a map of unknown winning tickets and
will attempt to vote such tickets from the new ticket handler.

WIP, needs tests added and live testing (and probably some more refactoring).
This shouldn't be a frequent occurrence on mainnet but still needs to be
addressed since it has been hit in production.

Resolves #249.

As mentioned in the linked issue, there's an edge case where a ticket
can mature and be picked to vote in the same block.  When this happens
it's basically just the luck of the draw as to if the new ticket
notification arrives before the winning ticket notification.  If it
doesn't, then we will fail to vote since we aren't aware of its presence
when we go to vote it.  This keeps a map of unknown winning tickets and
will attempt to vote such tickets from the new ticket handler.

WIP, needs tests added and live testing.  This shouldn't be a frequent
occurrence on mainnet but still needs to be addressed since it has been
hit.

Resolves #249.
@@ -44,6 +44,7 @@ type appContext struct {
addedLowFeeTicketsMSA map[chainhash.Hash]string // [ticket]multisigaddr
ignoredLowFeeTicketsMSA map[chainhash.Hash]string // [ticket]multisigaddr
liveTicketsMSA map[chainhash.Hash]string // [ticket]multisigaddr
possiblyMissingTickets map[chainhash.Hash]int64 // ticket]blockheight
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: missing opening bracket in comment.

@JoeGruffins
Copy link
Member

@jolan hello. Are you still working on this?

@chappjc
Copy link
Member

chappjc commented Sep 19, 2019

@JoeGruffins No, he's not on it anymore. I suggest restarting the work with the latest stakepool architecture in mind.

@davecgh davecgh closed this Sep 19, 2019
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

Successfully merging this pull request may close these issues.

tickets that mature and are called to vote in the same block are sometimes not voted
5 participants