Using Visual Basic 6 (Classic) I made a slow, but working program. Using a simulation of 600 character strings to account for the combined concatenated length of the transaction hash, the ticket number, and the 7 secrets, I ran sha-256 in an iterative loop with results as follows.
' interpreted (in IDE)
' 10 seconds for 1,000
' 94 seconds for 10,000
' 230 seconds for 100,000
' compiled
' 1.17 seconds for 1,000 10 BTC
' 11.5 seconds for 10,000 100 BTC
' 142.5 seconds for 100,000 (less than 3 minutes) 1000 BTC
' 5675 seconds for 1,000,000 (1.5 hours) 10,000 BTC
These results are automatically sorted as the array (listbox with 1 million rows, actually) is added to.
The 1 million ticket simulation took that long. It would have been faster to just create the hashes and then sort them all afterwards. As it is, my code was sorting as each item was added into the list. Near the end of the simulation at around 800,000 to 900,000 the speed of computing the hashes and sorting was significantly slowing down.
This is all on my 2009 year model T4400 @ 2.2 Ghz Intel Pentium laptop.
I then redid the simulation using actual previous secrets (that don't necessarily match to any date, I just picked them up from whatever I saw.)
In theory, I can "upgrade" this capability to sort up to 2 billion tickets, and make it significantly faster, so it's not something I'm going to worry about for awhile. 2 billion tickets is about 12 million BTC.
12 million bitcoins
1.2 billion regular tickets
400 million early bird bonus tickets
400 million volume bonus tickets
Total: 2 billion tickets
I can also make this faster by optimizing the sha256 code I'm using, but 3 minutes for 100k tickets works for now.
I will make the final program / calculator available, but for now it's still super beta version, has no error checking, and will certainly crash if you feed it invalid input (such as strings where it expects a number), negative or zero values, etc. And it's in VB, so maybe most people think it's butt-ugly or something.
Actually, all I have is this simulator. For the few tickets I've been getting, I just do all the hashing manually on a spreadsheet. I've since upgraded from hashing each string one by one (back in Dabs Lotto Number 1) using online sha-256 javascript function.
I've also experimented a bit with blocknotify and walletnotify on my bitcoin-qt client.
Using 8 digits as the ticket number, the game allows up to 99 million tickets per transaction. If I stuck to 10 digits then it becomes 9 billion tickets.
Again, not something I am going to worry about now, no matter how sloppy or slow my code is. There are only 11 million bitcoins in existence at this point in time. I'd be happy if someone bought 100 BTC or even 10 BTC worth.