Winner feedback : https://bitcointalk.org/index.php?topic=1577756.msg15883204#msg15883204
results: http://pastebin.com/raw/JfB7N3ZJ
payout transactions: 7efb20dffdc8fde93c85154bccca5d993217418207aaf7e5e3f6da9cb05fc0a1, 4841b57aa7fd841cbd4716ce577f41f8556f8ccf3273fb4f1d6eff4319a9e65b, 2dbb77ab9ce48152f07f50dccb9afe04a7be303df574b9218f2d277f16384613, 0416c4a2583672bb4d2a66cccdd75628e16a61e1512b4953b95283d6e91e58c8
>>> blockhash = "00000000000000000------------------------------------------"
>>> hash_bytes = binascii.unhexlify(blockhash)
>>> winner_index = int.from_bytes(hash_bytes,byteorder="little")%total_addresses
>>> print(winner_index)
Lets imagine that Alice bought 90% of tickets for 1 btc and other participants bought other 10%, Bob by 1 ticket for 0.001 btc.
Alice risk is 1 btc to lose, but I have more chances to win about 90%.
Bob who by 0.001 btc risk less and have chances in accordance with the number of tickets.
This is honest game by desing, and no any scam or fraud possible unlike in classic casino or lottery!
No profit, winners donations or tips only.
List of participants get from Bitcoin blockchain public records. All addresses from inputs (with index 0) of transactions that was sent to BitcoinEater crypto party lottery address (1FvCk1jTsy7AvmnpeKnrfHSJnfX7om7fNM). This list sort by next rules:
Block number (descending order), Transaction in block index (descending order). Then for participants, who buy more then 1 ticket, doubling address records in accordance with the number of tickets. The entire list is indexed from 0.
Winner index we calculate by last Bitcoin block hash in lottery round.
Example from our first round:
>>>
>>> total_addresses = 754
>>> blockhash = "00000000000000000187a165338f220262346e5fe53533d6e611dc9716b71c11"
>>> hash_bytes = binascii.unhexlify(blockhash)
>>> winner_index = int.from_bytes(hash_bytes,byteorder="little")%total_addresses
>>> print(winner_index)
16