Skip to content

perf(blockfrost): parallelize UTxO script hydration#261

Merged
wolf31o2 merged 1 commit into
masterfrom
codex-audit-blockfrost-hydration
Jul 23, 2026
Merged

perf(blockfrost): parallelize UTxO script hydration#261
wolf31o2 merged 1 commit into
masterfrom
codex-audit-blockfrost-hydration

Conversation

@wolf31o2

Copy link
Copy Markdown
Collaborator

Summary

  • coalesce duplicate reference-script fetches within each UTxOs call
  • hydrate UTxO pages with up to eight concurrent workers while preserving response order
  • retain contextual UTxO failures and add HTTP coverage for deduplication, concurrency, ordering, and error context

Tests

  • go test -race ./backend/blockfrost
  • go test -count=1 -race ./backend/...

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

This PR improves the performance of the Blockfrost backend’s Utxos fetch path by parallelizing per-UTxO hydration while coalescing duplicate reference-script lookups within a single Utxos call, and adds HTTP tests to validate deduplication, concurrency, ordering, and error context.

Changes:

  • Parallelize UTxO hydration with a bounded worker pool while preserving response order.
  • Add an in-call reference script resolver to deduplicate reference-script fetches (case-insensitive hash keying).
  • Add/expand HTTP tests covering deduplication, concurrency limit + ordering, and contextual error messages.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
backend/blockfrost/blockfrost.go Adds bounded concurrent hydration for UTxO pages plus a per-call script-ref deduper used by Utxos.
backend/blockfrost/blockfrost_test.go Adds HTTP tests for reference-script deduplication, concurrency + ordering guarantees, and error-context propagation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread backend/blockfrost/blockfrost_test.go
@wolf31o2
wolf31o2 force-pushed the codex-audit-blockfrost-hydration branch from a54d5f7 to 00154b5 Compare July 21, 2026 22:42
@wolf31o2
wolf31o2 merged commit b5d56d2 into master Jul 23, 2026
5 checks passed
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.

3 participants