fix: F-2026-18817 | read SVM gateway events from emit_cpi inner instructions - #357
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The gateway moved to
emit_cpi, so events are inner instructions, notProgram data:logs. Our listener only read logs, so it saw nothing. Confirmed on the dummy gateway: a real finalize has zeroProgram data:lines.What changed
tx.Meta.InnerInstructions, keep only instructions the gateway itself ran, strip Anchor's 8-byteEVENT_IX_TAG. The remaining bytes are what the old log line carried, so the parsers are unchanged.gas_usedper event type: 112 finalize, 112 rescue, 144 revert. It was 80 for all three, which lands insidewrapper_address. Matches develop.gatewayEmittedLogs,logsTruncated,invokedProgram,isProgramExit. Attribution is now the inner instruction's program id, so the log-stack parsing is dead.Three properties, each verified
__event_authorityPDA to sign, and only the gateway can sign for it. Stronger than the log stack it replaces (F-2026-18198).Tests
Program data:line, event extracted,GasFeeUsed5260057. In itgas_fee - gas_used == gas_to_refund, so the offsets check themselves.