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 idea
codemojex · the secret and the commitmentWhen 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.
The doors
the sibling coursesEchoMQ — the protocol, in depth
The bus B3 narrates, taught rung by rung: the keyspace, the Lua inventory, and the 3.0 Stream Tier — XADD, XREADGROUP, XACK — with conformance on Valkey.
Redis Patterns Applied
The substrate patterns under the bus: sorted sets, atomic Lua moves, locks, and streams — the judgement layer.
/echo-persistenceEcho Persistence — the durable floor
Beneath the volatile tiers: the Graft page engine built twice, the commit-LSN loop, and the stream archive on Tigris. Where Part I says state lives somewhere, this says where it lives durably.
References
sources · relatedSources
- Commitment schemes — hiding and bindingthe commit-and-reveal that seals a Golden Room's secret
- Helland — Life Beyond Distributed Transactions (CIDR 2007)a room template and a game as durable entities a record can hold
- King — Announcing Snowflake (2010)the branded ids that key a room, a game, and a membership
Related
- BCS — the course homethe law, the id anatomy, the chapter map
- Echo Persistencethe durable floor beneath the bus