Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CheckMetadataHash extension #1585

Open
jsdw opened this issue May 16, 2024 · 2 comments
Open

Add CheckMetadataHash extension #1585

jsdw opened this issue May 16, 2024 · 2 comments

Comments

@jsdw
Copy link
Collaborator

jsdw commented May 16, 2024

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: paritytech/polkadot-sdk#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.

@bkchr
Copy link
Member

bkchr commented May 16, 2024

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.

You can just use my crate to do the hashing for you.

@jsdw
Copy link
Collaborator Author

jsdw commented Jul 24, 2024

Basic work done in #1590 but will leave this open as a reminder to think about adding the full hash to txs via the merkleized-metadata crate

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

No branches or pull requests

2 participants