paritytech / paritytech/subxt

Add `CheckMetadataHash` extension

Open
#1,585 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
489
Forks
293
Avg merge
18h 35m
Merged PRs (30d)
3

Description

The new merkalized metadata stuff means that signers will be able to attach a hash of the metadata to the signer payload prior to signing. This ensures that the metadata that they are using to display a TX to the user matches the actual metadata on chain.

The PR for the substrate extension is here: https://github.com/paritytech/polkadot-sdk/pull/4274

The easy solution for now is just to pass None (0u8) to the extension to disable any metadata hash checking.

Since we have the full metadata, we should be able to do better and hash it on first load and pass this hash to the signed extension to be included in any signer payload. We could do this as a step 2, since we'll want to check that we are hashing it properly or whatever.

Contributor guide

No contributing guide indexed for this repository

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 the linked polkadot-sdk PR for the CheckMetadataHash signed extension and inspect how subxt currently builds signer payloads from loaded metadata. First determine how passing None (0u8) should be wired, then assess hashing the full metadata on first load. Done means the extension receives the intended value and its hashing behavior is validated against the substrate implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
blockchain
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.