Bitcoin Forum
April 25, 2024, 09:22:45 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Sum of all satoshis transactioned in the last block(s)  (Read 828 times)
remotemass (OP)
Legendary
*
Offline Offline

Activity: 1116
Merit: 1016


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.

Inventor of: "Conic-Upward-Jet-Thrust 𝕊ℙ𝔸ℂ𝔼 𝔼𝕃𝔼𝕍𝔸𝕋𝕆ℝ" ¦¦ Monetize pics of in/out cash (with GPS metatag on and timestamp captions) ¦¦ archive.is/OMUJQ ¦¦ Forking LITECOIN: bitcointalk.org/index.php?topic=5362345 ¦¦ https://twitter.com/CubicPostcode/status/1782131590006477273
1714080165
Hero Member
*
Offline Offline

Posts: 1714080165

View Profile Personal Message (Offline)

Ignore
1714080165
Reply with quote  #2

1714080165
Report to moderator
1714080165
Hero Member
*
Offline Offline

Posts: 1714080165

View Profile Personal Message (Offline)

Ignore
1714080165
Reply with quote  #2

1714080165
Report to moderator
1714080165
Hero Member
*
Offline Offline

Posts: 1714080165

View Profile Personal Message (Offline)

Ignore
1714080165
Reply with quote  #2

1714080165
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714080165
Hero Member
*
Offline Offline

Posts: 1714080165

View Profile Personal Message (Offline)

Ignore
1714080165
Reply with quote  #2

1714080165
Report to moderator
1714080165
Hero Member
*
Offline Offline

Posts: 1714080165

View Profile Personal Message (Offline)

Ignore
1714080165
Reply with quote  #2

1714080165
Report to moderator
1714080165
Hero Member
*
Offline Offline

Posts: 1714080165

View Profile Personal Message (Offline)

Ignore
1714080165
Reply with quote  #2

1714080165
Report to moderator
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: 1116
Merit: 1016


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.

Inventor of: "Conic-Upward-Jet-Thrust 𝕊ℙ𝔸ℂ𝔼 𝔼𝕃𝔼𝕍𝔸𝕋𝕆ℝ" ¦¦ Monetize pics of in/out cash (with GPS metatag on and timestamp captions) ¦¦ archive.is/OMUJQ ¦¦ Forking LITECOIN: bitcointalk.org/index.php?topic=5362345 ¦¦ https://twitter.com/CubicPostcode/status/1782131590006477273
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!