Skip to content

feat(cli): add the polkadot mainnet network preset - #1456

Open
decrypto21 wants to merge 6 commits into
mainfrom
nidish/474-mainnet-preset
Open

decrypto21 wants to merge 6 commits into
mainfrom
nidish/474-mainnet-preset

Conversation

@decrypto21

@decrypto21 decrypto21 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Adds --network polkadot for Polkadot mainnet: Polkadot People, Bulletin and Asset Hub, with dotNS under .dot. Refs #474.

Endpoints.

  • People: wss://polkadot-people-rpc.polkadot.io
  • Bulletin: wss://bulletin-rpc.polkadot.io
  • Asset Hub: wss://polkadot-asset-hub-rpc.polkadot.io

@parity/dotns-cli 1.0.0 uses the same endpoints (paritytech/dotns-sdk#335). The ignored live test checks that each endpoint reports the advertised genesis hash and a chain name that matches its role.

dotNS. The Polkadot deployment manifest from paritytech/dotns#340 is vendored byte-for-byte as deployments/polkadot-420420419.json. The preset reads DotnsPopController out of it at compile time, so the manifest is the only copy of the address. Its 20 addresses match the v1.0.0-pcf.1 release table.

On chain:

  • ProtocolRegistry.tld() returns .dot;
  • NetworkSuffix is dot on Asset Hub and on People;
  • the registry's component addresses match the manifest.

Discovery reads DotnsGateway.DispatcherAddress first. While Polkadot Asset Hub leaves it unset, the CLI's own Asset Hub reads use the manifest's controller instead. Referendum 1955 sets the dispatcher to that same controller.

Real identities. A preset without disposable_identities:

  • signs only with --mnemonic / HOST_CLI_SIGNER_MNEMONIC, and never writes the plaintext account store;
  • refuses automatic approval (dev, --auto-accept, /approval automatic);
  • refuses --product-config, whose seeded grants are never prompted for and persist in the core database.

paseo-next-v2 and previewnet set disposable_identities, so they keep their stored accounts and automatic approval. every_disposable_preset_routes_to_a_test_network holds every such preset to test-network hosts.

Identity backend. The preset ships without one. On polkadot the backend is only used by the username-creation flows, which the preset refuses, so nothing in it needs one today. A command that does need one names HOST_CLI_IDENTITY_BACKEND_BASE. The production URL is tracked on #474, pending confirmation from PCF.

Not covered. The in-core username lookup has no controller fallback, so serving hosts resolve usernames on polkadot once referendum 1955 sets the dispatcher. No mainnet usernames can be registered before then.

E2E script. cross-product-ringvrf-e2e.ts reads the People genesis from chain.getChainInfo, so it runs on whichever preset the host serves. @parity/truapi does not export a fixed People genesis to import.

Testing.

  • cargo test for truapi and truapi-host-cli; workspace clippy -D warnings on the pinned nightly; make fmt-check.
  • Mutation checks: each of the four guards, and the manifest reader, fails its test or the build when broken.
  • Live on Polkadot mainnet: identity-check, alloc-check and pgas-check read mainnet correctly; signing-host refuses a missing mnemonic, --auto-accept and --product-config, and with --mnemonic writes no account store.

@decrypto21
decrypto21 requested a review from a team October 15, 2026 23:57
@github-actions github-actions Bot added the rust Pull requests that update rust code label Oct 15, 2026
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

CI Status: 24 required jobs green, 17 passed and 7 skipped by path filter.

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

Signing credentials: failure as of 2026-10-15, a release may fail

Commit 8db6a1a9 · run log

@github-actions

Copy link
Copy Markdown
Contributor

Bundle size report

Compared with main at fde9aea.

Raw Gzip Brotli
truapi-host 7.89 MiB 5.66 MiB 5.39 MiB
truapi-provider 4.03 MiB 1.27 MiB 960.9 KiB
truapi 6.30 MiB 891.5 KiB 730.0 KiB
Total 18.23 MiB 7.81 MiB 7.04 MiB

WebAssembly modules

Raw Gzip Brotli
truapi-host/wasm/web/truapi_server_bg.wasm 2.78 MiB 993.7 KiB 748.1 KiB
truapi-host/wasm/web/truapi_verifiable_bg.wasm 4.89 MiB 4.64 MiB 4.61 MiB
truapi-provider/truapi_provider_bg.wasm 3.99 MiB 1.26 MiB 953.1 KiB

No file changed size.

Commit: 8db6a1a

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rust Pull requests that update rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant