Skip to content

fix(host-cli): advertise the People genesis the chain reports - #416

Open
TarikGul wants to merge 2 commits into
mainfrom
tg/paseo-people-genesis
Open

fix(host-cli): advertise the People genesis the chain reports#416
TarikGul wants to merge 2 commits into
mainfrom
tg/paseo-people-genesis

Conversation

@TarikGul

Copy link
Copy Markdown
Member

paseo-next-v2's People chain reports 89a63b11…; the preset carried c5af1826…. The preset, its routing entry, PASEO_NEXT_V2_INDIVIDUALITY and SPEC.md now carry the value the chain reports.

The drift had no routing symptom, which is why it survived. url_for answers an unrecognised genesis with people_ws, so both hashes reached the People chain. Products are where it landed: get_chain_info hands back the advertised hash and
PASEO_NEXT_V2_INDIVIDUALITY exports it, so a product building a People-chain transaction signed CheckGenesis over a genesis that chain does not have. The host's own allowance extrinsics read the hash from the chain via fetch_genesis_hash and were never exposed to it.

Coverage

served_chain_genesis_hashes_match_the_endpoint_routes pins the two constants against each other, and both were wrong the same way. Its replacement, the_advertised_genesis_matches_what_each_chain_reports, asks each endpoint for its own genesis. It collects every mismatch rather than stopping at the first, since a wipe drifts more than one role, and asserts how many roles it checked, because --ignored runs it without the test that holds the served set non-empty.

Both genesis tests resolve a role through NetworkConfig::url_for_role, matched exhaustively so a new ChainIdentifier stops compiling rather than reaching a None that only a test run notices.

ring-vrf-smoke.ts imports the constant the way ring-vrf-e2e.ts already does, leaving four hand-maintained definitions of the People genesis, two of them test-pinned. Its listRingVrfKeys predicate compared derivationIndex.tag against "Left", and DerivationIndex is Index | Raw, so the comparison was always false and the script always threw. It passes for the first time here.

Verification

Live against paseo through the CLI: the new test matches all three served roles and fails when the stale hash is restored, battery.sh --signing-host runs the ring-VRF registry e2e green, ring-vrf-smoke.ts reports RING_VRF_OK, and
smart-contract-allowance-smoke.ts reports Allocated.

The preset carried `c5af1826...` for paseo-next-v2's People chain; the chain
reports `89a63b11...`. Both hashes reached the People chain anyway, because
`url_for` answers an unrecognised genesis with `people_ws`, so the drift had no
routing symptom. What it did reach was products: `get_chain_info` handed back the
stale hash and `PASEO_NEXT_V2_INDIVIDUALITY` exported it, so a product building a
People-chain transaction signed `CheckGenesis` over a genesis that chain does not
have. The host's own allowance extrinsics were never affected — those read the
hash from the chain via `fetch_genesis_hash`.

Refreshes the preset, its routing entry, `well-known-chains.ts` and SPEC.md, and
drops the fifth copy by importing the constant into `ring-vrf-smoke.ts` the way
`ring-vrf-e2e.ts` already does.

`served_chain_genesis_hashes_match_the_endpoint_routes` could not catch this: it
pins the two constants against each other and both were wrong the same way, as
its own doc comment conceded. `the_advertised_genesis_matches_what_each_chain_reports`
asks each endpoint for its genesis instead, collecting every mismatch and
asserting the checked count so `--ignored` cannot pass on an empty served set.
Both genesis tests now resolve the role through `url_for_role`, matched
exhaustively so a new `ChainIdentifier` stops compiling rather than surfacing as
a panic in an ignored test.

Also fixes the `listRingVrfKeys` predicate in `ring-vrf-smoke.ts`, which compared
`derivationIndex.tag` against `"Left"`. `DerivationIndex` is `Index | Raw`, so the
comparison was always false and the script always threw.
@TarikGul
TarikGul requested a review from a team August 15, 2026 00:24
@replghost

Copy link
Copy Markdown
Contributor

The same live check currently shows an Asset Hub mismatch that this branch does not yet correct:

  • wss://paseo-asset-hub-next-rpc.polkadot.iochain_getBlockHash(0) = 0x23e730eb1c6fecae09c917439a5038cb6122d0d48980e8b9bbf0ff56f94a2ca6
  • PASEO_NEXT_V2_CHAIN_ENDPOINTS still advertises 0xbf0488dbe9daa1de1c08c5f743e26fdc2a4ecd74cf87dd1b4b1eeb99ae4ef19f

brevity-dozer origin/dev and dotli-community origin/main both use 23e730eb…; both also use the 89a63b11… People genesis fixed here. Epoca's vendored environment matches those live endpoint values. UAK's current paseo-next-v2.json carries bf0488db… / c5af1826…, so copying that bundle into a host would reproduce both mismatches.

@TarikGul

Copy link
Copy Markdown
Member Author

The same live check currently shows an Asset Hub mismatch that this branch does not yet correct:

  • wss://paseo-asset-hub-next-rpc.polkadot.iochain_getBlockHash(0) = 0x23e730eb1c6fecae09c917439a5038cb6122d0d48980e8b9bbf0ff56f94a2ca6
  • PASEO_NEXT_V2_CHAIN_ENDPOINTS still advertises 0xbf0488dbe9daa1de1c08c5f743e26fdc2a4ecd74cf87dd1b4b1eeb99ae4ef19f

brevity-dozer origin/dev and dotli-community origin/main both use 23e730eb…; both also use the 89a63b11… People genesis fixed here. Epoca's vendored environment matches those live endpoint values. UAK's current paseo-next-v2.json carries bf0488db… / c5af1826…, so copying that bundle into a host would reproduce both mismatches.

Assethub should have been corrected in #391.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants