Bitcoin Forum
May 03, 2024, 12:19:09 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Betabit Seeding Event  (Read 109 times)
BetaBit (OP)
Copper Member
Newbie
*
Offline Offline

Activity: 7
Merit: 1


View Profile
November 19, 2018, 08:11:09 AM
Last edit: March 17, 2019, 08:31:30 PM by BetaBit
 #1

This seeding event was scrapped new provability fair: Click Here


Edit: Secret: NvYswejFjNeHd7


This seeding event is using the same provably fair as Bustabit link to thread

Starting with a secret we've generated a chain of 25,000,000 SHA256 hashes. Each element is the hash of the lowercase, hexadecimal string representation of the previous hash. The hash of the chain's last element is 00f34b67b5a86ade6f94f5a3c050d5d8514e9da93ddf3d91694704f3c17f9609.

Every game maps to a hash in the chain: The 25,000,000th element of the chain is the hash of game #1 and the first element in the chain is the hash of game #25,000,000. To verify that a hash belongs to a game #n, simply hash it n times and compare the result with the terminating hash.

To calculate a game's result from its hash:
Code:
 const crypto = require("crypto")

function gameResult(seed, salt) {
  const nBits = 52 // number of most significant bits to use

  // 1. HMAC_SHA256(key=salt, message=seed)
  const hmac = crypto.createHmac("sha256", salt)
  hmac.update(seed)
  seed = hmac.digest("hex")

  // 2. r = 52 most significant bits
  seed = seed.slice(0, nBits/4)
  const r = parseInt(seed, 16)

  // 3. X = r / 2^52
  let X = r / Math.pow(2, nBits) // uniformly distributed in [0; 1)

  // 4. X = 99 / (1-X)
  X = 99 / (1 - X)

  // 5. return max(trunc(X), 100)
  const result = Math.floor(X)
  return Math.max(1, result / 100)
}

Before being used to calculate the corresponding result, each game hash is salted with the lowercase, hexadecimal string representation of the hash of bitcoin block 550900. This block has not been mined yet, proving that I have not deliberately picked a chain that is unfavorable for players.

More information about the site will be revealed once the block is mined.
1714695549
Hero Member
*
Offline Offline

Posts: 1714695549

View Profile Personal Message (Offline)

Ignore
1714695549
Reply with quote  #2

1714695549
Report to moderator
1714695549
Hero Member
*
Offline Offline

Posts: 1714695549

View Profile Personal Message (Offline)

Ignore
1714695549
Reply with quote  #2

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

Posts: 1714695549

View Profile Personal Message (Offline)

Ignore
1714695549
Reply with quote  #2

1714695549
Report to moderator
Dexon
Full Member
***
Offline Offline

Activity: 230
Merit: 154

I'm a web dev :D


View Profile WWW
November 19, 2018, 08:27:28 AM
 #2

Quoting this post so people can see what it originally was with assurances that it doesn't change.

Archived at: http://archive.is/q4hc5

Also confirming the BTC block #550900 hasn't been mined yet.

This seeding event is using the same provably fair as Bustabit link to thread

Starting with a secret we've generated a chain of 25,000,000 SHA256 hashes. Each element is the hash of the lowercase, hexadecimal string representation of the previous hash. The hash of the chain's last element is 00f34b67b5a86ade6f94f5a3c050d5d8514e9da93ddf3d91694704f3c17f9609.

Every game maps to a hash in the chain: The 25,000,000th element of the chain is the hash of game #1 and the first element in the chain is the hash of game #25,000,000. To verify that a hash belongs to a game #n, simply hash it n times and compare the result with the terminating hash.

To calculate a game's result from its hash:
Code:
 const crypto = require("crypto")

function gameResult(seed, salt) {
  const nBits = 52 // number of most significant bits to use

  // 1. HMAC_SHA256(key=salt, message=seed)
  const hmac = crypto.createHmac("sha256", salt)
  hmac.update(seed)
  seed = hmac.digest("hex")

  // 2. r = 52 most significant bits
  seed = seed.slice(0, nBits/4)
  const r = parseInt(seed, 16)

  // 3. X = r / 2^52
  let X = r / Math.pow(2, nBits) // uniformly distributed in [0; 1)

  // 4. X = 99 / (1-X)
  X = 99 / (1 - X)

  // 5. return max(trunc(X), 100)
  const result = Math.floor(X)
  return Math.max(1, result / 100)
}

Before being used to calculate the corresponding result, each game hash is salted with the lowercase, hexadecimal string representation of the hash of bitcoin block 550900. This block has not been mined yet, proving that I have not deliberately picked a chain that is unfavorable for players.

More information about the site will be revealed once the block is mined.
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!