Bitcoin Forum
December 13, 2024, 07:34:29 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Sum of all satoshis transactioned in the last block(s)  (Read 850 times)
remotemass (OP)
Legendary
*
Offline Offline

Activity: 1122
Merit: 1017


ASMR El Salvador


View Profile WWW
March 14, 2013, 07:09:45 PM
 #1

S mod N, where S is the sum of all satoshis transactioned in the last block(s) and N the number of participants of a contest during that block(s) creation can be used as extraction number for a list of participations.
'S' is quite an unpredictable number that no one knows in advance and can rules out the possibility of cheating about the random pick of winner.

{ Imagine a sequence of bits generated from the first decimal place of the square roots of whole integers that are irrational numbers. If the decimal falls between 0 and 5, it's considered bit 0, and if it falls between 5 and 10, it's considered bit 1. This sequence from a simple integer count of contiguous irrationals and their logical decimal expansion of the first decimal place is called the 'main irrational stream.' Our goal is to design a physical and optical computing system system that can detect when this stream starts matching a specific pattern of a given size of bits. bitcointalk.org/index.php?topic=166760.0 } Satoshi did use a friend class in C++ and put a comment on the code saying: "This is why people hate C++".
Jan
Legendary
*
Offline Offline

Activity: 1043
Merit: 1002



View Profile
March 14, 2013, 07:57:51 PM
 #2

S is not random. The miner can basically choose any value he wishes.

Mycelium let's you hold your private keys private.
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
March 14, 2013, 08:05:59 PM
 #3

Even if the miner doesn't cheat S isn't evenly distributed.  Far easier to just just the least significant 8 digits of the block hash.
remotemass (OP)
Legendary
*
Offline Offline

Activity: 1122
Merit: 1017


ASMR El Salvador


View Profile WWW
March 14, 2013, 08:14:19 PM
Last edit: March 14, 2013, 10:58:44 PM by remotemass
 #4

To have a more random number you can multiply it by the number of seconds in between blocks.
But I agree, block hash may be a better choice.
You don't even need to truncate it, just convert to decimal and do H mod N, with H being the hash of the block created - closing of the game - converted to decimal and N the number of participants of the list of participants by arrival, and you get a random pick, giving you the position of the winner in that list with H mod N.

You just have to rule in advance which block will close the contest, than do this simple calculations, and voila!

Or, of course, you could use a maximum number of participants if you wanted, and expect for the next block created after such last participation, to be able to tell the random pick.

{ Imagine a sequence of bits generated from the first decimal place of the square roots of whole integers that are irrational numbers. If the decimal falls between 0 and 5, it's considered bit 0, and if it falls between 5 and 10, it's considered bit 1. This sequence from a simple integer count of contiguous irrationals and their logical decimal expansion of the first decimal place is called the 'main irrational stream.' Our goal is to design a physical and optical computing system system that can detect when this stream starts matching a specific pattern of a given size of bits. bitcointalk.org/index.php?topic=166760.0 } Satoshi did use a friend class in C++ and put a comment on the code saying: "This is why people hate C++".
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!