Skip to content

feat(governance): add counted flag to proposal votes - #468

Open
slowbackspace wants to merge 2 commits into
masterfrom
feat/proposal-votes-counted
Open

feat(governance): add counted flag to proposal votes#468
slowbackspace wants to merge 2 commits into
masterfrom
feat/proposal-votes-counted

Conversation

@slowbackspace

@slowbackspace slowbackspace commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Summary

/governance/proposals/{tx_hash}/{cert_index}/votes returns every vote-cast transaction ever submitted for a proposal, but the ledger keeps only the latest vote per voter (upsert semantics) and drops a DRep's votes on deregistration while the proposal is live, so the response can diverge significantly from the current ledger vote state (queryLedgerState/governanceProposals in Ogmios) — see #466.

Adds a required boolean counted to each vote entry. Full semantics (implemented in the backend): true only for the voter's latest vote on the proposal, and for DRep voters only when no deregistration follows the vote while the proposal is still live — the tally freezes once the proposal is ratified/enacted/dropped/expired, and re-registering does not restore dropped votes. Not modeled: CC hot credential re-authorizations/resignations, SPO retirements.

Named counted rather than active because active already means registered/not-expired for DReps elsewhere in the API.

Also bumps the version to 0.1.93 — release ships with this PR.

Backend counterpart: blockfrost/blockfrost-backend-ryo#352 (validated on mainnet db-sync). Fixtures: blockfrost/blockfrost-tests#113.

Fixes #466

@vercel

vercel Bot commented Sep 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
openapi Ready Ready Preview Sep 1, 2026 3:45pm UTC

Request Review

The votes endpoints return every vote ever cast for a proposal, but the
ledger keeps only the latest vote per voter and drops a DRep's votes on
deregistration while the proposal is live, so results can diverge from
the ledger's vote state (queryLedgerState/governanceProposals in
Ogmios). Add a required boolean counted to each vote entry of
/governance/proposals/{tx_hash}/{cert_index}/votes.

Named counted rather than active because active already means
registered/not-expired for DReps elsewhere in the API.

Fixes #466
@slowbackspace
slowbackspace force-pushed the feat/proposal-votes-counted branch from 00517e1 to edadb3a Compare September 1, 2026 15:43

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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 should indicate whether each vote is currently counted

2 participants