Skip to content

simulate_bundle rpc method does not return full result on transaction error #678

@OSadovy

Description

@OSadovy

Problem

When calling the simulate_bundle RPC method and one of transactions fails due to e.g. custom thrown error from an instruction, the result does not contain neither logs nor consumed compute units, and the error itself is returned only as string which makes it cumbersome to parse.

example result:

Response { context: RpcResponseContext { slot: 290184069, api_version: Some(RpcApiVersion(Version { major: 2, minor: 0, patch: 5 })) }, value: RpcSimulateBundleResult { summary: Failed { error: TransactionFailure(<REDACTED>, "Error processing Instruction 3: custom program error: 0x1772"), tx_signature: Some("<REDACTED>") }, transaction_results: [] } }

As you can see, only summary field is returned; the transaction_results is empty.

Proposed Solution

transaction_results should be returned; It has all the fields that standard solana simulate_transaction rpc method returns: logs, consumed compute units etc. This helps to debug failures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions