Skip to content

🐛 Metadata Validation Issues in Outcome and Live Voting #3184

@kneerose

Description

@kneerose

Context

1. Live Voting

  • According to the metadata error condition: Data Not Verifiable, if the hash does not match the hash of the metadata URL and the data format is incorrect, the validation API should return "Invalid hash".
  • However, in live voting, when governance action metadata validation fails due to an incorrect hash and governance action format, it incorrectly returns "Data formatted incorrectly" instead of "Data not verifiable".

2. Outcomes

  • As per the metadata error condition: Data Formatted Incorrectly, if the hash matches the metadata URL hash but the data format is invalid, it should return "Data formatted incorrectly" instead of valid metadata.
  • Example request:
    https://z8bd2599d-zfe84eb01-gtw.z937eb260.rustrocks.fr/governance-actions/metadata?url=https://metadata-govtool.cardanoapi.io/data/Lolita&hash=62a37df07103f0a69690c8975700e06b7c3c3069cb3d105abec00e820e831dda
    
    • Expected response: "Incorrect Format" with "metadataValid": false.
    • Actual response:
      {
        "metadataValid": true,
        "data": {
          "givenName": "Doyle",
          "image": {
            "@type": "ImageObject",
            "contentUrl": "https://avatars.githubusercontent.com/u/89786962",
            "sha256": "f689efaa4690e135f5a0a9d5349e37b853867d4e7ddb4cc6e4ca657d1c05d8ab"
          },
          "motivations": "Catena solum confugo delectatio. Spiculum perferendis deinde succedo ager laborum aetas solitudo ver.",
          "objectives": "Suspendo minus venio commemoro cuius placeat coepi. Coruscus magnam hic decerno accedo peior.",
          "paymentAddress": "addr_test1qr9sl8jvztc0qrafle0x2p52eu6ea2jslelsw6cmtyc8wwumejxff5phngxwtp8jc9sy2qnqmeupy4eedpsyf9akty2sue298u",
          "qualifications": "Cinis consectetur carbo thymbra curto ducimus. Tot volup turbo succurro beatae vulgaris vulpes.",
          "references": [
            {
              "@type": "Other",
              "label": "Label",
              "uri": "https://thunderous-fennel.info"
            }
          ]
        }
      }
    • This indicates that "Data formatted incorrectly" validation is missing in outcome metadata validation.

Additionally, there is an issue where the breadcrumb title remains stuck in a loading state and displays an empty title for incorrectly formatted governance actions.
Image

Actual Behavior

  • In live voting, metadata validation incorrectly returns "Data formatted incorrectly" instead of "Data not verifiable" when the metadata hash does not match the hash of the metadata URL.
  • The "Data formatted incorrectly" validation is missing in outcome metadata validation.

Expected Behavior

  • The system should implement proper metadata validation for both live voting and outcomes to ensure accurate error handling.

Allure Reports

Metadata

Metadata

Type

No type

Projects

Status

To do

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions