Bitcoin Forum
October 17, 2017, 07:27:55 PM
 News: Latest stable version of Bitcoin Core: 0.15.0.1  [Torrent]. (New!)
 Home Help Search Donate Login Register
 Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 [18] 19 20 21 22 23 24  All
 Author Topic: Got my BFL Single today and I'm raffling it away for 0.5BTC!  (Read 28356 times)
danieldaniel
Hero Member

Offline

Activity: 854

 March 16, 2012, 08:18:53 PM

Oh wow, stupid me!  Nevermind!

1508268475
Hero Member

Offline

Posts: 1508268475

Ignore
 1508268475

1508268475
 Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
DeathAndTaxes
Donator
Legendary

Offline

Activity: 1218

Gerald Davis

 March 16, 2012, 08:21:13 PM

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).
Matthew N. Wright
Untrustworthy
Hero Member

Offline

Activity: 588

Hero VIP ultra official trusted super staff puppet

 March 16, 2012, 08:23:22 PM

The raffle rules stated that:

• 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.

 My transparent history + transaction-specific feedback thread | No e-begging! If you need money, work for it! | Bitcoin EU Convention 2013, Amsterdam, Sept 26~28
wogaut
Donator
Sr. Member

Offline

Activity: 448

 March 16, 2012, 08:29:50 PM

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

DeathAndTaxes
Donator
Legendary

Offline

Activity: 1218

Gerald Davis

 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.   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

 March 16, 2012, 08:31:43 PM

The raffle rules stated that:

• 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
Untrustworthy
Hero Member

Offline

Activity: 588

Hero VIP ultra official trusted super staff puppet

 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.  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?

 My transparent history + transaction-specific feedback thread | No e-begging! If you need money, work for it! | Bitcoin EU Convention 2013, Amsterdam, Sept 26~28
DeathAndTaxes
Donator
Legendary

Offline

Activity: 1218

Gerald Davis

 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

 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.  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!

Epoch
Legendary

Offline

Activity: 917

 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.  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.

BTC: 1DJVUnLuPA2bERTkyeir8bKn1eSoRCrYvx
NMC: NFcfHSBBnq622pAr1Xoh9KtnBPA5CUn6id
DeathAndTaxes
Donator
Legendary

Offline

Activity: 1218

Gerald Davis

 March 16, 2012, 08:35:27 PM

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.

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: 1358

 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.  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: 2240

Linux since 1997 RedHat 4

 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
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.

Pool: https://kano.is Here on Bitcointalk: Forum BTC: 1KanoPb8cKYqNrswjaA8cRDk4FAS9eDMLU
FreeNode IRC: irc.freenode.net channel #kano.is Majority developer of the ckpool code
Help keep Bitcoin secure by mining on pools with full block verification on all blocks - and NO empty blocks!
WGD118
Newbie

Offline

Activity: 13

 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
Untrustworthy
Hero Member

Offline

Activity: 588

Hero VIP ultra official trusted super staff puppet

 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.

 My transparent history + transaction-specific feedback thread | No e-begging! If you need money, work for it! | Bitcoin EU Convention 2013, Amsterdam, Sept 26~28
Matthew N. Wright
Untrustworthy
Hero Member

Offline

Activity: 588

Hero VIP ultra official trusted super staff puppet

 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.

 My transparent history + transaction-specific feedback thread | No e-begging! If you need money, work for it! | Bitcoin EU Convention 2013, Amsterdam, Sept 26~28
eroxors
Hero Member

Offline

Activity: 770

Think. Positive. Thoughts.

 March 16, 2012, 08:40:41 PM

Holy shit, can this get any more complicated? Note to future self: don't do BTC raffles.

Don't get caught up in the game and have a nice day!
dab
Jr. Member

Offline

Activity: 42

 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.
SgtSpike
Legendary

Offline

Activity: 1358

 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
Untrustworthy
Hero Member

Offline

Activity: 588

Hero VIP ultra official trusted super staff puppet

 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.

 My transparent history + transaction-specific feedback thread | No e-begging! If you need money, work for it! | Bitcoin EU Convention 2013, Amsterdam, Sept 26~28
 Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 [18] 19 20 21 22 23 24  All