Pages:
Author

Topic: Got my BFL Single today and I'm raffling it away for 0.5BTC! - page 7. (Read 29329 times)

donator
Activity: 1218
Merit: 1079
Gerald Davis
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

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.
legendary
Activity: 922
Merit: 1003
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  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.
donator
Activity: 448
Merit: 250
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  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
donator
Activity: 1218
Merit: 1079
Gerald Davis
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.
hero member
Activity: 588
Merit: 500
Hero VIP ultra official trusted super staff puppet
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  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?
donator
Activity: 448
Merit: 250
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
donator
Activity: 1218
Merit: 1079
Gerald Davis
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  Not saying you would but using the blockchain as a double blind picking method reduces the need for implicit trust.
donator
Activity: 448
Merit: 250
If you guys complicate this any further I swear I'm going into PHP, typing

Code:
echo rand(0,41269);

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 = 1099511622840

If 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,493 chances to win.  The rest of the tickets have 27,303,492   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
hero member
Activity: 588
Merit: 500
Hero VIP ultra official trusted super staff puppet
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.
donator
Activity: 1218
Merit: 1079
Gerald Davis
If you guys complicate this any further I swear I'm going into PHP, typing

Code:
echo rand(0,41269);

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,493 chances to win.  The rest of the tickets have 27,303,492.  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).
hero member
Activity: 854
Merit: 1000
Oh wow, stupid me!  Nevermind!
administrator
Activity: 5222
Merit: 13032
Good point therymos although you just need to re-roll when the random number is > the largest even MULTIPLE of the ticket #.

Right. I was assuming that the max random number would be chosen to be the smallest power of two larger than the largest ticket.
hero member
Activity: 588
Merit: 500
Hero VIP ultra official trusted super staff puppet
If you guys complicate this any further I swear I'm going into PHP, typing

Code:
echo rand(0,41269);

and finishing this like a boss.
donator
Activity: 1218
Merit: 1079
Gerald Davis
Good point therymos although you just need to re-roll when the random number is > the largest even MULTIPLE of the ticket #.

i.e. there are 40270 tickets.  So for 0-40270 it is even.  0 to 2x(40270) is even 0 to n x (40270) is even.

The only issue is the "remainder" greater than the max multiple.

10 hex digits = 16^10 = 1099511627776


1099511627776 / 40270 = 27303492.12  (that last 0.12 is unfair)

So max valid random number is 40270 * 27303492 = 1099511622840

Matt a "fix" is simple and fair.

If the value of last 10 digits of the block hash is > 1099511622840 then it is a "no-go" and you use the next block.

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%



administrator
Activity: 5222
Merit: 13032
(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.)
legendary
Activity: 922
Merit: 1003
The official block to determine the winning ticket number will be 171,450.

Set!
hero member
Activity: 588
Merit: 500
Hero VIP ultra official trusted super staff puppet
The official block to determine the winning ticket number will be 171,450.
donator
Activity: 448
Merit: 250
Son what is the magic block #?

I need to set my block clock. Smiley 

Same here  Grin
hero member
Activity: 866
Merit: 1001
You sorted the list by the SHA, not sure I like that. I had 2 purchases sperated by quite a bit of time, I like the idea of the tickets for those not being in 1 block and 2 blocks of numbers.

Phil

You do realize that it makes absolutely no difference statistically, right? Your odds of winning (or losing) are identical regardless of where or how your tickets are split within the total range.

I realize that, I just generally prefer to have different blocks of tickets / numbers. Just my personal view.

Lets not stop the process. Lets move ahead of how it is currently.

Phil
donator
Activity: 1218
Merit: 1079
Gerald Davis
Son what is the magic block #?

I need to set my block clock. Smiley 
Pages:
Jump to: