Welcome to our seeding event (thx Rhavar for the method)!
Starting with a secret we have generated 10 million SHA256 hash chain where each hash is the hash of the hexadecimal representation of the previous hash.
Last hash in the chain is: 10abd09447cea8db13aef1e23a05a058331c62289b712c15c413a0eb873049e1
Code to verify game results:
import { createHmac } from "crypto";
function result(hash, salt) {
const CHUNK_SIZE = 8;
const SECTIONS_COUNT = 54;
const hmac = createHmac("sha256", salt);
hmac.update(hash);
let hex = hmac.digest("hex");
const hexChunk = hex.substring(0, CHUNK_SIZE);
const int = parseInt(hexChunk, 16);
const float = int / 2 ** 32;
return Math.floor(float * SECTIONS_COUNT);
}
Hexadecimal string representation of hash of
bitcoin block 795604 will be our salt, as of posting this, this block has not been mined yet.
I'd appreciate it if someone could quote this post