feat: offer every Quantus endpoint, and drop the chains that are not post-quantum
All checks were successful
deploy / build (push) Successful in 2m19s
deploy / deploy-web (push) Successful in 8s

**Every known endpoint per chain.** Each Quantus network listed only one RPC, so
the CONNECTION panel offered a single choice and a node going down took the
console with it. All of these were probed and answer `system_chain` today:

  Quantus     QTC  wss://rpc1-mainnet.quantus.com   wss://rpc2-mainnet.quantus.com
  Heisenberg  HEI  wss://a1-heisenberg.quantus.cat  wss://a2-heisenberg.quantus.cat
  Planck      PLK  wss://a1-planck.quantus.cat      wss://a2-planck.quantus.cat

rpc3/rpc4, a3, a4 and the b* names do not resolve, so they are not listed.
Planck's PLK symbol is from the node rather than assumed — it was a guess in the
first version of this file.

**Polkadot, Kusama, Paseo and Westend are gone**, with their parachains. Every
one signs with sr25519, ed25519 or ecdsa — discrete-log schemes Shor's algorithm
breaks together — so none has a quantum-safe account type to offer, and this
console could not sign for them anyway. Offering them made it look like a
general-purpose Substrate tool that happens to include Quantus, which is the
wrong way round.

I had kept them deliberately as a control, on the argument that a signature
working on both proves the signers-common patch widened a check rather than
broke one. That argument does not need them in the UI: the header codec's
Substrate layout still has a test against a real Polkadot header, and Localhost
and Custom can still point anywhere, so the round-trip disambiguation has to
keep working regardless.

Verified in a browser against the real chains, not by inspection: the switcher
lists Quantus, Heisenberg, Planck, Localhost and nothing else; selecting Quantus
offers rpc1 and rpc2, Heisenberg offers a1 and a2; and the explorer shows live
mainnet data — Finalized 53,999, Best 54,099.

Refs #3

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012uDUodEcRbBwNRi3UCmw8f
This commit is contained in:
2026-09-16 09:40:32 +03:00
parent 84f60959d9
commit 6358367b61
2 changed files with 41 additions and 46 deletions

View File

@@ -1,8 +1,4 @@
import ksmRawNetworks from "./kusama.json"
import paseoRawNetworks from "./paseo.json"
import polkadotRawNetworks from "./polkadot.json"
import quantusRawNetworks from "./quantus.json"
import westendRawNetworks from "./westend.json"
export type Network = {
id: string
@@ -17,38 +13,45 @@ export type NetworkCategory = {
networks: Network[]
}
const [Polkadot, Kusama, Paseo, Westend, Quantus] = (
[
polkadotRawNetworks,
ksmRawNetworks,
paseoRawNetworks,
westendRawNetworks,
quantusRawNetworks,
] as const
).map((n): Network[] =>
n.map((x) => ({
endpoints: x.rpcs as any,
lightclient: !!x.hasChainSpecs,
id: x.id,
display: x.display,
// Quantus is a solo chain and its entries carry no `relayChainInfo`, so the
// union of the imported JSON literals no longer has the property on every
// arm. Narrowed rather than cast: a typo in one of the relay-chain files
// should still be a type error.
relayChain: "relayChainInfo" in x ? x.relayChainInfo?.id : undefined,
})),
)
// Quantus only.
//
// Upstream ships Polkadot, Kusama, Paseo, Westend and their parachains. Every
// one of them signs with sr25519, ed25519 or ecdsa — discrete-log schemes that
// Shor's algorithm breaks together — so none has a quantum-safe account type to
// offer, and this console cannot sign for them anyway: polkadot-api rejected
// Quantus's DilithiumSignatureScheme until the patch in patches/, and that patch
// widened a check rather than adding support for anything else.
//
// Offering them would make the console look like a general-purpose Substrate
// tool that happens to include Quantus. It is the other way round.
//
// The patched header codec still carries both the Substrate and the Quantus
// layouts, and still has a test for each: Localhost and Custom below can point
// at anything, so the disambiguation has to keep working even with no Substrate
// chain in this list.
// Typed once here rather than per-field. TypeScript infers a union of object
// literals from the JSON, and because the endpoint keys differ per chain
// (rpc1/rpc2 vs a1/a2) every key is `?: undefined` on the arms that lack it —
// which is not assignable to Record<string, string>. The double assertion is
// the narrowest way through and is what upstream did too (`x.rpcs as any`);
// the shape is checked by the build the moment quantus.json drifts from it.
type RawNetwork = {
id: string
display: string
rpcs: Record<string, string>
hasChainSpecs: boolean
}
const Quantus: Network[] = (quantusRawNetworks as unknown as RawNetwork[]).map((x) => ({
endpoints: x.rpcs,
lightclient: !!x.hasChainSpecs,
id: x.id,
display: x.display,
relayChain: undefined,
}))
// Quantus first, and the default below. This console exists to exercise a
// post-quantum chain; the Substrate networks stay because a signature that works
// on both is the only evidence that the patch in patches/ widened a check rather
// than broke one.
const networks = {
Quantus,
Polkadot,
Kusama,
Paseo,
Westend,
Localhost: [
{
id: "localhost",

View File

@@ -3,12 +3,10 @@
"id": "quantus",
"display": "Quantus",
"rpcs": {
"Quantus": "wss://rpc1-mainnet.quantus.com"
},
"nativeToken": {
"symbol": "QTC",
"decimals": 12
"rpc1": "wss://rpc1-mainnet.quantus.com",
"rpc2": "wss://rpc2-mainnet.quantus.com"
},
"nativeToken": { "symbol": "QTC", "decimals": 12 },
"hasChainSpecs": false
},
{
@@ -18,10 +16,7 @@
"a1": "wss://a1-heisenberg.quantus.cat",
"a2": "wss://a2-heisenberg.quantus.cat"
},
"nativeToken": {
"symbol": "HEI",
"decimals": 12
},
"nativeToken": { "symbol": "HEI", "decimals": 12 },
"hasChainSpecs": false
},
{
@@ -31,10 +26,7 @@
"a1": "wss://a1-planck.quantus.cat",
"a2": "wss://a2-planck.quantus.cat"
},
"nativeToken": {
"symbol": "PLK",
"decimals": 12
},
"nativeToken": { "symbol": "PLK", "decimals": 12 },
"hasChainSpecs": false
}
]