Skip to main content

Fetch & Sign Metadata

Fetch metadata & chain spec

make updater

This will fetch metadata & chain spec from the network and generate unsigned QR codes for them.

The output of the command should be similar to this:

[2023-05-29T07:27:27Z INFO ] ⚙️  Generating unsigned_node-template_specs.png...
[2023-05-29T07:27:27Z INFO ] ⚙️ Generating unsigned_node-template_metadata_100.apng...

Sign metadata & chain spec using Portal CLI and Polkadot Vault

To start to signing process, run the following command:

make signer
  1. Select unsigned_node-template_specs from the menu.
✔ Choose file to sign · unsigned_node-template_specs.png
  1. Scan the QR code using your Polkadot Vault (PV) mobile app.
Screenshot
  1. Approve the unsigned spec.
Screenshot
  1. Go to the Key Sets menu and create a new key set you want to use for signing.
Screenshot
  1. In PV, go to Settings -> Networks -> Node-Template -> ... and select Sign Network Specs.
Screenshot
  1. Select the key set you want to use for signing, and you'll get a QR code with a signature
Screenshot
  1. Scan the signature QR code using your computer and will generate a signed network QR.
✔ Ready to scan signature QR? · yes
⚙ generating /Users/pavel/Projects/tutorial-portal/public/qr/node-template_specs.png...
🎉 Signed!
  1. Next, select unsigned_node-template_metadata_100 from the menu.
✔ Choose file to sign · unsigned_node-template_metadata_100.apng
  1. Scan the QR code using your Polkadot Vault (PV) mobile app and approve the unsigned metadata.
Screenshot
  1. In PV, go to Settings -> Networks -> Node-Template -> and select Sign this metadata.
Screenshot
  1. Select the key set you want to use for signing, and you'll get a QR code with a signature
Screenshot
  1. Scan the signature QR code using your computer and will generate a signed metadata QR.
✔ Ready to scan signature QR? · yes
⚙ generating /Users/pavel/Projects/tutorial-portal/public/qr/node-template_metadata_100.png...
🎉 Signed!

Perfect! Now you have signed metadata & chain spec 🎉

Optional steps

Clean up unused files

Call RPC node to determine what metadata is currently running, so old one can be marked to removal.

make collector

Remove all unused files from the public/qr folder.

make cleaner

Configure verifier key for Metadata Portal

Metadata portal has a verify command, which allows to verify that signature of signed QR match the verifier. We haven't configured verifier key yet, so let's do it now.

make verifier

This should throw an error, because we haven't configured verifier key yet.

[2023-05-29T12:49:21Z ERROR] failed to verify node-template_metadata_100.apng: public key mismatch! Expected '', got <hex_key>

Put your verifier key in the config.toml file.

[verifier]
name = "Tutorial"
public_key = "<hex_key>"

Run Metadata Portal

You can run Metadata Portal locally and see how it looks for your chain:

# Install dependencies
yarn
# Run dev server
yarn start

Metadata Portal

grillchat icon