Skip to content

feat: add vote and propose redeemer purposes - #464

Merged
slowbackspace merged 2 commits into
masterfrom
feat/redeemer-vote-propose-purposes
Aug 20, 2026
Merged

feat: add vote and propose redeemer purposes#464
slowbackspace merged 2 commits into
masterfrom
feat/redeemer-vote-propose-purposes

Conversation

@slowbackspace

Copy link
Copy Markdown
Contributor

What

Adds the Conway governance purposes vote and propose to the redeemer purpose enums in the three response schemas that carry them: tx_content_redeemers (/txs/{hash}/redeemers), script_redeemers (/scripts/{script_hash}/redeemers), and mempool_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}/redeemers with purpose: "vote", and a parameter-change proposal tx (constitution guardrails execution) with purpose: "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

  • blockfrost-backend-ryo: no code change. The SQL selects r.purpose verbatim with no purpose filter, and the response types derive from this package — a dependency bump picks the widening up.
  • Related data issues observable in production, tracked separately from this schema fix: db-sync leaves redeemer.script_hash NULL for vote/propose rows, so /txs/{hash}/redeemers returns an empty script_hash for them and /scripts/{script_hash}/redeemers omits vote/propose executions entirely (the query matches on redeemer.script_hash).

🤖 Generated with Claude Code

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.
@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
openapi Ready Ready Preview Aug 20, 2026 3:49pm

Request Review

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.
@slowbackspace
slowbackspace requested a balanced review from Copilot August 20, 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.

Pull request overview

Updates redeemer schemas to reflect Conway governance purposes already returned by the API.

Changes:

  • Adds vote and propose to 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>
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.

2 participants