decred / dcrdata

Decred block explorer, with packages and apps for data collection and storage. Written in Go.
https://dcrdata.decred.org/
ISC License
129 stars 128 forks source link

Track winning tickets #27

Closed chappjc closed 6 years ago

chappjc commented 7 years ago

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.

chappjc commented 7 years ago

and misses

raedah commented 7 years ago

What data are we storing about winning tickets and what will it be used for?

chappjc commented 7 years ago

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.

chappjc commented 7 years ago

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

chappjc commented 6 years ago

closed by PR #300