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

feat: add support for metadata hash checks #835

Merged
merged 2 commits into from
Jan 6, 2025
Merged

Conversation

ntn-x2
Copy link
Member

@ntn-x2 ntn-x2 commented Dec 19, 2024

We introduce a new feature for peregrine and spiritnet runtimes, which adds the metadata hash signed extension, for wallets that need it.

The Gitlab build pipeline has also been updated to include the new feature only when building the production WASMs.

How to test

Change any integration tests in the SDK based on this PR (KILTprotocol/sdk-js#924), and verify the metadata is verified (e.g., by enabling logs via a Chopsticks deployment).

@ntn-x2 ntn-x2 requested a review from Ad96el December 19, 2024 14:06
@ntn-x2 ntn-x2 requested a review from Dudleyneedham December 19, 2024 14:09
@ntn-x2
Copy link
Member Author

ntn-x2 commented Dec 20, 2024

Ccing @rflechtner here cause it might be interesting for him as well.

@ntn-x2
Copy link
Member Author

ntn-x2 commented Dec 20, 2024

There's a unit test by Frequency that manually computes the metadata hash and includes it in the SignedExtra: https://github.com/frequency-chain/frequency/blob/main/e2e/signed-extensions/checkMetadataHash.test.ts.

Copy link
Member

@Ad96el Ad96el left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice changes. Does this require some updates on the client side? Or is the metadata hash already present in the signed extra of the tx the nodes are currently ignoring them?

runtimes/spiritnet/build.rs Outdated Show resolved Hide resolved
@Ad96el
Copy link
Member

Ad96el commented Jan 6, 2025

According to the documentation, the tx fmt is defined in the metadata. So there is no extra step to take for us, I think.

@ntn-x2 ntn-x2 merged commit 3bc40a7 into develop Jan 6, 2025
14 of 15 checks passed
@ntn-x2 ntn-x2 deleted the aa/metadata-check branch January 6, 2025 10:31
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