Repository navigation
fix(aperture): omit empty inner instruction groups - #1837
erkancamli wants to merge 2 commits into
Conversation
The SVM records one inner instruction group per top-level instruction,
including an empty group when the instruction made no CPI. Aperture
copied every group into transaction metadata, so getTransaction,
getBlock, simulateTransaction with innerInstructions, and Geyser
plugins reported an entry like {"index":0,"instructions":[]} for each
instruction without CPIs.
Solana's map_inner_instructions drops these empty groups. Filter them
the same way so clients that treat a group as evidence of a CPI see the
same metadata as on Solana.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 45 minutes. View limit details
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
What changed
The SVM records one inner instruction group per top-level instruction and leaves the group empty when that instruction made no CPI.
group_inner_instructionscopied every group, so each instruction without CPIs showed up as{"index": N, "instructions": []}in:getTransactionandgetBlock(retained Engine metadata)simulateTransactionwithinnerInstructions: trueTransactionStatusMeta.inner_instructionspassed to Geyser pluginsSolana's
map_inner_instructions(solana-transaction-status) filters these empty groups, so a transaction with no CPIs hasinnerInstructions: []there. This change applies the same filter in the shared grouping helper, so both the retained and the live paths match.Impact
Response shape only. Clients and plugins that read a group's presence as "this instruction made CPIs" (the Geyser test fixture in this crate uses
!groups.is_empty()for exactly that) no longer get a false positive for every transaction. Group indexes are unchanged.Reviewer notes
The added unit test feeds
live_inner_instructionsthe SVM layout[[], [cpi, cpi], []]and expects only the group at index 1, plus no groups for a transaction without CPIs.