asteria-stub: minimal test-composer host for property experimentation#74
Merged
asteria-stub: minimal test-composer host for property experimentation#74
Conversation
7d32546 to
c926dec
Compare
paolino
added a commit
that referenced
this pull request
Apr 29, 2026
Drop the asteria-stub harness — it served its purpose as the green baseline (PR #74 iter 5 was the proof). Replace it with the actual asteria-player workload from #67 (asteria-spawn-v2 HEAD ab1a462): - components/asteria-player/ — Haskell binaries (asteria-bootstrap + asteria-player), Aiken validators, composer scripts at composer/asteria/{eventually_asteria_alive, helper_sdk_lib, parallel_driver_asteria_bootstrap, parallel_driver_asteria_player}.sh Compose adds three services (asteria-bootstrap one-shot + 2 long- running players) and the asteria-sdk volume that connects them. The image is pinned by content digest to the build of #67's HEAD — ghcr.io/.../asteria-player@sha256:2cf2b33f… — so we run exactly the bytes #67 produced. The branch tag (:asteria-spawn-v2) which #67's own compose still uses is a tag-mutability footgun that #71's discipline eliminates here. Future bumps: change the source under components/asteria-player/, let publish-images build a new image at the new commit, then update this digest. publish-images already supports digest-only entries via PR #71's script change (skipped, image already exists).
6a02715 to
c926dec
Compare
084f878 to
8e4a285
Compare
8e4a285 to
9958981
Compare
The asteria-stub container becomes the long-running chain-following indexer. Its main process is upstream `utxo-indexer` from lambdasistemi/cardano-node-clients PR #98 (035-indexer-n2c-reconnect at 5707836b), pinned via a flake input and baked into the image by `nix build .#docker-image`. The indexer follows relay1's chain over N2C, persists state to RocksDB at /idx-db, exposes ready/utxos_at/await on /tmp/idx.sock, and now auto-reconnects in-process when the N2C peer closes the socket (supervisor + exponential-backoff retry from upstream issue #97). Replaces the per-component Dockerfile + apt + cardano-cli setup with a pure-nix build (flake.nix + nix/docker-image.nix). cardano-cli is no longer needed in this image because composer scripts now query the indexer's socket directly. Composer scripts (kept in their stub shape): - parallel_driver_heartbeat.sh — pings indexer's `ready`, Sometimes-true on processedSlot==tipSlot - eventually_alive.sh — post-fault: same probe with retries - finally_alive.sh — post-workload: same probe with retries Compose: mount relay1-state:/state:ro for the indexer's N2C peer and add asteria-stub-db named volume for RocksDB persistence. No restart: always — the supervisor handles transient peer churn.
9958981 to
b102cfd
Compare
6 tasks
paolino
added a commit
that referenced
this pull request
Apr 30, 2026
PR 1 of 2 toward the real asteria workload. Scope-limited to the rename + Haskell source lift + nix scaffolding so the binaries build alongside the existing utxo-indexer. Bootstrap is iteration 5b — *not safe for repeat invocation* — that gap is explicitly the subject of PR 2. Rename: components/asteria-stub/ → components/asteria-game/ service asteria-stub → asteria-game volume asteria-stub-db → asteria-game-db Lift from #67 (asteria-spawn-v2): components/asteria-game/aiken/ (validators + apply-params) components/asteria-game/src/Asteria/ (game state, datums, validators, wallet, providers, RNG, SDK) components/asteria-game/app/{BootstrapMain.hs, PlayerMain.hs} components/asteria-game/asteria-game.cabal (renamed package) components/asteria-game/cabal.project (cardano-node-clients SRP bumped to PR #98 head 5707836b) Build infra: flake.nix — extends prior asteria-stub flake with haskell.nix / iohk-nix overlays so local Haskell packages compile, while keeping the upstream cardano-node-clients flake input that supplies the prebuilt utxo-indexer (PR #98 supervisor). nix/project.nix — lifted from PR #67, package renamed. nix/docker-image.nix — bundles utxo-indexer + asteria-bootstrap + asteria-game (player) execs + composer scripts + bash/jq/ socat; entrypoint stays utxo-indexer. KNOWN GAP — admin_mint validator is the always-true placeholder PR #67 ships. Without an on-chain one-shot guarantee, every container restart could mint another admin NFT. Bootstrap is *not* wired into compose in this PR for that reason. PR 2 patches the Aiken admin_mint to take an OutputReference parameter, runs apply-params at bootstrap-time, and adds defence-in-depth detection in Bootstrap.hs. Composer scripts (composer/stub/{parallel_driver_heartbeat, eventually_alive, finally_alive, helper_sdk}.sh) unchanged from the green stub baseline so this PR stays bisect-safe and in property terms identical to commit 3b6fb0e (PR #74's merged head).
paolino
added a commit
that referenced
this pull request
Apr 30, 2026
PR 1 of 2 toward the real asteria workload. Scope-limited to the rename + Haskell source lift + nix scaffolding so the binaries build alongside the existing utxo-indexer. Bootstrap is iteration 5b — *not safe for repeat invocation* — that gap is explicitly the subject of PR 2. Rename: components/asteria-stub/ → components/asteria-game/ service asteria-stub → asteria-game volume asteria-stub-db → asteria-game-db Lift from #67 (asteria-spawn-v2): components/asteria-game/aiken/ (validators + apply-params) components/asteria-game/src/Asteria/ (game state, datums, validators, wallet, providers, RNG, SDK) components/asteria-game/app/{BootstrapMain.hs, PlayerMain.hs} components/asteria-game/asteria-game.cabal (renamed package) components/asteria-game/cabal.project (cardano-node-clients SRP bumped to PR #98 head 5707836b) Build infra: flake.nix — extends prior asteria-stub flake with haskell.nix / iohk-nix overlays so local Haskell packages compile, while keeping the upstream cardano-node-clients flake input that supplies the prebuilt utxo-indexer (PR #98 supervisor). nix/project.nix — lifted from PR #67, package renamed. nix/docker-image.nix — bundles utxo-indexer + asteria-bootstrap + asteria-game (player) execs + composer scripts + bash/jq/ socat; entrypoint stays utxo-indexer. KNOWN GAP — admin_mint validator is the always-true placeholder PR #67 ships. Without an on-chain one-shot guarantee, every container restart could mint another admin NFT. Bootstrap is *not* wired into compose in this PR for that reason. PR 2 patches the Aiken admin_mint to take an OutputReference parameter, runs apply-params at bootstrap-time, and adds defence-in-depth detection in Bootstrap.hs. Composer scripts (composer/stub/{parallel_driver_heartbeat, eventually_alive, finally_alive, helper_sdk}.sh) unchanged from the green stub baseline so this PR stays bisect-safe and in property terms identical to commit 3b6fb0e (PR #74's merged head).
paolino
added a commit
that referenced
this pull request
Apr 30, 2026
PR 1 of 2 toward the real asteria workload. Scope-limited to the rename + Haskell source lift + nix scaffolding so the binaries build alongside the existing utxo-indexer. Bootstrap is iteration 5b — *not safe for repeat invocation* — that gap is explicitly the subject of PR 2. Rename: components/asteria-stub/ → components/asteria-game/ service asteria-stub → asteria-game volume asteria-stub-db → asteria-game-db Lift from #67 (asteria-spawn-v2): components/asteria-game/aiken/ (validators + apply-params) components/asteria-game/src/Asteria/ (game state, datums, validators, wallet, providers, RNG, SDK) components/asteria-game/app/{BootstrapMain.hs, PlayerMain.hs} components/asteria-game/asteria-game.cabal (renamed package) components/asteria-game/cabal.project (cardano-node-clients SRP bumped to PR #98 head 5707836b) Build infra: flake.nix — extends prior asteria-stub flake with haskell.nix / iohk-nix overlays so local Haskell packages compile, while keeping the upstream cardano-node-clients flake input that supplies the prebuilt utxo-indexer (PR #98 supervisor). nix/project.nix — lifted from PR #67, package renamed. nix/docker-image.nix — bundles utxo-indexer + asteria-bootstrap + asteria-game (player) execs + composer scripts + bash/jq/ socat; entrypoint stays utxo-indexer. KNOWN GAP — admin_mint validator is the always-true placeholder PR #67 ships. Without an on-chain one-shot guarantee, every container restart could mint another admin NFT. Bootstrap is *not* wired into compose in this PR for that reason. PR 2 patches the Aiken admin_mint to take an OutputReference parameter, runs apply-params at bootstrap-time, and adds defence-in-depth detection in Bootstrap.hs. Composer scripts (composer/stub/{parallel_driver_heartbeat, eventually_alive, finally_alive, helper_sdk}.sh) unchanged from the green stub baseline so this PR stays bisect-safe and in property terms identical to commit 3b6fb0e (PR #74's merged head).
paolino
added a commit
that referenced
this pull request
May 1, 2026
PR 1 of 2 toward the real asteria workload. Scope-limited to the rename + Haskell source lift + nix scaffolding so the binaries build alongside the existing utxo-indexer. Bootstrap is iteration 5b — *not safe for repeat invocation* — that gap is explicitly the subject of PR 2. Rename: components/asteria-stub/ → components/asteria-game/ service asteria-stub → asteria-game volume asteria-stub-db → asteria-game-db Lift from #67 (asteria-spawn-v2): components/asteria-game/aiken/ (validators + apply-params) components/asteria-game/src/Asteria/ (game state, datums, validators, wallet, providers, RNG, SDK) components/asteria-game/app/{BootstrapMain.hs, PlayerMain.hs} components/asteria-game/asteria-game.cabal (renamed package) components/asteria-game/cabal.project (cardano-node-clients SRP bumped to PR #98 head 5707836b) Build infra: flake.nix — extends prior asteria-stub flake with haskell.nix / iohk-nix overlays so local Haskell packages compile, while keeping the upstream cardano-node-clients flake input that supplies the prebuilt utxo-indexer (PR #98 supervisor). nix/project.nix — lifted from PR #67, package renamed. nix/docker-image.nix — bundles utxo-indexer + asteria-bootstrap + asteria-game (player) execs + composer scripts + bash/jq/ socat; entrypoint stays utxo-indexer. KNOWN GAP — admin_mint validator is the always-true placeholder PR #67 ships. Without an on-chain one-shot guarantee, every container restart could mint another admin NFT. Bootstrap is *not* wired into compose in this PR for that reason. PR 2 patches the Aiken admin_mint to take an OutputReference parameter, runs apply-params at bootstrap-time, and adds defence-in-depth detection in Bootstrap.hs. Composer scripts (composer/stub/{parallel_driver_heartbeat, eventually_alive, finally_alive, helper_sdk}.sh) unchanged from the green stub baseline so this PR stays bisect-safe and in property terms identical to commit 3b6fb0e (PR #74's merged head).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Green baseline: a tiny
asteria-stubcontainer hosts composer scripts (parallel_driver_heartbeat, eventually_alive, finally_alive) that emit SDK assertions without real workload. Used to evolve property checks before touching the real asteria-player. Real game logic stays in #67.The 1h test on this branch was clean: 44 properties pass, 0 failed — https://cardano.antithesis.com/report/pr8n2PnMt9dgEWH-J38RYKV0/HAuvbkC8isytvseFh78pnE7b8Mi4ZWZg-cjTN8rxNM8.html?auth=v2.public.eyJzY29wZSI6eyJSZXBvcnRTY29wZVYxIjp7ImFzc2V0IjoiSEF1dmJrQzhpc3l0dnNlRmg3OHBuRTdiOE1pNFpXWmctY2pUTjhyeE5NOC5odG1sIiwicmVwb3J0X2lkIjoicHI4bjJQbk10OWRnRVdILUozOFJZS1YwIn19LCJuYmYiOiIyMDI2LTA0LTI5VDA5OjU4OjMyLjEzODc1NTEwNVoifcrbtMMLMUPPaefiRjpvlw9gLXXnOYkW4HlIfXBVeRUK3aFH0RNhdE9WDgB_Zsl5KZa-GnGc0vvBHJuJh0fQdwc
Single commit, rebased on post-PR #82 main.