Author

Topic: Jonbetbr Double seeding event (Read 20 times)

?
Activity: -
Merit: -
December 30, 2024, 11:00:22 AM
#2
Archived Post:
https://archive.ph/cOYLA

Client seed has been mined!
00000000000000000001075c66a10def69471a32d329470892cfde0a52aefec5

https://www.blockchain.com/es/explorer/blocks/btc/877067
?
Activity: -
Merit: -
December 30, 2024, 10:39:41 AM
#1
Welcome! In preparation for the upcoming launch of our original game Double in jonbet.bet.br, we're performing this seeding event to ensure fairness and immutable rolls. For this seeding event we are following a similar approach as Stake.com.

As part of our fairness we generated a chain of 10,000,000 SHA256 hashes where each hash is the hash of the hexadecimal representation of the previous hash. Being the last hash in the chain: bbcaf4ca3abd0e43e253f20831d39313459a11d6570d4946456633c9ce3cc6f5


Script to calculate Double roll:
Code:
const { createHmac } = require('crypto');

const TILES = [
  {number: 0, color: 'white'},
  {number: 11, color: 'black'},
  {number: 5, color: 'red'},
  {number: 10, color: 'black'},
  {number: 6, color: 'red'},
  {number: 9, color: 'black'},
  {number: 7, color: 'red'},
  {number: 8, color: 'black'},
  {number: 1, color: 'red'},
  {number: 14, color: 'black'},
  {number: 2, color: 'red'},
  {number: 13, color: 'black'},
  {number: 3, color: 'red'},
  {number: 12, color: 'black'},
  {number: 4, color: 'red'}
];

const getRollFromHash = hash => {
  // random number from 0-15
  const roll = parseInt(hash, 16) % 15;
  const tile = TILES.find(t => t.number === roll);

  let color;
  switch (tile.color) {
    case 'white':
      color = 0;
      break;

    case 'black':
      color = 2;
      break;

    case 'red':
      color = 1;
      break;

  }

  return {
    tile: roll,
    color: color
  }
}

// these will be the 10M pre generated rolls to be used
const hashChain = [];

const gameHash = hashChain.pop();

// It's the hash we're gonna be using of the result of a yet to be mined block on the blockchain # 877,067
const blockHash = '';

const hash = createHmac('sha256', gameHash).update(blockHash).digest('hex');

const {tile, color}= getRollFromHash(hash);
console.log({ tile, color });



We’re gonna be using a BlockHash that hasn’t been mined at the time of this post, we’re expecting to use Bitcoin block 877,067, this to prove we have no influence over the outcome of the game. Please guys feel free to quote this post so this will be all set in stone.

Looking forward to show you guys Double very soon!
Jump to: