feat: add vote and propose redeemer purposes - #464
Merged
Conversation
db-sync stores the Conway governance purposes since 13.2, and the API
already returns them: a script DRep vote tx answers /txs/{hash}/redeemers
with purpose "vote" and a parameter-change proposal tx with "propose"
(both HTTP 200 on mainnet today). The purpose enums predate Conway, so
the schema rejected values the backends emit.
Widen the enum in the three response schemas that carry it:
tx_content_redeemers, script_redeemers, and mempool_tx_content.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
slowbackspace
added a commit
to txpipe/dolos
that referenced
this pull request
Aug 20, 2026
One governance redeemer made /txs/{tx_hash}/redeemers return 500 and
hid every other row of the tx. Filter unsupported purposes out, the
same policy the scripts redeemers endpoint applies. Also guard the
fee computation against zero denominators, which panic BigRational.
Emission of vote and propose rows still waits on blockfrost/openapi#464.
Contributor
There was a problem hiding this comment.
Pull request overview
Updates redeemer schemas to reflect Conway governance purposes already returned by the API.
Changes:
- Adds
voteandproposeto three redeemer-purpose enums. - Regenerates OpenAPI documents, TypeScript types, and schema snapshots.
- Documents the schema correction in the changelog.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/schemas/txs/tx_content_redeemers.yaml |
Expands transaction redeemer purposes. |
src/schemas/scripts/script_redeemers.yaml |
Expands script redeemer purposes. |
src/schemas/mempool/mempool_tx_content.yaml |
Expands mempool redeemer purposes. |
src/generated-types.ts |
Updates generated TypeScript unions. |
openapi.yaml |
Updates generated YAML specification. |
openapi.json |
Updates generated JSON specification. |
docs/blockfrost-openapi.yaml |
Updates documentation specification. |
blockfrost-openapi.yaml |
Updates bundled specification. |
test/tests/__snapshots__/get-schema-for-endpoint.test.ts.snap |
Updates endpoint-schema snapshots. |
CHANGELOG.md |
Records the enum expansion. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
What
Adds the Conway governance purposes
voteandproposeto the redeemerpurposeenums in the three response schemas that carry them:tx_content_redeemers(/txs/{hash}/redeemers),script_redeemers(/scripts/{script_hash}/redeemers), andmempool_tx_content(/mempool/{hash}).Why
db-sync stores these purposes since Conway, and the API already returns them. Verified on mainnet: a script-DRep vote tx answers
/txs/{hash}/redeemerswithpurpose: "vote", and a parameter-change proposal tx (constitution guardrails execution) withpurpose: "propose"— both HTTP 200 in production today. The enums predate Conway, so the schema rejects values the backends emit. This change codifies existing behavior; it enables nothing new.Includes the CHANGELOG entry, regenerated artifacts (
yarn build), and the updated endpoint-schema snapshot. All tests pass.Downstream
r.purposeverbatim with no purpose filter, and the response types derive from this package — a dependency bump picks the widening up.redeemer.script_hashNULL for vote/propose rows, so/txs/{hash}/redeemersreturns an emptyscript_hashfor them and/scripts/{script_hash}/redeemersomits vote/propose executions entirely (the query matches onredeemer.script_hash).🤖 Generated with Claude Code