Bitcoin Forum
May 09, 2024, 03:32:05 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Vegazbet - Dice Game Seeding Event  (Read 23 times)
vegazbet (OP)
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
December 09, 2021, 02:46:59 AM
 #1

In a few days I will be releasing the dice game in vegaz.bet. A provably fair casino dice game. This is the seeding event for the game.

Starting with a secret I've generated a chain of 10,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 7689b783b4873b5a1987eb2385e44c970ea9201f3cb4e0bec577e05f36913ce7.

Every game maps to a hash in the chain: The 10,000,000th element of the chain is the hash of game #1 and the first element in the chain is the hash of game #10,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:
Code:
def dice_game_function(client_seed: str, server_seed: str) -> int:
    """
    seeds must be hexadecimal values
    S = 6
    S = {1, 2, 3, 4, 5, 6}
    S C integers
    client_seed_processed e [0, |S|)
    server_seed_processed e [0, |S|)
    M(s) = s + 1
    game result = M( (client_seed_processed + server_seed_processed) mod |S|)
    1 = 1
    2 = 2
    3 = 3
    4 = 4
    5 = 5
    6 = 6
    """
    S = 6
    client_seed_processed = int(client_seed, 16)
    server_seed_processed = int(server_seed, 16)
    game_result = ( (client_seed_processed + server_seed_processed) % S) + 1
    return game_result

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 713400. This block has not been mined yet, proving that I have not deliberately picked any specific chain.
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!