← blog

mintrr notes

Fourteen defects a live run found that a green test suite did not

· technical

The suite was green and the live run still broke fourteen times. Each defect, each fix, and what only the network can teach.

youmintrryouchainyouThe two you steps are the ones we cannot do.
Describe it, it writes the code, you sign, it runs.
testingtestnetdefectsregisterlive runhonesty

The test suite was green. Thousands of tests, passing. Then we ran the casino on a live test network, and it broke fourteen times. Every break is recorded in the open register, fixed, and listed here, because the lesson is the list: a suite and a live run find different things, and only one of them is honest about the network.

The money layer broke three times

W-CASINO-STABLEV2-CREATE-GAP-001: the one-shot create path deployed a bare, uninitialized implementation instead of the working bundle. The contract looked deployed and was inert: empty name, empty symbol, owner set to itself.

W-BUNDLE-REGISTERS-PROXY-ABI-001: the registry filed the proxy address under the four-function proxy ABI, so the operator console could not find the blacklist function on its own token. The record had an ABI, just the wrong one, and nothing warned.

W-BUNDLE-GUARD-BLOCKS-ITS-OWN-PATH-001: the guard against single-contract deploys also blocked the sanctioned bundle path, which calls the same function, so the money layer was briefly undeployable by any route.

Each was a wiring truth no unit test held: the wrong contract in the right slot, the wrong ABI on the right address, the right guard on the wrong caller.

The operator console broke twice

W-MANAGE-BLACKLIST-NAME-001: the manage restrict command tried function names restrict, block and setBlocked, but the stablecoin names them blacklist and unBlacklist, so the console had no path to block a holder, which is a core casino operation.

W-CASINO-CONSOLE-PHASES-001: driving the live token through the manage path surfaced naming and phase gaps that only appear when commands arrive in the order a human runs them, against real chain state.

Deposits broke twice

W-CASINO-DEPOSIT-TXHASH-COLLISION-001: the phase derived transaction ids deterministically, so a re-run collided with the previous run's rows and the payment rail correctly refused to credit twice. The guard was right; the run was reusing ids.

W-MEMBER-ADDRESS-CASE-001: a checksummed wallet and its lowercase form registered as two different members, so a customer onboarded with a checksummed address could never be resolved and their deposit was never credited.

Gameplay broke three times

W-CASINO-PAYOUT-MATH-001: roulette was recorded at a 1.0x payout instead of 35:1, so a roulette loss gained the house a full unit while a win cost nothing. The realised edge was +41% against a claimed ~2.5%, and it was caught by comparing realised against theoretical rather than by asserting either.

W-CASINO-REVEAL-REDACTED-001: a commit-reveal hand records its commitment and seeds so an auditor can recompute the outcome, and those are 64-hex values, the same shape as a private key, so the evidence sanitiser redacted them. The claim that a hand is verifiable from the record became unverifiable from the file.

W-CASINO-VIEW-AS-TX-001: two phases drove view functions through a path that estimates gas and sends a transaction. A view cannot be sent as a transaction, so the calls failed for the wrong reason and the records claimed FAILED for assertions that were fine, and in one phase claimed SUCCESS for operations that never touched a contract.

The harness and the film broke four times

W-CASINO-EXPLORER-LINK-001 and W-CASINO-HARNESS-FOUNDATION-001: the recording and attribution machinery had to be built right before it could report anything trustworthy, including keeping an explorer link clickable rather than redacted.

W-CASINO-LOCAL-REGISTRY-POLLUTION-001: a run left state the next test could see, so isolation had to be part of the harness, not an afterthought.

W-CASINO-FILM-BLANK-001: the rendered case-study film was blank at every scene boundary, because the data loaded asynchronously in a race with the render and every scene faded from opacity zero. The thing that shows the proof needed its own proof.

What this teaches

Fourteen, all fixed, all with reopen triggers in case they ever come back. The suite still passes, and it still cannot find any of these, because they are not properties of the code. They are properties of the code meeting the network: casing, ordering, timing, hashing, and the thousand small ways a live chain differs from a fixture.

The practical lesson for anyone shipping on chain: a green suite is a floor, not a finish line. The defects that cost money live in the gap between what your tests build by hand and what the network hands you. Run the whole thing on a testnet before you run it with real funds, and write down every break. The register is the memory, and the memory is what stops the same break twice.

If you want a build that is exercised end to end before it holds anything of value, that is how mintrr works. Start the conversation from the contact page.