Appearance
A Solana profile for the docker test stack — Solana fund paths run end-to-end in-stack
2026-07-18
The docker test stack could only run the EVM chain (a hardhat container + evm-bank). But the PMF beta is Solana-only (playSKPK), so the fund paths the beta actually runs on — deposit, withdraw, settle, betting, and the chip-claim-board playSKPK grant — had no end-to-end coverage in the stack. They were proven only in the out-of-process test/e2e/solana-cage harness, which drives the cage directly with a mock game-server — so anything spanning game-server → cage → chain couldn't be tested against real programs.
This change adds a Solana profile that mirrors EVM's chain-in-the-stack pattern.
Run it:
bash
CHIP_TOKEN=playskpk pnpm solana:localnet # host validator (separate terminal, stays alive)
pnpm test:up:solana # TEST_CHAIN=solana → the Solana profileThe EVM → Solana mapping. TEST_CHAIN=solana layers docker-compose.test.solana.yml (game-server CHAIN=solana → solana-bank:3668) + --profile solana (brings up the cage) over the EVM default. The default pnpm test:up is unchanged — TEST_CHAIN defaults to evm.
| EVM profile | Solana profile |
|---|---|
hardhat container | host solana-test-validator (native arm64, 4 programs) |
chain-deploy one-shot | the same host step (pnpm solana:localnet inits playSKPK/custody/betting + writes the cage keypairs) |
evm-bank + game-server CHAIN=evm | solana-bank (CHIP_TOKEN=playskpk) + game-server CHAIN=solana |
Why the validator runs on the host. The one Anza validator image is amd64-only; under Apple-Silicon emulation the validator failed to become RPC-ready in 120s+ (native boots in ~5s), and Anza doesn't reliably ship aarch64-linux. So the profile runs the host's native validator and points the containerized cage + game-server at host.docker.internal:8899 — the one piece that diverges from EVM's containerized chain, by platform necessity. Trade-off: the host validator is a singleton on :8899, so the Solana profile is one-stack-at-a-time until --rpc-port is TEST_PREFIX-parameterized (a follow-up).
Proven end-to-end. The 4 programs load Executable on-chain; the containerized cage boots against the host validator and POST /api/grant mints 500 playSKPK (real signature) with an idempotent same-claimId retry (no double-mint via the on-chain grant_marker); game-server boots CHAIN=solana wired to the cage; and the EVM default is untouched.
First consumer: chip-claim-board Phase 3 — its playSKPK claim-grant tests (A2/A6/A8/A11/A15) run on this profile against the real cage.
See the Testing on Solana guide and .indusk/planning/solana-test-stack/.