RAIN RNG · PRE-SUBMISSION PACKAGE v1.2 · DOCUMENT
LAB/README — PACKAGE INDEX
Source
sdk-v2/lab/README.md · commit 96368332 · GLI CSR §2.2: Index (maps every §2.2 heading) · ← package index · raw on GitHub ↗lab/ — RAIN RNG v2.1 test-lab submission package
Index of everything an accredited laboratory (GLI, BMM, iTech Labs, eCOGRA, Gaming Associates) asks for when certifying a software RNG, mapped to the GLI Composite Submission Requirements v2.0 §2.2 headings. Requirements analysis: ../docs/LAB-SUBMISSION-REQUIREMENTS.md; status table: ../docs/LAB-READINESS.md.
Map to GLI CSR v2.0 §2.2
| GLI CSR §2.2 item | Where in this package |
|---|---|
| RNG Source Code (final, complete, compilable, commented, with edit history; delivered with compiled binaries) | ../packages/rng-core/src, ../packages/rng-session/src, ../packages/rng-node/src, ../packages/rng-py/rain_rng (edit history: git log); binaries ../packages/*/dist; vendored readable game engines ../packages/games/vendor; per-file SHA-256 in FINGERPRINTS.json |
| RNG Final Outcome Collection Tool (same RNG as live, user-specified number of draws, parsable output) | tools/collect-outcomes.mjs — CSV; games dice/roulette/coin/slot-reel/card-shuffle (+ legacy), adversarial-player modes, checkpointed; batch runner tools/run-outcomes.sh |
| Raw Output Collection Tool (≈ 96 Mbit binary, un-scaled) | tools/collect-raw.mjs — big-endian uint32 words from drbg(r_k, gameId) via the real ceremony; deterministic with --seed; parallel & stream modes (--out - for TestU01/dieharder -g 200); tools/collect-big.sh (4 GB files) |
| RNG Description and Documentation | RNG-DESCRIPTION.md (GLI-19 §3 order; §3.3.2 a/b/c; App. A independence proof; App. B scaling proofs) · ../docs/RNG.md (protocol whitepaper) |
| Technical Source Code Description ("follow the logic from instantiation to final outcome") | RNG-DESCRIPTION.md §2–§6 with file:line references; SCALING-INVENTORY.md (every %/reduction in the repo, classified) |
| Statistical data analysis | REPORT-STATISTICAL.md (tables generated from the logs by tools/report-tables.sh fill) with raw logs under results/: Dieharder full battery on an unbounded stream (tools/run-dieharder-stream.sh, resumable, never rewinds), NIST STS 2.1.2 1000 × 10⁶ bits (tools/run-sts.sh), TestU01 SmallCrush file-backed (tools/testu01/; Crush/BigCrush stream runner tools/run-testu01-crush-stream.sh), scaled outcomes incl. adversarial (tools/run-outcomes.sh → tools/analyze-outcomes.mjs). Invalid (rewound) Dieharder runs are kept under results/dieharder/_*invalid*/ and are not evidence |
| Software verification (lab recompiles; signatures must match) | BUILD.md (pinned toolchain, deterministic steps), FINGERPRINTS.json, npm run lab:verify-build (passes twice on the reference machine) |
| Runtime self-verification (GLI-19 §2.3.2; SP 800-90A §11.3) | ../packages/rng-node/src/selftest.ts — KATs before first use + daily + /selftest; output inhibited on failure; artifact fingerprint check (RAIN_FINGERPRINTS); tests ../packages/rng-node/test/selftest.test.mjs |
| Game Description / pay tables | out of RNG scope — game configs vendored in ../packages/games/vendor/slot-engine-v2/*.json; rules live in the Playmarket/MAY repos |
| Platform items (§2.9/§2.11): change control, SDLC, key management, incident management, hosting/DR | process/CHANGE-CONTROL.md, process/SDLC.md, process/KEY-MANAGEMENT.md, process/INCIDENT-RESPONSE.md, process/HOSTING-HA-DR.md |
| Pen-test / external audit | not available — cadence, scope and honest status in process/SECURITY-PROGRAM.md; see ../docs/LAB-READINESS.md (items 11, 12) |
| Repository controls (GLI-19 App. B) | ../.github/workflows/ci.yml (CI gate incl. fingerprint drift), ../.github/CODEOWNERS, ../docs/GOVERNANCE.md (branch protection, 2 approvals, signed tags) |
| Evidence index (artifact → path → size → count → proves → §2.2 item) | EVIDENCE-INDEX.md (regenerate: node tools/evidence-index.mjs) |
| Scaling proof, stand-alone | SCALING-PROOF.md (intBelow exactly uniform; legacy % N bias ≤ N/2²⁵⁶, out of scope) |
| GLI-19 §3.3.2(c) state modification / external entropy, stand-alone | STATE-MODIFICATION-3.3.2c.md |
| Real-network latency (pipelining OFF/ON against a remote node) | results/latency-real-network/REPORT.md |
| Review responses | REVIEW-RESPONSE-R1.md (Joni, round 1 — 7 items → actions → evidence → status) |
Layout
lab/
README.md this index
RNG-DESCRIPTION.md the RNG technical description (submit this)
REPORT-STATISTICAL.md the statistical evidence report (submit this)
EVIDENCE-INDEX.md one-screen artifact table (auto-generated)
SCALING-PROOF.md one-page scaling proof (certified intBelow vs legacy % N)
STATE-MODIFICATION-3.3.2c.md one-page GLI-19 §3.3.2(c) answer
REVIEW-RESPONSE-R1.md review round 1 → what was done → evidence → status
SCALING-INVENTORY.md every reduction in the code base, classified
BUILD.md FINGERPRINTS.json reproducible build + SHA-256 manifest
process/ change control, SDLC, keys, incidents, hosting
tools/ collection tools, analyzers, suite runners, TestU01 generators (C)
results/
raw/<mech>/ SEED, SEED-BIG, *.meta.json, *.sha256 (binaries regenerated by seed; .gitignored)
dieharder/<mech>-stream/ RUN.txt, tests/<id>[-n<k>].log (+.DONE) one per battery test, dieharder-a.log (assembled), SUMMARY.txt
dieharder/_smoke-invalid/, _invalid-rewound/ quarantined file-input runs that rewound (NOT evidence, see REPORT §8)
sts/<mech>/ RUN.txt, finalAnalysisReport.txt, experiments/ (per-test results.txt/stats.txt)
testu01/<mech>/ RUN.txt, smallcrush.log (crush/bigcrush not run — data volume; see REPORT §9)
outcomes/<mech>/ *.csv.meta.json, *.analysis.json, *.analysis.md (CSV regenerated by seed; .gitignored)
outcomes/hmac-1e8/ hmac-drbg sets raised to 1e8 outcomes per game (dice, roulette, coin, slot-reel)
latency-real-network/ Render (Oregon) ↔ AWS (Virginia) pipelining OFF/ON, HTTP+WS, results.json + REPORT.md
PROGRESS.md run journal (what ran when, measured Dieharder data consumption per test, hand-off notes)
logs/ collection and suite logs
Reproduce everything
npm ci && npm run lab:verify-build # build + fingerprints
node lab/tools/collect-raw.mjs --bits 32e9 --mechanism chacha --seed $(cat lab/results/raw/chacha/SEED-BIG) --workers 4 --out raw.bin
bash lab/tools/run-dieharder-stream.sh chacha 4 # full battery on an unbounded stream (-g 200), resumable
bash lab/tools/summarize-dieharder-stream.sh chacha # dieharder-a.log + SUMMARY.txt from the per-test logs
bash lab/tools/run-sts.sh chacha lab/results/raw/chacha/raw-32gbit.bin 1000 1000000 <private copy of sts-2.1.2>
lab/tools/testu01/rain_file_gen lab/results/raw/chacha/raw-32gbit.bin smallcrush
P=4 bash lab/tools/run-outcomes.sh # all scaled-outcome data sets + analysis
P=4 bash lab/tools/run-outcomes-hmac-1e8.sh # hmac sets at 1e8 outcomes per game (≈ 1.5 CPU-h each)
node lab/tools/evidence-index.mjs # regenerate EVIDENCE-INDEX.md from results/
bash lab/tools/report-tables.sh fill # regenerate REPORT-STATISTICAL.md tables from results/
bash lab/tools/status.sh # one-screen status of running suites
Seeds, commit hashes, tool versions and sha256 of every data file are in the *.meta.json next to each result.
← Back to the package index · Rendered 2026-09-14 09:34 UTC from the repository copy; the markdown in the zip / repo is the document of record.