Skip to content

fix(governance): return CC voters as CIP-129 cc_hot ids in proposal votes - #351

Merged
slowbackspace merged 1 commit into
masterfrom
fix/proposal-votes-cc-cip129
Sep 2, 2026
Merged

fix(governance): return CC voters as CIP-129 cc_hot ids in proposal votes#351
slowbackspace merged 1 commit into
masterfrom
fix/proposal-votes-cc-cip129

Conversation

@slowbackspace

Copy link
Copy Markdown
Contributor

Summary

For "voter_role": "constitutional_committee", the voter field of /governance/proposals/{tx_hash}/{cert_index}/votes (and the {gov_action_id} variant) returned the raw 28-byte hot credential hash in hex, with no way to tell a key hash from a script hash (blockfrost/openapi#465). DRep voters in the same response are already CIP-129 bech32 and SPO voters are pool bech32, so committee voters were the only ambiguous role.

Changes

  • Expose committee_hash.has_script from the paged and unpaged votes queries
  • Encode the committee voter as a CIP-129 hot credential (cc_hot1...) via the same getCommitteeCredentialId util the /governance/committee endpoints use (already covered by CIP-129 official test vectors in unit tests)

Why cc_hot and not cc_cold

Committee votes are always cast by the hot credential: Conway only admits HotCommitteeRole voters in VotingProcedures, and on mainnet every distinct voting_procedure.committee_voter matches a committee_registration.hot_key_id (13/13) while none match a cold key.

Verification

Output verified byte-for-byte against Koios voter_id for real mainnet CC votes (proposal 9b62b3c6...#0), e.g. 85c47dd4... (script) → cc_hot1qwzuglw5hx3wwr5gjewerhtfhcvz64s9kgam2fgtrj2t7eqs00fzv.

Spec counterpart: blockfrost/openapi#467

Fixes blockfrost/openapi#465

…otes

For voter_role constitutional_committee the voter field carried the raw
28-byte hot credential hash in hex, with no way to tell a key hash from
a script hash. DRep voters in the same response are already CIP-129
bech32 and SPO voters are pool bech32, so committee voters were the
only ambiguous role.

Expose committee_hash.has_script from the votes queries and encode the
committee voter as a CIP-129 hot credential (cc_hot1...) via the same
getCommitteeCredentialId util the /governance/committee endpoints use.
Committee votes are always cast by the hot credential: Conway only
admits HotCommitteeRole voters, and on mainnet every distinct
voting_procedure.committee_voter matches committee_registration
hot_key_id (13/13) and none match a cold key. Output verified
byte-for-byte against Koios voter_id for mainnet CC votes.

Fixes blockfrost/openapi#465
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.

GET /governance/proposals/{tx_hash}/{cert_index}/votes returns ambiguous credentials for CC

1 participant