jonnify·bcs /bcs/codemojex/rooms-and-modes/secret-and-commitment

B7.2.3 · dive 3 of 3 · module B7.2

The secret and its commitment.

A game draws six distinct codes as the secret, immutable for its life; a Golden Room seals it behind a commitment published at open and revealed at close, so the blind mode is provably fair.

The secret drawn, held immutable, and sealed behind a commitment in blind mode. Select a part.
GAM — the secretsix distinct codes from the set immutable for the gamecached under its version blind mode — provably faircommit at openH(secret + nonce)reveal at closerecompute and verifythe secret cannot change after open
readout · Select a part. A game draws six distinct codes; the secret is immutable for the game and cached under its version; a Golden Room commits to it at open and reveals it at close for verification.
§1

The idea

codemojex · the secret and the commitment

When a game opens it draws six distinct codes from its emoji set — the secret — and that secret does not change for the game’s life. Because it is fixed and small, it lives on the Postgres floor as the record of truth and is cached under the game’s version, read without a round trip on the hot path. A guess is scored against it, and in a live room a score returns at once.

A blind room asks more of the secret, because the pool settles against it only at the end and a player has no feedback in between. So a Golden Room publishes a commitment when it opens — a hash over the secret and a nonce — which hides the secret while binding the server to it. The value reveals nothing before the close, and the server cannot later open it to a different secret.

At the close the secret and the nonce are revealed, and anyone can recompute the hash and check it against the commitment posted at open. That turns a server a player must trust into one a player can verify: the secret was fixed in advance, the same one every guess was scored against. The reference implementation treats the commitment as part of the game record, so a Golden Room is provably fair by construction rather than by promise.

§4

The doors

the sibling courses
§2

References

sources · related

Sources

Related