Skip to content

fix(rpc): match ParsedTransactionMeta to TransactionMeta#409

Merged
HealthyBuilder merged 1 commit into
solana-foundation:mainfrom
sonicfromnewyoke:sonic/fix-parsed-tx-meta-parity
Apr 23, 2026
Merged

fix(rpc): match ParsedTransactionMeta to TransactionMeta#409
HealthyBuilder merged 1 commit into
solana-foundation:mainfrom
sonicfromnewyoke:sonic/fix-parsed-tx-meta-parity

Conversation

@sonicfromnewyoke
Copy link
Copy Markdown
Contributor

Problem

there are missing fields in ParsedTransactionMeta which present in TransactionMeta

Solution

match fileds of both structs

closes #284

Agave returns the same UiTransactionStatusMeta shape on the wire for
both binary and jsonParsed encodings — only the
innerInstructions[].instructions[] shape differs (compiled vs parsed,
via an untagged serde enum). Our Go split into TransactionMeta /
ParsedTransactionMeta dropped five trailing fields on the parsed side
when the type was originally written, so a jsonParsed tx silently
loses Status, Rewards, LoadedAddresses, ReturnData, and
ComputeUnitsConsumed on decode.

Mirror those five fields onto ParsedTransactionMeta. No new types
needed — LoadedAddresses / ReturnData / DeprecatedTransactionMetaStatus
already live in this file, and the remaining two are plain types.

Adds TestParsedTransactionMeta_Decode as a regression guard: a
realistic jsonParsed meta fixture with every previously-missing field
populated, asserting each round-trips cleanly.

Closes solana-foundation#284
@HealthyBuilder HealthyBuilder merged commit a0f95c2 into solana-foundation:main Apr 23, 2026
11 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.

rpc/types.go ParsedTransactionMeta and TransactionMeta

2 participants