Closed chappjc closed 6 years ago
and misses
What data are we storing about winning tickets and what will it be used for?
A peculiarity of the Decred ticket lottery (IMO) is that the IDs of the tickets that are selected to vote are not recorded explicitly. They must be derived, and this is not easily done are the moment. Internal packages and notifications make this easy for the best block, but that's it.
So if a vote is missed for a ticket, there's really no way know that for sure arbitrary ticket hash.
Having a table of the called ticket hashes for each block, and the ones that voted (and implicitly the ones that missed) would be good to have. Especially helpful would be a look by hash to see if a ticket was called and voted.
The stakedb and notifications make this easy, but it's a little work to implement. Once I start this, it won't take much time
closed by PR #300
The winning tickets are easily obtained from the dcrd notifier, or the ticket treap database, so it is easy to obtain for new or old blocks. We just need to decide if the 5 ticket hashes should be stored in the block summary database or in a new DB just for the winning tickets. I vote for the second.