Home / Blockfrost.io / blockfrost-backend-ryo
May 07, 7-8 PM (0)
May 07, 8-9 PM (0)
May 07, 9-10 PM (0)
May 07, 10-11 PM (0)
May 07, 11-12 AM (0)
May 08, 12-1 AM (0)
May 08, 1-2 AM (0)
May 08, 2-3 AM (0)
May 08, 3-4 AM (0)
May 08, 4-5 AM (0)
May 08, 5-6 AM (0)
May 08, 6-7 AM (0)
May 08, 7-8 AM (0)
May 08, 8-9 AM (0)
May 08, 9-10 AM (0)
May 08, 10-11 AM (0)
May 08, 11-12 PM (0)
May 08, 12-1 PM (0)
May 08, 1-2 PM (0)
May 08, 2-3 PM (0)
May 08, 3-4 PM (0)
May 08, 4-5 PM (0)
May 08, 5-6 PM (0)
May 08, 6-7 PM (0)
May 08, 7-8 PM (0)
May 08, 8-9 PM (0)
May 08, 9-10 PM (0)
May 08, 10-11 PM (0)
May 08, 11-12 AM (0)
May 09, 12-1 AM (0)
May 09, 1-2 AM (0)
May 09, 2-3 AM (0)
May 09, 3-4 AM (0)
May 09, 4-5 AM (0)
May 09, 5-6 AM (0)
May 09, 6-7 AM (0)
May 09, 7-8 AM (0)
May 09, 8-9 AM (0)
May 09, 9-10 AM (0)
May 09, 10-11 AM (0)
May 09, 11-12 PM (0)
May 09, 12-1 PM (0)
May 09, 1-2 PM (0)
May 09, 2-3 PM (0)
May 09, 3-4 PM (0)
May 09, 4-5 PM (0)
May 09, 5-6 PM (0)
May 09, 6-7 PM (0)
May 09, 7-8 PM (0)
May 09, 8-9 PM (0)
May 09, 9-10 PM (0)
May 09, 10-11 PM (0)
May 09, 11-12 AM (0)
May 10, 12-1 AM (0)
May 10, 1-2 AM (0)
May 10, 2-3 AM (0)
May 10, 3-4 AM (0)
May 10, 4-5 AM (0)
May 10, 5-6 AM (0)
May 10, 6-7 AM (0)
May 10, 7-8 AM (0)
May 10, 8-9 AM (0)
May 10, 9-10 AM (0)
May 10, 10-11 AM (0)
May 10, 11-12 PM (0)
May 10, 12-1 PM (0)
May 10, 1-2 PM (0)
May 10, 2-3 PM (0)
May 10, 3-4 PM (0)
May 10, 4-5 PM (0)
May 10, 5-6 PM (0)
May 10, 6-7 PM (0)
May 10, 7-8 PM (0)
May 10, 8-9 PM (0)
May 10, 9-10 PM (0)
May 10, 10-11 PM (0)
May 10, 11-12 AM (0)
May 11, 12-1 AM (0)
May 11, 1-2 AM (0)
May 11, 2-3 AM (0)
May 11, 3-4 AM (0)
May 11, 4-5 AM (0)
May 11, 5-6 AM (0)
May 11, 6-7 AM (0)
May 11, 7-8 AM (0)
May 11, 8-9 AM (0)
May 11, 9-10 AM (0)
May 11, 10-11 AM (0)
May 11, 11-12 PM (0)
May 11, 12-1 PM (2)
May 11, 1-2 PM (0)
May 11, 2-3 PM (0)
May 11, 3-4 PM (1)
May 11, 4-5 PM (4)
May 11, 5-6 PM (0)
May 11, 6-7 PM (0)
May 11, 7-8 PM (3)
May 11, 8-9 PM (0)
May 11, 9-10 PM (0)
May 11, 10-11 PM (0)
May 11, 11-12 AM (0)
May 12, 12-1 AM (0)
May 12, 1-2 AM (0)
May 12, 2-3 AM (0)
May 12, 3-4 AM (0)
May 12, 4-5 AM (0)
May 12, 5-6 AM (0)
May 12, 6-7 AM (0)
May 12, 7-8 AM (3)
May 12, 8-9 AM (1)
May 12, 9-10 AM (0)
May 12, 10-11 AM (0)
May 12, 11-12 PM (2)
May 12, 12-1 PM (0)
May 12, 1-2 PM (0)
May 12, 2-3 PM (0)
May 12, 3-4 PM (0)
May 12, 4-5 PM (0)
May 12, 5-6 PM (0)
May 12, 6-7 PM (0)
May 12, 7-8 PM (0)
May 12, 8-9 PM (0)
May 12, 9-10 PM (0)
May 12, 10-11 PM (0)
May 12, 11-12 AM (0)
May 13, 12-1 AM (0)
May 13, 1-2 AM (0)
May 13, 2-3 AM (0)
May 13, 3-4 AM (0)
May 13, 4-5 AM (0)
May 13, 5-6 AM (0)
May 13, 6-7 AM (0)
May 13, 7-8 AM (0)
May 13, 8-9 AM (0)
May 13, 9-10 AM (0)
May 13, 10-11 AM (0)
May 13, 11-12 PM (0)
May 13, 12-1 PM (0)
May 13, 1-2 PM (0)
May 13, 2-3 PM (0)
May 13, 3-4 PM (0)
May 13, 4-5 PM (0)
May 13, 5-6 PM (0)
May 13, 6-7 PM (0)
May 13, 7-8 PM (0)
May 13, 8-9 PM (0)
May 13, 9-10 PM (0)
May 13, 10-11 PM (0)
May 13, 11-12 AM (0)
May 14, 12-1 AM (0)
May 14, 1-2 AM (0)
May 14, 2-3 AM (0)
May 14, 3-4 AM (0)
May 14, 4-5 AM (0)
May 14, 5-6 AM (0)
May 14, 6-7 AM (0)
May 14, 7-8 AM (0)
May 14, 8-9 AM (0)
May 14, 9-10 AM (0)
May 14, 10-11 AM (0)
May 14, 11-12 PM (0)
May 14, 12-1 PM (0)
May 14, 1-2 PM (0)
May 14, 2-3 PM (1)
May 14, 3-4 PM (3)
May 14, 4-5 PM (3)
May 14, 5-6 PM (0)
May 14, 6-7 PM (0)
May 14, 7-8 PM (0)
23 commits this week May 07, 2026 - May 14, 2026
perf: push pagination before joins in drep-votes and delegations SQL
Wrap the driving-table filter + ORDER BY + LIMIT/OFFSET in a CTE so
Postgres materializes the page first, then joins to tx / block /
gov_action_proposal / pool_hash only for the page we return — not
for every matching row.

Two endpoints applied (paged + unpaged variants each):

  GET /governance/dreps/:drep_id/votes
    Original plan: seq-scan voting_procedure (25k rows on mainnet),
    hash-join to drep_hash → 130 rows for a busy DRep, 4 nested-loop
    joins fire on all 130, sort + top-N 100. ~65ms warm.
    New plan: filter voting_procedure to the drep's 130 rows, sort
    + limit to 100, then 3 nested-loop joins fire only on 100. ~30ms warm.
    Live end-to-end: ~140ms → ~50ms (~2.9x).

  GET /accounts/:stake_address/delegations
    Original plan: stake_address → delegation index scan returns 1282
    rows for a heavily-delegated account, 3 joins (tx + block + pool_hash)
    fire on all 1282, then sort + top-N 100. ~60ms warm SQL.
    New plan: filter + sort + limit delegations to 100 (via d.tx_id
    ordering directly from the delegation row), then 3 joins fire on
    100. ~2ms warm SQL. 27x speedup at the DB layer.

No response shape changes. Same fields, same ordering semantics, same
edge cases.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
perf: push pagination before joins in committee votes SQL
Wrap the voting_procedure filter + ORDER BY + LIMIT/OFFSET in a
`paged_votes` CTE so Postgres materializes the page first (via an
index scan on voting_procedure_pkey), then does the joins against
tx, block, gov_action_proposal, tx (proposal), and voting_anchor
only for the page we return — not for every CC vote on the chain.

Live end-to-end measurements (mainnet dev backend):

  /committee/votes?count=100             170ms → 50ms   (3.4x)
  /committee/votes?count=100&order=desc  190ms → 50ms   (3.8x)
  /committee/:cc_hot/votes?count=100     150ms → 50ms   (3.0x)
  /committee/:cc_cold/votes?count=100    145ms → 47ms   (3.1x)

EXPLAIN buffer reads dropped from ~12k to ~1.9k for count=100, which
also reduces cold-cache tail latency.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
fix: filter committee selection to enacted NewCommittee actions
db-sync inserts a committee row for every NewCommittee proposal,
not only enacted ones. The previous ORDER BY committee.id DESC LIMIT 1
returned the most recently proposed committee even when it had
expired or been dropped, surfacing the wrong gov_action_id on
/governance/committee.

Fix: LEFT JOIN to gov_action_proposal and keep only rows where the
proposal is enacted (or the genesis row, which has no proposal).
Order by enacted_epoch DESC with id as tiebreaker.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
feat: constitutional committee endpoints
Adds three endpoints for surfacing constitutional committee state and votes:

- GET /governance/committee — current committee snapshot with members,
  quorum, members count, and source NewCommittee gov action (genesis
  committee returns proposal fields as null and `is_genesis: true`).
- GET /governance/committee/votes — paged list of all CC votes ever cast.
- GET /governance/committee/:cc_id/votes — paged list of votes filtered
  by CIP-129 hot (cc_hot1...) or cold (cc_cold1...) credential.
  Cold queries aggregate across every hot key the cold has authorized.

Per-vote shape includes the voting anchor (metadata_url / metadata_hash),
governance_type, block height/time, and the voter's CIP-129 hot id.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
feat: constitutional committee endpoints
Adds three endpoints for surfacing constitutional committee state and votes:

- GET /governance/committee — current committee snapshot with members,
  quorum, members count, and source NewCommittee gov action (genesis
  committee returns proposal fields as null and `is_genesis: true`).
- GET /governance/committee/votes — paged list of all CC votes ever cast.
- GET /governance/committee/:cc_id/votes — paged list of votes filtered
  by CIP-129 hot (cc_hot1...) or cold (cc_cold1...) credential.
  Cold queries aggregate across every hot key the cold has authorized.

Per-vote shape includes the voting anchor (metadata_url / metadata_hash),
governance_type, block height/time, and the voter's CIP-129 hot id.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
feat: constitutional committee endpoints
Adds three endpoints for surfacing constitutional committee state and votes:

- GET /governance/committee — current committee snapshot with members,
  quorum, members count, and source NewCommittee gov action (genesis
  committee returns proposal fields as null and `is_genesis: true`).
- GET /governance/committee/votes — paged list of all CC votes ever cast.
- GET /governance/committee/:cc_id/votes — paged list of votes filtered
  by CIP-129 hot (cc_hot1...) or cold (cc_cold1...) credential.
  Cold queries aggregate across every hot key the cold has authorized.

Per-vote shape includes the voting anchor (metadata_url / metadata_hash),
governance_type, block height/time, and the voter's CIP-129 hot id.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
feat: constitutional committee endpoints
Adds three endpoints for surfacing constitutional committee state and votes:

- GET /governance/committee — current committee snapshot with members,
  quorum, members count, and source NewCommittee gov action (genesis
  committee returns proposal fields as null and `is_genesis: true`).
- GET /governance/committee/votes — paged list of all CC votes ever cast.
- GET /governance/committee/:cc_id/votes — paged list of votes filtered
  by CIP-129 hot (cc_hot1...) or cold (cc_cold1...) credential.
  Cold queries aggregate across every hot key the cold has authorized.

Per-vote shape includes the voting anchor (metadata_url / metadata_hash),
governance_type, block height/time, and the voter's CIP-129 hot id.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
feat: constitutional committee endpoints
Adds three endpoints for surfacing constitutional committee state and votes:

- GET /governance/committee — current committee snapshot with members,
  quorum, members count, and source NewCommittee gov action (genesis
  committee returns proposal fields as null and `is_genesis: true`).
- GET /governance/committee/votes — paged list of all CC votes ever cast.
- GET /governance/committee/:cc_id/votes — paged list of votes filtered
  by CIP-129 hot (cc_hot1...) or cold (cc_cold1...) credential.
  Cold queries aggregate across every hot key the cold has authorized.

Per-vote shape includes the voting anchor (metadata_url / metadata_hash),
governance_type, block height/time, and the voter's CIP-129 hot id.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
revert: drop top-level deposit field from /accounts/:addr and /dreps/:id
Keep deposit only on the per-event endpoints (/registrations and
/updates) where it semantically belongs. The top-level fields were
redundant — same number derivable from a single registrations/updates
row — and the "deposit paid at registration" framing differs from
Koios's "deposit currently locked" semantics, inviting confusion.

Reverts:
- accounts_stake_address.sql: drop the `deposit` column and the
  registration_state CTE; restore the inline MAX-tx_id comparison
  for the `registered` field.
- dreps_drep_id.sql: drop the `deposit` column.
- TS query types: drop `deposit` from Account and DRepsDrepID.
- Account fixtures: drop `deposit` from /accounts/:stake_address
  query/response fixtures (keeps it on the registrations fixtures).

Bumps @blockfrost/openapi to 0.1.88-beta.2 (drops `deposit` from
account_content and drep schemas).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
feat: constitutional committee endpoints
Adds three endpoints for surfacing constitutional committee state and votes:

- GET /governance/committee — current committee snapshot with members,
  quorum, members count, and source NewCommittee gov action (genesis
  committee returns proposal fields as null and `is_genesis: true`).
- GET /governance/committee/votes — paged list of all CC votes ever cast.
- GET /governance/committee/:cc_id/votes — paged list of votes filtered
  by CIP-129 hot (cc_hot1...) or cold (cc_cold1...) credential.
  Cold queries aggregate across every hot key the cold has authorized.

Per-vote shape includes the voting anchor (metadata_url / metadata_hash),
governance_type, block height/time, and the voter's CIP-129 hot id.

Depends on a forthcoming @blockfrost/openapi release that adds the
matching path + schema definitions.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
test: add deposit to account fixtures, dedupe registration-state subquery
- Fixtures: add `deposit` to /accounts/:stake_address response/query
  fixtures and per-row to /accounts/:stake_address/registrations
  (registered → string; deregistered → null) so route unit tests
  cover the new field per Copilot review.
- SQL: lift the `MAX(stake_registration.tx_id) > MAX(stake_deregistration.tx_id)`
  comparison into a `registration_state` CTE and reuse it from both
  the `registered` field and the deposit CASE. Eliminates a redundant
  pair of subqueries per request.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
feat: expose deposit on account and drep endpoints
Adds a `deposit` field to:
- /accounts/:stake_address
- /accounts/:stake_address/registrations (per row)
- /governance/dreps/:drep_id
- /governance/dreps/:drep_id/updates (per row)

For stake registrations, falls back to epoch_param.key_deposit at the
registration's epoch when stake_registration.deposit is NULL (rows
predating db-sync's deposit column).

Requires @blockfrost/openapi 0.1.88-beta.0 for the matching schema.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>