danieldaniel
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 16, 2012, 08:18:53 PM |
|
Oh wow, stupid me! Nevermind!
|
|
|
|
DeathAndTaxes
Donator
Legendary
Offline
Activity: 1218
Merit: 1079
Gerald Davis
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 16, 2012, 08:21:13 PM Last edit: March 16, 2012, 08:39:39 PM by DeathAndTaxes |
|
If you guys complicate this any further I swear I'm going into PHP, typing and finishing this like a boss. Don't do that. From above: Matt a "fix" is simple and fair. The only "unfairness" comes from "remainder" greater than the max multiple. 10 hex digits = 16^10 = 1099511627776 but there are 40,270 tickets which doesn't divide into all the random number range evenly. Some of the tickets have 1 more chance of winning. 1099511627776 / 40270 = 27303492.12 (that last 0.12 is unfair) The first 4936 tickets have 27,303,49 3 chances to win. The rest of the tickets have 27,303,49 2. Very small but a slight bias towards the earlier tickets. To be even the max valid random number is 40270 * 27303492 - 1 = 1099511622839. Just exclude numbers larger than that. Simple version: If the value of last 10 digits of the block hash is >= 1099511622840 then it is a "void drawing". Use the last 10 digits of the next block to find the winner fairly. Don't worry the odds of that happening are very very very small. Only 1,099,511,622,840 to 1,099,511,627,776 are "bad". 4936 unfair numbers out of 1099511627776 or 0.0000004%. The odds of two bad drawings in a row are 1 in 46 quadrillion. On edit: fixed on small error (1099511622840 is the first "unfair" number not the last "fair" number).
|
|
|
|
Matthew N. Wright (OP)
Untrustworthy
Hero Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 588
Merit: 500
Hero VIP ultra official trusted super staff puppet
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 16, 2012, 08:23:22 PM |
|
The raffle rules stated that: - Your email address would be published
- The winner would be chosen by yesterday
- Random.org would be used to choose the winner
So far I've done none of those. I'm all for learning and making this a better experience for everyone, but understand that every modification makes me feel like I'm straying even further from keeping my word. I appreciate sticking around and helping everyone, and on that note, keep it as simple as possible for those who cant 2 math.
|
|
|
|
wogaut
Donator
Sr. Member
Offline
Activity: 448
Merit: 250
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 16, 2012, 08:29:50 PM |
|
If you guys complicate this any further I swear I'm going into PHP, typing and finishing this like a boss. Don't do that. From above: Matt a "fix" is simple and fair. The only "unfairness" comes from "remainder" greater than the max multiple. 10 hex digits = 16^10 = 1099511627776 but there are 40,270 tickets which doesn't divide into all the random number range evenly. 1099511627776 / 40270 = 27303492.12 (that last 0.12 is unfair) So max valid random number is 40270 * 27303492 = 1099511622840If the value of last 10 digits of the block hash is > 1099511622840 then it is a "void" and just use the next block to find the winner.Don't worry the odds of that happening are very small. Only 1099511622841 to 1099511627776 are "bad". 4936 unfair numbers out of 1099511627776 or 0.0000004%. Even if you don't the "unfairness" is very small. The first 4936 tickets have 27,303,49 3 chances to win. The rest of the tickets have 27,303,49 2 Still given wow easy it is to do it fair just do it fair. Just want to add, if the block hash is < 1099511622840 it is good, which means that 1099511622840 is repeating ticket number 0, (a consequence of the mod operation). But otherwise I like it
|
|
|
|
DeathAndTaxes
Donator
Legendary
Offline
Activity: 1218
Merit: 1079
Gerald Davis
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 16, 2012, 08:31:08 PM |
|
Your call Matt. I only have 2 tickets so I don't really care. It would be useful excercise in using the block chain to ensure no ability to cheat. Random.Org is only random if you actually make it random not pick a buddy as the winner. ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) Not saying you would but using the blockchain as a double blind picking method reduces the need for implicit trust.
|
|
|
|
wogaut
Donator
Sr. Member
Offline
Activity: 448
Merit: 250
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 16, 2012, 08:31:43 PM |
|
The raffle rules stated that: - Your email address would be published
- The winner would be chosen by yesterday
- Random.org would be used to choose the winner
So far I've done none of those. I'm all for learning and making this a better experience for everyone, but understand that every modification makes me feel like I'm straying even further from keeping my word. I appreciate sticking around and helping everyone, and on that note, keep it as simple as possible for those who cant 2 math. Matt, I know there's no voting on a raffle that you made, so it's really up to you. But IMO for many of us it would be more fun if the block-chain is used for determination of the outcome. It's still simple enough to replicate
|
|
|
|
Matthew N. Wright (OP)
Untrustworthy
Hero Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 588
Merit: 500
Hero VIP ultra official trusted super staff puppet
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 16, 2012, 08:32:37 PM |
|
Your call Matt. I only have 2 tickets so I don't really care. It would be useful excercise in using the block chain to ensure no ability to cheat. Random.Org is only random if you actually make it random not pick a buddy as the winner. ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) Not saying you would but using the blockchain as a double blind picking method reduces the need for implicit trust. I totally agree. I want to learn this, but it still doesn't make sense to me completely, and that bothers me since I'm usually a fast mover on things. When the block comes around can you show me hands on what has to happen again?
|
|
|
|
DeathAndTaxes
Donator
Legendary
Offline
Activity: 1218
Merit: 1079
Gerald Davis
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 16, 2012, 08:32:54 PM |
|
Just want to add, if the block hash is < 1099511622840 it is good, which means that 1099511622840 is repeating ticket number 0, (a consequence of the mod operation). Good catch. Will update.
|
|
|
|
wogaut
Donator
Sr. Member
Offline
Activity: 448
Merit: 250
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 16, 2012, 08:34:38 PM |
|
Your call Matt. I only have 2 tickets so I don't really care. It would be useful excercise in using the block chain to ensure no ability to cheat. Random.Org is only random if you actually make it random not pick a buddy as the winner. ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) Not saying you would but using the blockchain as a double blind picking method reduces the need for implicit trust. I totally agree. I want to learn this, but it still doesn't make sense to me completely, and that bothers me since I'm usually a fast mover on things. When the block comes around can you show me hands on what has to happen again? Fair enough, I am pretty sure there are plenty of people who will rave over it! It will make the random number more special! ![Grin](https://bitcointalk.org/Smileys/default/grin.gif)
|
|
|
|
Epoch
Legendary
Offline
Activity: 922
Merit: 1003
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 16, 2012, 08:35:26 PM |
|
Your call Matt. I only have 2 tickets so I don't really care. It would be useful excercise in using the block chain to ensure no ability to cheat. Random.Org is only random if you actually make it random not pick a buddy as the winner. ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) Not saying you would but using the blockchain as a double blind picking method reduces the need for implicit trust. I totally agree. I want to learn this, but it still doesn't make sense to me completely, and that bothers me since I'm usually a fast mover on things. When the block comes around can you show me hands on what has to happen again? Excellent decision on using the blockchain. It is a natural, and full transparent, random number generator.
|
|
|
|
DeathAndTaxes
Donator
Legendary
Offline
Activity: 1218
Merit: 1079
Gerald Davis
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 16, 2012, 08:35:27 PM Last edit: March 16, 2012, 08:48:27 PM by DeathAndTaxes |
|
I totally agree. I want to learn this, but it still doesn't make sense to me completely, and that bothers me since I'm usually a fast mover on things. When the block comes around can you show me hands on what has to happen again?
I can tell you now to avoid it being after the fact. Step 1) Take the last 10 digits of the block hash (in hex) Step 2) Convert that to a decimal number. Step 3a) If the number is 1099511622840 or larger the draw is void. Repeat steps #1 to #3 on the next block. Step 3b) If the number is < 1099511622840 then you have a valid random number. Continue to step #4 Step 4) Winning Ticket = (random number) mod 40270 The only change is "Voiding" random # 1099511622840 and up because they are "uneven". The odds of that happening are ~ 1 in 222 million. ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) Like I said if you do something else I won't mind as I trust you. I just think it is useful example of using the blockchain to avoid needing implicit trust. Kinda an extension of the rational for creation Bitcoin in the first place.
|
|
|
|
SgtSpike
Legendary
Offline
Activity: 1400
Merit: 1005
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 16, 2012, 08:35:59 PM |
|
Your call Matt. I only have 2 tickets so I don't really care. It would be useful excercise in using the block chain to ensure no ability to cheat. Random.Org is only random if you actually make it random not pick a buddy as the winner. ![Smiley](https://bitcointalk.org/Smileys/default/smiley.gif) Not saying you would but using the blockchain as a double blind picking method reduces the need for implicit trust. I totally agree. I want to learn this, but it still doesn't make sense to me completely, and that bothers me since I'm usually a fast mover on things. When the block comes around can you show me hands on what has to happen again? Just use random.org. Use a cell phone to stream the pick live on ustream, so that everyone knows you're not cheating, and you're done! Viola!
|
|
|
|
kano
Legendary
Offline
Activity: 4578
Merit: 1851
Linux since 1997 RedHat 4
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 16, 2012, 08:36:51 PM |
|
(last-10-digits-of-block-hash) % (number-of-tickets) = winning ticket number
The results of this aren't evenly distributed in most cases. Say the random number is between 0 and 7, and there are 5 tickets from 0-4. Then the possible results are: 0 mod 5 = 0 (0 is the winner) 1 mod 5 = 1 2 mod 5 = 2 3 mod 5 = 3 4 mod 5 = 4 5 mod 5 = 0 6 mod 5 = 1 7 mod 5 = 2 As you can see, tickets 0-2 have a better chance than 3-4 For proper randomness, you actually need to re-roll when the random number is greater than your range of winners. This could be done by hashing the block hash again or choosing a different block. (There are probably other algorithms for properly distributing the randomness, but AFAIK they're always less efficient when generating random numbers and I don't know any such algorithms off-hand.) Yeah we discussed this on page 6 when I brought it up the first time in jest ![Tongue](https://bitcointalk.org/Smileys/default/tongue.gif) Yes those shares at the beginning of the list will get 1 extra chance in 2.7Million than those after the point where the final rollover stops. Bringing it up again after the fact is rather pointless.
|
|
|
|
WGD118
Newbie
Offline
Activity: 13
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 16, 2012, 08:38:22 PM |
|
I have to agree with Matt you guys are making this too complicated. Keep in mind guys raffles are for people who can't do math.
At some point you just need to draw a line in the sand and say you are doing it this way whatever that way may be and if people don't like it then they don't participate.
Yes I did buy a couple tickets but I think the current method is more then fair.
Oh and I know many people who use random.org and just stream the pick on ustream or justin tv.
|
|
|
|
Matthew N. Wright (OP)
Untrustworthy
Hero Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 588
Merit: 500
Hero VIP ultra official trusted super staff puppet
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 16, 2012, 08:38:42 PM |
|
Just use random.org. Use a cell phone to stream the pick live on ustream, so that everyone knows you're not cheating, and you're done! Viola!
You insult me, sir. I'd create a pinwheel with perfectly measured pie slices in accordance to shares, and stream myself throwing a dart at the spinning wheel to choose the winner.
|
|
|
|
Matthew N. Wright (OP)
Untrustworthy
Hero Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 588
Merit: 500
Hero VIP ultra official trusted super staff puppet
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 16, 2012, 08:39:47 PM |
|
I have to agree with Matt you guys are making this too complicated. Keep in mind guys raffles are for people who can't do math.
At some point you just need to draw a line in the sand and say you are doing it this way whatever that way may be and if people don't like it then they don't participate.
Yes I did buy a couple tickets but I think the current method is more then fair.
Oh and I know many people who use random.org and just stream the pick on ustream or justin tv.
It's alright. They want to set a precedence and I get that. I also agree with them, as a troll, that if the results are not independently verifiable, it's no-good. Since this won't be the last raffle I run here for fun, I see it as a learning experience at the expense of everyone else. Might as well use it.
|
|
|
|
eroxors
Legendary
Offline
Activity: 924
Merit: 1000
Think. Positive. Thoughts.
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 16, 2012, 08:40:41 PM |
|
Holy shit, can this get any more complicated? Note to future self: don't do BTC raffles.
|
|
|
|
dab
Newbie
Offline
Activity: 42
Merit: 0
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 16, 2012, 08:41:49 PM |
|
lol .5btc isn't much. I think its fun. At the least, we got this fun discussion and show for .5btc. ![Cheesy](https://bitcointalk.org/Smileys/default/cheesy.gif)
|
|
|
|
SgtSpike
Legendary
Offline
Activity: 1400
Merit: 1005
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 16, 2012, 08:42:31 PM |
|
Just use random.org. Use a cell phone to stream the pick live on ustream, so that everyone knows you're not cheating, and you're done! Viola!
You insult me, sir. I'd create a pinwheel with perfectly measured pie slices in accordance to shares, and stream myself throwing a dart at the spinning wheel to choose the winner. Hah! I'd love to see a pinwheel with 47,000 individual slices...
|
|
|
|
Matthew N. Wright (OP)
Untrustworthy
Hero Member
![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif) ![*](https://bitcointalk.org/Themes/custom1/images/star.gif)
Offline
Activity: 588
Merit: 500
Hero VIP ultra official trusted super staff puppet
|
![](https://bitcointalk.org/Themes/custom1/images/post/xx.gif) |
March 16, 2012, 08:46:26 PM |
|
Just use random.org. Use a cell phone to stream the pick live on ustream, so that everyone knows you're not cheating, and you're done! Viola!
You insult me, sir. I'd create a pinwheel with perfectly measured pie slices in accordance to shares, and stream myself throwing a dart at the spinning wheel to choose the winner. Hah! I'd love to see a pinwheel with 47,000 individual slices... I guess we could do it more complicated than that, use the diameter of our Sun to map out a pie chart for the shares and agree on a 1 minute window to count the surface explosions, where the most explosions in a certain area within that minute dictates the winner.
|
|
|
|
|