Author

Topic: Multiplayer Keno seed event - BC.Game (Read 508 times)

legendary
Activity: 2604
Merit: 2353
June 23, 2020, 03:47:28 PM
#11
Get ready for some exciting multiplayer action because at last, Keno is here. You spoke, we listened.
What lucky numbers and patterns will you choose to take the bankroll?
Will you go it alone or will you coordinate a strategy with your friends in chat? There are so many more possibilities with this new and exciting twist on a classic 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 54fe30623823224ef8379e00f3d88a02ed3333937862ee0383b9cbb3d1e43763

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.
That's great but why don't you use the same feature (a hash chain) for your crash game? And how do you pick your seeds for this game?
https://bitcointalksearch.org/topic/m.54660157
copper member
Activity: 240
Merit: 125
June 22, 2020, 02:07:20 AM
#10
Block 635,810 is mined
https://btc.com/000000000000000000076973be291d219d283d4af9135601ff37df46491cca7e
So our salt will be
000000000000000000076973be291d219d283d4af9135601ff37df46491cca7e
We will use the new algorithm after the Bet #35489 in Keno
newbie
Activity: 4
Merit: 0
June 22, 2020, 01:57:38 AM
#9
Get ready for some exciting multiplayer action because at last, Keno is here. You spoke, we listened.
What lucky numbers and patterns will you choose to take the bankroll?
Will you go it alone or will you coordinate a strategy with your friends in chat? There are so many more possibilities with this new and exciting twist on a classic 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 54fe30623823224ef8379e00f3d88a02ed3333937862ee0383b9cbb3d1e43763

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:
const CryptoJS = require("crypto-js");

function seedGenerator(hash, salt) {
    const hmac = CryptoJS.HmacSHA256(CryptoJS.enc.Hex.parse(hash), salt);
    return hmac.toString(CryptoJS.enc.Hex);
}
function createNums(allNums, hash) {
    const nums = [];
    let h = CryptoJS.SHA256(hash).toString(CryptoJS.enc.Hex);
    allNums.forEach((c) => {
        nums.push({ num: c, hash: h });
        h = h.substring(1) + h.charAt(0);
    });
    nums.sort(function (o1, o2) {
        if (o1.hash < o2.hash) {
            return -1;
        } else if (o1.hash === o2.hash) {
            return 0;
        } else {
            return 1;
        }
    });
    return nums;
}
function keno(hash) {
    const salt = 'salt waiting to be generated';
    const allNums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]
    const seed = seedGenerator(hash, salt);
    let finalNums = createNums(allNums, seed);
    finalNums = createNums(finalNums, seed);
    return finalNums.slice(0, 10).map(m => m.num)
}

let hash = 'game hash';
console.log('result =>', keno( hash ).map(item => item.num).join(','));


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 635,010
This block has not been mined yet at the time of starting the provably fair seeding event, proving that I have not deliberately picked a chain that is unfavorable for players.
Quated bruh it's BustaMachine Wink
newbie
Activity: 17
Merit: 0
June 22, 2020, 01:49:34 AM
#8
Get ready for some exciting multiplayer action because at last, Keno is here. You spoke, we listened.
What lucky numbers and patterns will you choose to take the bankroll?
Will you go it alone or will you coordinate a strategy with your friends in chat? There are so many more possibilities with this new and exciting twist on a classic 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 54fe30623823224ef8379e00f3d88a02ed3333937862ee0383b9cbb3d1e43763

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:
const CryptoJS = require("crypto-js");

function seedGenerator(hash, salt) {
    const hmac = CryptoJS.HmacSHA256(CryptoJS.enc.Hex.parse(hash), salt);
    return hmac.toString(CryptoJS.enc.Hex);
}
function createNums(allNums, hash) {
    const nums = [];
    let h = CryptoJS.SHA256(hash).toString(CryptoJS.enc.Hex);
    allNums.forEach((c) => {
        nums.push({ num: c, hash: h });
        h = h.substring(1) + h.charAt(0);
    });
    nums.sort(function (o1, o2) {
        if (o1.hash < o2.hash) {
            return -1;
        } else if (o1.hash === o2.hash) {
            return 0;
        } else {
            return 1;
        }
    });
    return nums;
}
function keno(hash) {
    const salt = 'salt waiting to be generated';
    const allNums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]
    const seed = seedGenerator(hash, salt);
    let finalNums = createNums(allNums, seed);
    finalNums = createNums(finalNums, seed);
    return finalNums.slice(0, 10).map(m => m.num)
}

let hash = 'game hash';
console.log('result =>', keno( hash ).map(item => item.num).join(','));


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 635,010
This block has not been mined yet at the time of starting the provably fair seeding event, proving that I have not deliberately picked a chain that is unfavorable for players.

This had to be quoted for the record.
newbie
Activity: 6
Merit: 0
June 22, 2020, 01:30:26 AM
#7
Get ready for some exciting multiplayer action because at last, Keno is here. You spoke, we listened.
What lucky numbers and patterns will you choose to take the bankroll?
Will you go it alone or will you coordinate a strategy with your friends in chat? There are so many more possibilities with this new and exciting twist on a classic 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 54fe30623823224ef8379e00f3d88a02ed3333937862ee0383b9cbb3d1e43763

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:
const CryptoJS = require("crypto-js");

function seedGenerator(hash, salt) {
    const hmac = CryptoJS.HmacSHA256(CryptoJS.enc.Hex.parse(hash), salt);
    return hmac.toString(CryptoJS.enc.Hex);
}
function createNums(allNums, hash) {
    const nums = [];
    let h = CryptoJS.SHA256(hash).toString(CryptoJS.enc.Hex);
    allNums.forEach((c) => {
        nums.push({ num: c, hash: h });
        h = h.substring(1) + h.charAt(0);
    });
    nums.sort(function (o1, o2) {
        if (o1.hash < o2.hash) {
            return -1;
        } else if (o1.hash === o2.hash) {
            return 0;
        } else {
            return 1;
        }
    });
    return nums;
}
function keno(hash) {
    const salt = 'salt waiting to be generated';
    const allNums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]
    const seed = seedGenerator(hash, salt);
    let finalNums = createNums(allNums, seed);
    finalNums = createNums(finalNums, seed);
    return finalNums.slice(0, 10).map(m => m.num)
}

let hash = 'game hash';
console.log('result =>', keno( hash ).map(item => item.num).join(','));


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 635,010
This block has not been mined yet at the time of starting the provably fair seeding event, proving that I have not deliberately picked a chain that is unfavorable for players.
   


Noted too
member
Activity: 356
Merit: 12
June 22, 2020, 01:27:11 AM
#6
Dear community members,

After launching our new Multiplayer Keno game, we found that the current algorithm had a problem. Specifically, the ball shuffling gave the balls numbered 1-10 a probability of being the game's result over the other balls by 1%-2%.

Reasons:
1. The initialization order of the balls is arranged in the order of 1-40.
2. The hash used for the two ball shuffling events is the same, resulting in the similar order of the balls in the two shuffling events and the order of the balls not scattered widely enough.

1% House Edge does not affect fairness, but in order to make the game result distribution more random, we will upgrade the algorithm and choose a new salt.

Upgrading methods:
1. Adjust the initialization order of the balls. We will provide the order before the games so as to adhere to fairness standards.
2. Use a new hash for the second shuffling. The new hash will be generated through calculating the seed of the first ball shuffling with hash256 (seed).
This is the new code:

Code:
const CryptoJS = require("crypto-js");

function seedGenerator(hash, salt) {
    const hmac = CryptoJS.HmacSHA256(CryptoJS.enc.Hex.parse(hash), salt);
    return hmac.toString(CryptoJS.enc.Hex);
}
function createNums(allNums, hash) {
    const nums = [];
    let h = CryptoJS.SHA256(hash).toString(CryptoJS.enc.Hex);
    allNums.forEach((c) => {
        nums.push({ num: c, hash: h });
        h = h.substring(1) + h.charAt(0);
    });
    nums.sort(function (o1, o2) {
        if (o1.hash < o2.hash) {
            return -1;
        } else if (o1.hash === o2.hash) {
            return 0;
        } else {
            return 1;
        }
    });
    return nums;
}
function keno(hash) {
    const salt = 'salt waiting to be generated';
    const allNums = [1, 30, 11, 40, 2, 29, 12, 39, 3, 28, 13, 38, 4, 27, 14, 37, 5, 26, 15, 36, 6, 25, 16, 35, 7, 24, 17, 34, 8, 23, 18, 33, 9, 22, 19, 32, 10, 21, 20, 31];
    let seed = seedGenerator(hash, salt);
    let finalNums = createNums(allNums, seed);
    seed = String(CryptoJS.SHA256(seed));
    finalNums = createNums(finalNums, seed);
    return finalNums.slice(0, 10).map(m => m.num)
}

let hash = 'game hash';
console.log('result =>', keno( hash ).map(item => item.num).join(','));

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 635,810
This block has not been mined yet at the time of starting the provably fair seeding event, proving that I have not deliberately picked a chain that is unfavorable for players. Also this block has not been pre-mined which can be verified using any block explorer.

Noted.
sr. member
Activity: 1134
Merit: 279
My blockchain can beat up your blockchain
June 22, 2020, 01:13:37 AM
#5
I can't help but smile knowing that for a brief period of time, there existed a 1%-2% "Player's Edge" instead of the usual 1% House Edge. Lol.

All joking aside I'm glad that you are paying attention and showing great professionalism in the way you run bcgame. I'm once again, highly impressed.
copper member
Activity: 240
Merit: 125
June 22, 2020, 01:01:32 AM
#4
Dear community members,

After launching our new Multiplayer Keno game, we found that the current algorithm had a problem. Specifically, the ball shuffling gave the balls numbered 1-10 a probability of being the game's result over the other balls by 1%-2%.

Reasons:
1. The initialization order of the balls is arranged in the order of 1-40.
2. The hash used for the two ball shuffling events is the same, resulting in the similar order of the balls in the two shuffling events and the order of the balls not scattered widely enough.

1% House Edge does not affect fairness, but in order to make the game result distribution more random, we will upgrade the algorithm and choose a new salt.

Upgrading methods:
1. Adjust the initialization order of the balls. We will provide the order before the games so as to adhere to fairness standards.
2. Use a new hash for the second shuffling. The new hash will be generated through calculating the seed of the first ball shuffling with hash256 (seed).
This is the new code:

Code:
const CryptoJS = require("crypto-js");

function seedGenerator(hash, salt) {
    const hmac = CryptoJS.HmacSHA256(CryptoJS.enc.Hex.parse(hash), salt);
    return hmac.toString(CryptoJS.enc.Hex);
}
function createNums(allNums, hash) {
    const nums = [];
    let h = CryptoJS.SHA256(hash).toString(CryptoJS.enc.Hex);
    allNums.forEach((c) => {
        nums.push({ num: c, hash: h });
        h = h.substring(1) + h.charAt(0);
    });
    nums.sort(function (o1, o2) {
        if (o1.hash < o2.hash) {
            return -1;
        } else if (o1.hash === o2.hash) {
            return 0;
        } else {
            return 1;
        }
    });
    return nums;
}
function keno(hash) {
    const salt = 'salt waiting to be generated';
    const allNums = [1, 30, 11, 40, 2, 29, 12, 39, 3, 28, 13, 38, 4, 27, 14, 37, 5, 26, 15, 36, 6, 25, 16, 35, 7, 24, 17, 34, 8, 23, 18, 33, 9, 22, 19, 32, 10, 21, 20, 31];
    let seed = seedGenerator(hash, salt);
    let finalNums = createNums(allNums, seed);
    seed = String(CryptoJS.SHA256(seed));
    finalNums = createNums(finalNums, seed);
    return finalNums.slice(0, 10).map(m => m.num)
}

let hash = 'game hash';
console.log('result =>', keno( hash ).map(item => item.num).join(','));

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 635,810
This block has not been mined yet at the time of starting the provably fair seeding event, proving that I have not deliberately picked a chain that is unfavorable for players. Also this block has not been pre-mined which can be verified using any block explorer.
legendary
Activity: 2772
Merit: 3284
June 16, 2020, 10:24:39 PM
#3
Get ready for some exciting multiplayer action because at last, Keno is here. You spoke, we listened.
What lucky numbers and patterns will you choose to take the bankroll?
Will you go it alone or will you coordinate a strategy with your friends in chat? There are so many more possibilities with this new and exciting twist on a classic 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 54fe30623823224ef8379e00f3d88a02ed3333937862ee0383b9cbb3d1e43763

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:
const CryptoJS = require("crypto-js");

function seedGenerator(hash, salt) {
    const hmac = CryptoJS.HmacSHA256(CryptoJS.enc.Hex.parse(hash), salt);
    return hmac.toString(CryptoJS.enc.Hex);
}
function createNums(allNums, hash) {
    const nums = [];
    let h = CryptoJS.SHA256(hash).toString(CryptoJS.enc.Hex);
    allNums.forEach((c) => {
        nums.push({ num: c, hash: h });
        h = h.substring(1) + h.charAt(0);
    });
    nums.sort(function (o1, o2) {
        if (o1.hash < o2.hash) {
            return -1;
        } else if (o1.hash === o2.hash) {
            return 0;
        } else {
            return 1;
        }
    });
    return nums;
}
function keno(hash) {
    const salt = 'salt waiting to be generated';
    const allNums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]
    const seed = seedGenerator(hash, salt);
    let finalNums = createNums(allNums, seed);
    finalNums = createNums(finalNums, seed);
    return finalNums.slice(0, 10).map(m => m.num)
}

let hash = 'game hash';
console.log('result =>', keno( hash ).map(item => item.num).join(','));


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 635,010
This block has not been mined yet at the time of starting the provably fair seeding event, proving that I have not deliberately picked a chain that is unfavorable for players.

Quoted and archived.
copper member
Activity: 240
Merit: 125
June 16, 2020, 09:38:03 PM
#2
Block 635,010 is mined
https://btc.com/0000000000000000000cdcd92552a3971fc46cf451fe8e0df56af95d2fbe4585
So our salt will be
0000000000000000000cdcd92552a3971fc46cf451fe8e0df56af95d2fbe4585
copper member
Activity: 240
Merit: 125
June 16, 2020, 06:45:22 AM
#1
Get ready for some exciting multiplayer action because at last, Keno is here. You spoke, we listened.
What lucky numbers and patterns will you choose to take the bankroll?
Will you go it alone or will you coordinate a strategy with your friends in chat? There are so many more possibilities with this new and exciting twist on a classic 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 54fe30623823224ef8379e00f3d88a02ed3333937862ee0383b9cbb3d1e43763

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:
const CryptoJS = require("crypto-js");

function seedGenerator(hash, salt) {
    const hmac = CryptoJS.HmacSHA256(CryptoJS.enc.Hex.parse(hash), salt);
    return hmac.toString(CryptoJS.enc.Hex);
}
function createNums(allNums, hash) {
    const nums = [];
    let h = CryptoJS.SHA256(hash).toString(CryptoJS.enc.Hex);
    allNums.forEach((c) => {
        nums.push({ num: c, hash: h });
        h = h.substring(1) + h.charAt(0);
    });
    nums.sort(function (o1, o2) {
        if (o1.hash < o2.hash) {
            return -1;
        } else if (o1.hash === o2.hash) {
            return 0;
        } else {
            return 1;
        }
    });
    return nums;
}
function keno(hash) {
    const salt = 'salt waiting to be generated';
    const allNums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]
    const seed = seedGenerator(hash, salt);
    let finalNums = createNums(allNums, seed);
    finalNums = createNums(finalNums, seed);
    return finalNums.slice(0, 10).map(m => m.num)
}

let hash = 'game hash';
console.log('result =>', keno( hash ).map(item => item.num).join(','));


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 635,010
This block has not been mined yet at the time of starting the provably fair seeding event, proving that I have not deliberately picked a chain that is unfavorable for players.
Jump to: