Skip to content

Conversation

@0xMavi
Copy link

@0xMavi 0xMavi commented Dec 22, 2025

Summary

  • Adds a transaction_index field to getTransaction and getSignaturesForAddress RPC responses
  • The index represents the transaction's 0-based position within the block's flattened transaction list
  • Enables clients to determine transaction ordering within a block without fetching the entire block

Changes

  • Added index: u32 field to ConfirmedTransactionWithStatusMeta and ConfirmedTransactionStatusWithSignature structs
  • Modified find_transaction_in_slot in blockstore to return (VersionedTransaction, u32) tuple
  • Updated find_address_signatures_for_slot to return index alongside slot and signature
  • Added transaction_index to RpcConfirmedTransactionStatusWithSignature and EncodedConfirmedTransactionWithStatusMeta response types
  • Updated BigTable storage layer to propagate index through transaction lookups
  • Updated CLI code to ignore new struct field

Testing

  • Updated existing unit tests in blockstore.rs to verify index values are correctly returned
  • Tests confirm index matches expected transaction position within entries

@mergify mergify bot requested a review from a team December 22, 2025 08:59
@0xMavi 0xMavi marked this pull request as ready for review December 22, 2025 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant