IntersectMBO / cardano-cli

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

Remove check for drep metadata size #810

Closed CarlosLopezDeLara closed 2 weeks ago

CarlosLopezDeLara commented 2 weeks ago

Changelog

- description: |
   Remove check for drep metadata size
# uncomment types applicable to the change:
  type:
  # - feature        # introduces a new feature
  # - breaking       # the API has changed in a breaking way
  # - compatible     # the API has changed but is non-breaking
  # - optimisation   # measurable performance improvements
  - refactoring    # QoL changes
  # - bugfix         # fixes a defect
  # - test           # fixes/modifies tests
  # - maintenance    # not directly related to the code
  # - release        # related to a new release preparation
  # - documentation  # change in code docs, haddocks...

Context

Resolves: https://github.com/IntersectMBO/cardano-cli/issues/792 Depends on: https://github.com/IntersectMBO/cardano-api/pull/569 which is not on the tagged cardano-api-9.0.0.0 . Therefore this requires a new release of cardano-api.

How to trust this PR

The resulting hash matches the one on the test vector of CIP-119 AND matches the hash obtained with governance hash anchor-data AND matches the result of using blake2b directly:

$ ./dist-newstyle/build/x86_64-linux/ghc-8.10.7/cardano-cli-8.25.0.0/x/cardano-cli/build/cardano-cli/cardano-cli conway governance drep metadata-hash
 --drep-metadata-file tmp/drep.jsonld 
a14a5ad4f36bddc00f92ddb39fd9ac633c0fd43f8bfa57758f9163d10ef916de

$ ./dist-newstyle/build/x86_64-linux/ghc-8.10.7/cardano-cli-8.25.0.0/x/cardano-cli/build/cardano-cli/cardano-cli conway governance hash anchor-data --file-text tmp/drep.jsonld 
a14a5ad4f36bddc00f92ddb39fd9ac633c0fd43f8bfa57758f9163d10ef916de

$ b2sum -l 256 tmp/drep.jsonld 
a14a5ad4f36bddc00f92ddb39fd9ac633c0fd43f8bfa57758f9163d10ef916de  tmp/drep.jsonld

Checklist