Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make drep query parser accept zero or more keys #348

Merged
merged 1 commit into from
Oct 10, 2023
Merged

Conversation

carlhammann
Copy link
Contributor

Changelog

- description: |
    The `cardano-cli conway governance query drep-state` and `... drep-stake-distribution` now accept zero or more DRep verification keys, making the help messages correct.
# 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
  # - improvement    # QoL changes e.g. refactoring
  - 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

This will close #346 .

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • The change log section in the PR description has been filled in
  • New tests are added if needed and existing tests are updated. These may include:
    • golden tests
    • property tests
    • round trip tests
    • integration tests
      See Running tests for more details
  • The version bounds in .cabal files are updated
  • CI passes. See note on CI. The following CI checks are required:
    • Code is linted with hlint. See .github/workflows/check-hlint.yml to get the hlint version
    • Code is formatted with stylish-haskell. See .github/workflows/stylish-haskell.yml to get the stylish-haskell version
    • Code builds on Linux, MacOS and Windows for ghc-8.10.7 and ghc-9.2.7
  • The changelog section in the PR is updated to describe the change
  • Self-reviewed the diff

@CarlosLopezDeLara
Copy link
Contributor

Beautiful!

cardano-cli conway governance query drep-state --testnet-magic 4 
[
  [
    {
      "keyHash": "037ca7363e8c9c7b3391bee7c45eb3222c5a600ddf8e268b0057b3a6"
    },
    {
      "anchor": null,
      "deposit": 0,
      "expiry": 109
    }
  ],
  [
    {
      "keyHash": "058b60ead63f667c0ff5b40e269dd1f05ce3a804256735ad4eddce20"
    },
    {
      "anchor": null,
      "deposit": 0,
      "expiry": 109
    }
  ],
  [
    {
      "keyHash": "20d832cb15463cc7ccfd40e9658c7398148594f81026591968acb4ce"
    },
    {
      "anchor": null,
      "deposit": 0,
      "expiry": 112
    }
  ],
  [
    {
      "keyHash": "24a26a091058744472c20178bda9fcf811a5a31824cf0c49a976329f"
    },
    {
      "anchor": null,
      "deposit": 0,
      "expiry": 106
    }
  ],
  [
    {
      "keyHash": "27ac1c7b513e95c3c952a37b46e94216caee6eca050cd00c914e7194"
    },
    {
      "anchor": null,
      "deposit": 0,
      "expiry": 109
    }
  ],
  [
    {
      "keyHash": "33eb0023afe70a59e8c352be620a63d003bed0339a5a3c0c1646854f"
    },
    {
      "anchor": null,
      "deposit": 0,
      "expiry": 105
    }
  ],
  [
    {
      "keyHash": "3b5c380f7830a35cda74f0969c3490221c2e548b31872772e00c17b1"
    },
    {
      "anchor": null,
      "deposit": 0,
      "expiry": 106
    }
  ],
  [
    {
      "keyHash": "4e4dba8ccb384ef1f1682b6aefc21d2557699f0c0695d98331900503"
    },
    {
      "anchor": null,
      "deposit": 0,
      "expiry": 106
    }
  ],
  [
    {
      "keyHash": "766df390f4cc2065c5e28ff175d9fc26cefd23124e8070f0e101dd1c"
    },
    {
      "anchor": null,
      "deposit": 0,
      "expiry": 109
    }
  ],
  [
    {
      "keyHash": "83c733e900f1a5ea5879c977c9ee2138abacf5a3b81c0ac8d86d6f0a"
    },
    {
      "anchor": null,
      "deposit": 0,
      "expiry": 112
    }
  ],
  [
    {
      "keyHash": "87c1de0f0c1028ae3c8ce482889f17f651a0c2f3b71a63029b05f0f0"
    },
    {
      "anchor": null,
      "deposit": 0,
      "expiry": 106
    }
  ],
  [
    {
      "keyHash": "946f3a739c7fd618795e8d0e896708ed4dc00ed15be6a8b091ac8e40"
    },
    {
      "anchor": null,
      "deposit": 0,
      "expiry": 106
    }
  ],
  [
    {
      "keyHash": "97a993b0c8166aa8c48345be19257a4025ab764c86e799beab15b303"
    },
    {
      "anchor": null,
      "deposit": 0,
      "expiry": 105
    }
  ],
  [
    {
      "keyHash": "97a993b0c8166aa8c48345be19257a4025ab764c86e799beab15b304"
    },
    {
      "anchor": null,
      "deposit": 0,
      "expiry": 105
    }
  ],
  [
    {
      "keyHash": "9ca61f53d9ab4a652a4c7b9d5b8e21d0409a5aa04ca0eea282eb5b0e"
    },
    {
      "anchor": null,
      "deposit": 0,
      "expiry": 113
    }
  ],
  [
    {
      "keyHash": "9f7e0f20f3c644556abcc4263cfe05bfe1bd122da77465eb392f62eb"
    },
    {
      "anchor": null,
      "deposit": 0,
      "expiry": 108
    }
  ],
  [
    {
      "keyHash": "a6fb0cc0a14dd67d87c22beecea780019de9dc2be1ed24992bc7c706"
    },
    {
      "anchor": null,
      "deposit": 0,
      "expiry": 109
    }
  ],
  [
    {
      "keyHash": "b2a7f53b1cae7709ea715473bc0e68321bf70407fb7010349e8689dd"
    },
    {
      "anchor": null,
      "deposit": 0,
      "expiry": 116
    }
  ],
  [
    {
      "keyHash": "b8580007d8e9b230dc71b161ca15b4d866060cd20b841b6b736033e4"
    },
    {
      "anchor": null,
      "deposit": 0,
      "expiry": 106
    }
  ],
  [
    {
      "keyHash": "bbff55056ad81f6a0d1fb134db09c8cc1ac09de25f2c864f01b80877"
    },
    {
      "anchor": null,
      "deposit": 0,
      "expiry": 109
    }
  ],
  [
    {
      "keyHash": "c4151afe9b5f4395dfa131f002fa760f55e324f50dc7cbd13a900ddf"
    },
    {
      "anchor": null,
      "deposit": 0,
      "expiry": 113
    }
  ],
  [
    {
      "keyHash": "c9ff3121d65e945699cb6041ffef13bedd6726eecfdf138e5795e4a1"
    },
    {
      "anchor": null,
      "deposit": 0,
      "expiry": 108
    }
  ],
  [
    {
      "keyHash": "cda7cbb5057ab5cab63c4b19866c39abda9908750640e245710646ee"
    },
    {
      "anchor": null,
      "deposit": 0,
      "expiry": 107
    }
  ],
  [
    {
      "keyHash": "e4dafd31d35ce543d4442238efe31cc38a2f03fecc1e6bad9ffd7b1c"
    },
    {
      "anchor": null,
      "deposit": 0,
      "expiry": 109
    }
  ],
  [
    {
      "keyHash": "e6181717c26e227812db49b14b9114220e313ccc31459c4675d61a34"
    },
    {
      "anchor": null,
      "deposit": 0,
      "expiry": 106
    }
  ],
  [
    {
      "keyHash": "ec961dd3848d8c6531403145a8a4324d0be60438fe51232c6c087e27"
    },
    {
      "anchor": null,
      "deposit": 0,
      "expiry": 104
    }
  ],
  [
    {
      "keyHash": "edddffe8c66db8bd598ec63733531c07fb4d08909ff1b881b42d7f0d"
    },
    {
      "anchor": null,
      "deposit": 0,
      "expiry": 106
    }
  ]
]

@CarlosLopezDeLara
Copy link
Contributor

Also for drep-stake-distribution

cardano-cli conway governance query drep-stake-distribution --testnet-magic 4
[
    [
        {
            "contents": "058b60ead63f667c0ff5b40e269dd1f05ce3a804256735ad4eddce20",
            "tag": "DRepKeyHash"
        },
        9996965370
    ],
    [
        {
            "contents": "766df390f4cc2065c5e28ff175d9fc26cefd23124e8070f0e101dd1c",
            "tag": "DRepKeyHash"
        },
        9997483389
    ],
    [
        {
            "contents": "87c1de0f0c1028ae3c8ce482889f17f651a0c2f3b71a63029b05f0f0",
            "tag": "DRepKeyHash"
        },
        9997483389
    ],
    [
        {
            "contents": "946f3a739c7fd618795e8d0e896708ed4dc00ed15be6a8b091ac8e40",
            "tag": "DRepKeyHash"
        },
        9997656062
    ],
    [
        {
            "contents": "9ca61f53d9ab4a652a4c7b9d5b8e21d0409a5aa04ca0eea282eb5b0e",
            "tag": "DRepKeyHash"
        },
        4997484709
    ],
    [
        {
            "contents": "c9ff3121d65e945699cb6041ffef13bedd6726eecfdf138e5795e4a1",
            "tag": "DRepKeyHash"
        },
        9996256814
    ],
    [
        {
            "contents": "e4dafd31d35ce543d4442238efe31cc38a2f03fecc1e6bad9ffd7b1c",
            "tag": "DRepKeyHash"
        },
        9997310716
    ]
]

@carlhammann carlhammann enabled auto-merge October 10, 2023 09:25
@carlhammann carlhammann added this pull request to the merge queue Oct 10, 2023
Merged via the queue into main with commit 0a3e990 Oct 10, 2023
19 checks passed
@carlhammann carlhammann deleted the ch/many-drep-keys branch October 10, 2023 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

drep-state is making --drep-verification mandatory
2 participants