IntersectMBO / cardano-cli

This repository contains sources for the command-line interface (CLI) tool for interacting with the Cardano blockchain.
Apache License 2.0
44 stars 15 forks source link

Governance metadata is not validated #906

Open saratomaz opened 2 months ago

saratomaz commented 2 months ago

Description

There is no metadata validation for the governance metadata. Right now is possible to submit a governance action with wrong metadata/missing required fields and the only time we can see an error is when dbsync try to catch the data.

Steps to Reproduce

e.g.

  1. run cardano-cli conway governance drep metadata-hash --drep-metadata-file drep_metadata.json drep_metadata.json -> missing givenName that is marked as Compulsory in cip-0119
  2. No error is returned

Additional Context

CIPs related to governance metadata: https://github.com/cardano-foundation/CIPs/tree/master/CIP-0100 https://github.com/cardano-foundation/CIPs/tree/master/CIP-0108 https://github.com/cardano-foundation/CIPs/tree/master/CIP-0119

kderme commented 2 months ago

In case cli plans to support this, we have implemented metadata parsers following the above cips https://github.com/IntersectMBO/cardano-db-sync/blob/master/cardano-db-sync/src/Cardano/DbSync/OffChain/Vote/Types.hs

gitmachtl commented 1 month ago

cardano-signer is doing checks if a metadata file is valid, also checks about the signatures.

github-actions[bot] commented 2 days ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.