Skip to content

feat(cli)!: take every test network from its Trinity stack descriptor - #1885

Merged
mordamax merged 10 commits into
mainfrom
feat/host-cli-stack
Nov 5, 2026
Merged

mordamax merged 10 commits into
mainfrom
feat/host-cli-stack

Conversation

@mordamax

@mordamax mordamax commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Lets truapi-host run against any Trinity stack, a fork, a staging instance or a local file: truapi-host --stack https://previewnet-stg.substrate.dev/.well-known/trinity-stack.json identity-check --mnemonic …

Polkadot stays a hard-coded network: RFC 2 pins its reserved values per build, and that is separate work.

  • previewnet and paseo-next-v2 now come from the signed descriptors this release ships, and each command uses the newer published copy when there is one
  • A notice prints only when the published copy changes a field the CLI reads, such as an endpoint, a genesis hash or the identity backend, so routine republishes stay silent
  • --stack takes a descriptor URL, a stack link or a local file, also as HOST_CLI_STACK
  • The chains, genesis hashes, identity backend, TLD and dotNS popController come from the stack
  • Before a command runs, each chain of a built-in network or a stack must report the descriptor's genesis, and People's NetworkSuffix must equal the stack's TLD
  • An endpoint that doesn't answer within 3 s gives a warning, and the command continues
  • When a built-in's chains report another genesis, the CLI fetches the published descriptor again before failing, and the error says the stack restarted from genesis
  • A stack with Polkadot's genesis hashes, the dot TLD or the polkadot namespace is refused, so PCF's devnet, whose TLD is dot, does not run
  • --network picks a built-in network by name and --stack any other stack
  • --network and --stack cannot be combined, and a stack's product namespace is its descriptor's id without -fork
  • HOST_CLI_PEOPLE_WS, HOST_CLI_ASSET_HUB_WS and HOST_CLI_BULLETIN_WS now reroute a role of a built-in network or a stack, and the rerouted endpoint must answer with that network's genesis
  • HOST_CLI_LOCAL_NETWORK_CONFIG and local-network-check work as before, without a descriptor fetch, and the file cannot be combined with --stack or the chain URL overrides
  • network-check prints the routing of any network, stack or override without contacting a chain
  • stack bundle refuses a copy that changes the TLD of the copy it replaces, since every derived account would change
  • stack bundle --skip-same-projection leaves the existing copy when the new one changes no field the CLI reads
  • The weekly chain-spec PR also refreshes the bundled descriptors and writes the patch changeset it needs, so the next @parity/truapi release ships them

Part of #1312

@github-actions github-actions Bot added the size:XXL 1000 lines or more; split it, or say in the description why it cannot be label Nov 4, 2026
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Bundle size report

Compared with main at bbc4156.

Raw Gzip Brotli
truapi-host 8.46 MiB 5.85 MiB 5.52 MiB
truapi-provider 4.04 MiB 1.27 MiB 961.4 KiB
truapi 7.89 MiB 1.10 MiB 916.9 KiB
trinity-stack 634.2 KiB 247.5 KiB 204.8 KiB
Total 21.02 MiB 8.47 MiB 7.56 MiB

WebAssembly modules

Raw Gzip Brotli
truapi-host/wasm/web/truapi_server_bg.wasm 3.34 MiB 1.16 MiB 883.0 KiB
truapi-host/wasm/web/truapi_verifiable_bg.wasm 4.89 MiB 4.64 MiB 4.61 MiB
truapi-provider/truapi_provider_bg.wasm 4.00 MiB 1.27 MiB 953.6 KiB
trinity-stack/wasm/trinity_stack_bg.wasm 564.4 KiB 230.5 KiB 190.0 KiB

No file changed size.

Commit: 94a5573

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

CI Status: 24 required jobs green, 21 passed and 3 skipped by path filter.

All job results
job result
android-app success
android-bindings skipped
bundle-size success
changes success
changeset-guard success
cli-package success
codegen success
e2e skipped
explorer success
headless-install success
host-wasm success
ios-app success
ios-bindings success
licenses success
playground success
provider-android-bindings skipped
release-guard success
rust success
ts-client success
ts-debugger success
ts-host success
ts-trinity-stack success
wasm-provider success
workflow-lint success

Signing credentials: valid as of 2026-11-05

Commit 94a5573c · run log

@mordamax
mordamax marked this pull request as ready for review November 4, 2026 21:32
@mordamax
mordamax requested review from a team as code owners November 4, 2026 21:32
@github-actions github-actions Bot added the status:waiting-on-review Ready for a reviewer label Nov 4, 2026
@mordamax
mordamax requested a review from Mikelle November 5, 2026 12:27
@mordamax
mordamax added this pull request to the merge queue Nov 5, 2026
Merged via the queue into main with commit 73fef81 Nov 5, 2026
48 checks passed
@mordamax
mordamax deleted the feat/host-cli-stack branch November 5, 2026 16:34
Mikelle added a commit that referenced this pull request Nov 5, 2026
…ow-ups

main (#1885) already compares an override with the base endpoint by genesis
and URL (split_rerouted), so the branch's own reroute check and its test are
dropped for main's, and the changeset no longer claims it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL 1000 lines or more; split it, or say in the description why it cannot be status:waiting-on-review Ready for a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants