Skip to content

Conversation

serejke
Copy link
Contributor

@serejke serejke commented Oct 11, 2025

The simulateTransaction RPC endpoint was returning inner instructions in raw CompiledInstruction format instead of the parsed UiInstruction format expected by Web3.js clients. This caused deserialization errors when clients tried to process the response.

See for more details:
solana-foundation/solana-com#844

Changes:

  • Updated transform_tx_metadata_to_ui_accounts to accept transaction message and loaded addresses for proper account key resolution
  • Used parse_ui_inner_instructions to convert CompiledInstruction to UiInstruction format with account keys from both static accounts and ALTs
  • Updated get_simulate_transaction_result to pass message and loaded addresses
  • Ensured proper handling of Address Lookup Tables in v0 transactions

This matches the behavior of the official Solana validator and fixes compatibility with Web3.js TypeScript client.

…nsaction

The simulateTransaction RPC endpoint was returning inner instructions in raw
CompiledInstruction format instead of the parsed UiInstruction format expected
by Web3.js clients. This caused deserialization errors when clients tried to
process the response.

Changes:
- Updated transform_tx_metadata_to_ui_accounts to accept transaction message
  and loaded addresses for proper account key resolution
- Used parse_ui_inner_instructions to convert CompiledInstruction to
  UiInstruction format with account keys from both static accounts and ALTs
- Updated get_simulate_transaction_result to pass message and loaded addresses
- Ensured proper handling of Address Lookup Tables in v0 transactions

This matches the behavior of the official Solana validator and fixes
compatibility with Web3.js TypeScript client.
@lgalabru
Copy link
Member

Thanks for your contribution @serejke 🙏
Could you please run cargo +nightly fmt --all to please the CI?
Thanks!

Copy link
Member

@MicaiahReid MicaiahReid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @serejke!

Copy link
Member

@lgalabru lgalabru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @serejke !

@lgalabru lgalabru merged commit a76d264 into txtx:main Oct 16, 2025
3 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.

3 participants