Skip to content

Comments

feat(grpc): add GetTaddressTxidsPaginated RPC for paginated address queries#790

Open
devdotbo wants to merge 1 commit intozingolabs:devfrom
devdotbo:upstream-pr
Open

feat(grpc): add GetTaddressTxidsPaginated RPC for paginated address queries#790
devdotbo wants to merge 1 commit intozingolabs:devfrom
devdotbo:upstream-pr

Conversation

@devdotbo
Copy link

Fixes #789

Summary

Adds pagination support for transparent address transaction queries via a new GetTaddressTxidsPaginated gRPC endpoint.

Problem

The existing GetTaddressTxids RPC returns ALL transactions for an address, causing:

  • 84+ second load times for addresses with 10K+ transactions
  • Wasted bandwidth when only 20 transactions needed for a page
  • Poor UX in wallet applications and block explorers

Solution

New RPC with:

  • maxEntries - Limit number of results
  • reverse - Return newest first
  • totalCount - Total matching (first response only)
  • txid - Transaction ID included (no client computation needed)
  • blockHeight - For cursor-based pagination

Performance

Method Transactions Time
Paginated 20 0.19s
Original 10,543 84.5s

~450x faster for typical page loads.

Backward Compatibility

  • Original GetTaddressTxids unchanged
  • New RPC is opt-in for clients needing pagination

Real-world Usage

Already in production at:

Source: devdotbo/zcash-explorer

Testing

  • Integration tests for FetchService (zcashd + zebrad)
  • Integration tests for StateService (FetchService vs StateService comparison)
  • All tests pass

PR Checklist

  • The solution is tested
  • The PR name is suitable for the release notes

…ueries

Adds pagination support for transparent address transaction queries via a new
GetTaddressTxidsPaginated gRPC endpoint.

Features:
- maxEntries: Limit number of results returned
- reverse: Return newest transactions first
- totalCount: Total matching transactions (first response only)
- txid: Transaction ID included in response
- blockHeight: For cursor-based pagination

Performance: ~450x faster for typical page loads (0.19s vs 84.5s for 10K+ tx addresses)

Includes integration tests for both FetchService and StateService.
@devdotbo
Copy link
Author

👋

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.

feat: Add pagination support for GetTaddressTxids gRPC

1 participant