paritytech / paritytech/host-rust-core

The signing role has two unreconciled sources for the Asset Hub genesis hash

Open
#798 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
10
Forks
3
Avg merge
1d 10h
Merged PRs (30d)
148

Description

sso_responder::allocate_smart_contract_allowance resolves Asset Hub through features::genesis_for(supported_chains(), AssetHub), the chain the host says it serves. product_manifest::root_manifest resolves it from SigningHostConfig::asset_hub_chain_genesis_hash, the value the embedder configured. Nothing compares them.

A host whose two answers disagree resolves trustedProducts grants against one chain's dotNS registry while allocating PGAS on another. Whoever holds that product name on the other network's registry then decides who may read the victim product's storage.

The split is not accidental. #426 established the configured hash for dotNS reads when usernames moved to Asset Hub dotNS, and #391 established supported_chains() for PGAS because it submits against a chain the host must actually serve. Both conventions are defensible on their own. What is missing is any check that a given host's two values agree, and a decision on which is authoritative when they do not.

Pre-existing on main, independent of #729: pairing_host has 5 config-sourced reads and sso_responder 1 supported_chains read.

An earlier revision of #729 carried a startup warning on divergence. It was removed because it called host FFI code inside the runtime constructor, where a panic aborts the process under the shipping panic = "abort" profile, to emit a warn! that the UniFFI and wasm hosts drop at their default ERROR level. Any detection needs to sit somewhere that does not add a construction-time crash surface.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with sso_responder::allocate_smart_contract_allowance, product_manifest::root_manifest, and the SigningHostConfig::asset_hub_chain_genesis_hash and supported_chains() reads; compare how pairing_host uses its five config-sourced reads. Review #426, #391, and the earlier revision of #729 before deciding where divergence detection belongs. Done means the two genesis-hash sources cannot silently authorize different networks, without adding a construction-time crash or ineffective warning.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
authorization, backend-api-design, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.