feat(governance): add counted flag to proposal votes - #468
Open
slowbackspace wants to merge 2 commits into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
force-pushed
the
feat/proposal-votes-counted
branch
from
September 1, 2026 15:43
00517e1 to
edadb3a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/governance/proposals/{tx_hash}/{cert_index}/votesreturns 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/governanceProposalsin Ogmios) — see #466.Adds a required boolean
countedto each vote entry. Full semantics (implemented in the backend):trueonly 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
countedrather thanactivebecauseactivealready 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