spike(environment): topology → upstream LocalNet feasibility PoC - #345
Closed
srikanth-bitdynamics wants to merge 2 commits into
Closed
srikanth-bitdynamics wants to merge 2 commits into
srikanth-bitdynamics wants to merge 2 commits into
Conversation
…ated config + override Phase-0 feasibility spike for the environment topology compiler — multiple validators / synchronizers, compiled into an upstream Splice LocalNet without forking the stack. internal/environment generates, from a hard-coded topology: participant HOCON reusing upstream's `_participant` anchor, and a compose.override.yaml that publishes ports and provisions per-participant databases via CREATE_DATABASE_*. Layered over the real upstream compose.yaml + resource-constraints.yaml, `docker compose config` validates and carries the injected participant with the upstream cache untouched. Confirmed by a gated end-to-end test (DEVKIT_ENV_SPIKE_DOCKER=1 go test ./internal/environment/...). Not wired to any CLI command; this seeds the module structure and records the mechanism, the chosen injection strategy, and the open risks (Validator App onboarding, synchronizer bootstrap) in docs/design/env-topology-spike.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…lNet Publish the generated participant's gRPC health port in the compose override (the canton image ships grpc-health-probe), and add TestGate1_Boot: a gated integration test that boots the pinned upstream LocalNet with the generator's participant HOCON + override applied and asserts the Gate-1 condition — canton + splice reach healthy (so the generated HOCON parsed and all participants instantiated), the generated Postgres databases exist, and each generated participant's gRPC health reports SERVING. Verified against real Splice 0.6.12: canton/splice healthy with project-a and project-b added, both databases present, both participants SERVING on their gRPC health ports, clean teardown. Gate 1 proves only that arbitrary generated participants load without breaking Canton; validator onboarding is Gate 2. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Draft / spike — not for merge. A Phase-0 feasibility probe for the environment topology compiler (the big "network-of-networks" plan): can DevKit compile a developer-described multi-validator / multi-synchronizer topology into the upstream Splice LocalNet via generated config + a compose override, without forking the stack?
Verdict: feasible
The upstream LocalNet is built for this. Evidence (from
canton-network/splicecluster/compose/localnet/, interface identical 0.6–0.8):cantoncontainer bind-mounts its config (${LOCALNET_DIR}/conf/canton/app.conf) — nothing baked.app.confassembles the topology from reusable_participant/_storageanchors viainclude, so each participant is justcanton.participants.<name> = ${_participant} { db, ports }.CREATE_DATABASE_*env.multi-sync-startup/multi-sync-ready+conf/console/app-synchronizer.sc) — to generalize, not invent.What's here
internal/environment/— model + generator that emits participant HOCON and acompose.override.yaml(ports + DBs) from a topology. Not wired to any CLI yet.docs/design/env-topology-spike.md— the mechanism, chosen injection strategy (generated env dir + override, upstream compose used unmodified via-f), and open risks.examples/environments/consortium-lab.yaml— the flagship target topology (schema doc; parser not built).Validated
docker compose configmerges the generated override over the real upstreamcompose.yaml+resource-constraints.yamland carries the injected participant's ports, DB env, and generatedapp.confmount — upstream cache untouched. Proven byTestComposeConfigValidates(gated behindDEVKIT_ENV_SPIKE_DOCKER=1; normalgo testruns only hermetic render assertions). gofmt + build + tests green.NOT yet validated (next)
docker compose configchecks the compose layer only. Still to prove: HOCON parses + Canton boots with generated participants; generated sequencer/mediator +app-synchronizer.scbootstrap; connect + enable multi-sync;type: baseresolution; and Validator App onboarding assumptions (the highest risk). See the design note's Milestone-A list.🤖 Generated with Claude Code