OpenZeppelin / polkadot-runtime-templates

Runtime Templates for Polkadot Parachains
GNU General Public License v3.0
60 stars 17 forks source link

🏗️ [Core Feature]: Implement CheckMetadataHash extension #209

Open NM2146 opened 3 months ago

NM2146 commented 3 months ago

templates

What is the key feature we're aiming to implement?

The metadata hash extension in the Polkadot runtime is a feature that ensures the runtime metadata's integrity. By implementing this, you can verify that the metadata remains unchanged, providing an additional layer of security and trust. It helps in detecting unauthorized modifications and ensures that the metadata used by clients and other tools matches the runtime’s actual metadata. This is particularly useful for maintaining consistency and reliability across different deployments and updates.

Contribution Guidelines

SBalaguer commented 3 months ago

To add to Nico's comment:

Why is this important?

It will allow every runtime developed by OZ and then used by the community to be compatible with the Polkadot Ledger App out of the box.

What things are needed to achieve this?

  1. Be compatible with at least Polkadot-SDK version 1.1.0.
  2. Be compatible with Metadata V15.
  3. Add the changes to the runtime as detailed on the guide shared by Nico.

I believe 1 and 2 are already done, and 3 should be quite trivial.

4meta5 commented 3 months ago

Be compatible with at least Polkadot-SDK version 1.1.0.

https://github.com/paritytech/polkadot-sdk/pull/4274 is not in polkadot-v1.10.0 so this feature will have to wait until we update to a release which includes it (and I also did not see it in the most recent release polkadot-v1.12.0).

Opened #211 which contains the required code changes, but it is blocked until we upgrade to requisite version.

bkchr commented 3 months ago

polkadot-v1.10.0 so this feature will

It is available in the release-polkadot-v1.10.0 branch.

4meta5 commented 3 months ago

Awesome, we will update our pinned commit on that branch to the one that includes it and start updating the other forks we maintain to the same pinned commit