Pages:
Author

Topic: Random Number On Blockchain - page 2. (Read 785 times)

copper member
Activity: 103
Merit: 7
February 07, 2018, 12:36:58 AM
#10
Take the first bit of Hash(blockhash) of the last 64 blocks.

Make a 64 bit number. Hash That.

It's random.

Everyone can calculate it independently.

This is not truly random. There is a reason random.org relies on lightning strikes to generate random numbers.

If you are using Ethereum, Oraclize provides RNG via ledger and access to sites like random.org - we are using Oraclize.
jr. member
Activity: 42
Merit: 4
<3 BTC
legendary
Activity: 1386
Merit: 1053
Please do not PM me loan requests!
February 06, 2018, 07:23:34 AM
#8
Thanks but if I use block hashes, then it will be pre predictable. I need something that is unpredictable until it gets in public.
The last digit of a block hash is really not pre-predictable because no miner in their right mind would forfeit their block in order to manipulate the last digit. The benefit of doing so would have to be greater than the 12.5 BTC loss of throwing away their solution. It may still be possible to manipulate if there are two block candidates (an unresolved chain split) but the usual waiting for 6 confirmations solves that.
jr. member
Activity: 42
Merit: 1
February 06, 2018, 07:01:36 AM
#7
Thanks but if I use block hashes, then it will be pre predictable. I need something that is unpredictable until it gets in public.
full member
Activity: 214
Merit: 278
January 27, 2018, 01:15:18 PM
#6
How Can one generate a random number on blockchain , and all remain decentralised , everyone has same result but no one know the number until the number disclose to public.

Read: How random the last digit of a block hash really is?
member
Activity: 392
Merit: 41
This text is irrelevant
January 27, 2018, 01:03:30 PM
#5
I've struggled with a problem like this before. I was trying to find a way to use the Bitcoin blockchain to generate random numbers similar to how provably fair gambling sites generate them now. Unfortunately, I couldn't find a way that didn't involve either waiting time for the next Bitcoin block (which was undesirable for me) or placing trust in another party.

You can’t generate another random number before another piece of information added to what you use as a seed, therefore you can’t really generate numbers more often than new block appears. You may however generate arbitrary amounts of random numbers per block or use faster blockchain to Do so.
hero member
Activity: 854
Merit: 658
rgbkey.github.io/pgp.txt
January 26, 2018, 12:52:55 PM
#4
I've struggled with a problem like this before. I was trying to find a way to use the Bitcoin blockchain to generate random numbers similar to how provably fair gambling sites generate them now. Unfortunately, I couldn't find a way that didn't involve either waiting time for the next Bitcoin block (which was undesirable for me) or placing trust in another party.
member
Activity: 392
Merit: 41
This text is irrelevant
January 26, 2018, 04:07:36 AM
#3

Yeah this is pretty much comes from irreversibility (unpredictability) of hash function.
All you need to do is to take some immutable properties, that being added to blockchain unpredictable (as spartacusrex mentioned above) and use hash to further normalize distribution and you got it. Just write a rule that works similar every time next block is appended.

It is important to understand that this still won't be "true" randomness (if such thing even exists), but will be nearly impossible to predict and likely give uniform distribution of output values.
hero member
Activity: 718
Merit: 545
January 24, 2018, 12:22:29 PM
#2
Take the first bit of Hash(blockhash) of the last 64 blocks.

Make a 64 bit number. Hash That.

It's random.

Everyone can calculate it independently.
jr. member
Activity: 42
Merit: 1
January 24, 2018, 12:05:54 PM
#1
How Can one generate a random number on blockchain , and all remain decentralised , everyone has same result but no one know the number until the number disclose to public.
Pages:
Jump to: