Thread network through local-HM for testnet2 tenant spawns#54
Merged
Conversation
…or testnet2 Adds `network` to `LocalHmConfig` and threads the trader spawn's `--network` option through `ensureLocalHM` → `buildHmEnv` → `UNICITY_NETWORK` on the HM container. The HM then inherits the network into every tenant it spawns (trader, escrow, etc). Before this change, `sphere trader spawn --network testnet2` was accepted by the CLI but the HM booted with UNICITY_NETWORK=testnet, so tenants ran against v1 gateway (which is retired) instead of testnet2. Widened the `network` type to include 'testnet2' at three sites: - LocalHmConfig.network (new optional field) - TraderSpawnOptions.network (was: testnet|mainnet|dev) - TraderSpawnCliOpts.network (was: testnet|mainnet|dev) - --network help text updated Also supports SPHERE_LOCAL_HM_NETWORK env var as a fallback source. Companion to sphere-sdk PR #656 (wave 6-P2-20 retry wrapper) which handles testnet2 gateway 5xx transients.
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.
Fix:
sphere trader spawn --network testnet2was accepted by the CLI but the HM booted withUNICITY_NETWORK=testnet. So the tenant ran against v1 (retired) gateway.Change: thread
networkthroughLocalHmConfig→buildHmEnv→UNICITY_NETWORKon the HM container. Also widened the type to include 'testnet2'. SupportsSPHERE_LOCAL_HM_NETWORKenv override.Companion to sphere-sdk PR #656 (wave 6-P2-20 retry wrapper for testnet2 gateway 5xx transients).