Transactions

Simulate a single transaction on top of a chain tip

Simulate a single transaction in an ephemeral block built on top of the given chain tip, or the canonical chain tip if the tip query parameter is omitted (no data is written in the MARF), and return its result, events, and execution cost. The simulation runs with the full tenure execution budget, independent of the cost already consumed in the current tenure. The transaction must be fully signed and valid (correct nonce, sufficient balance for the fee). The simulation enforces the same per-transaction wall-clock and memory limits the signers apply during block proposal validation (the connection_options.block_proposal_max_tx_execution_time_secs, block_proposal_max_tx_analysis_time_secs, and block_proposal_max_tx_mem_bytes options), so a transaction which exceeds them fails to simulate.

A tip naming a block that does not exist returns 404. A tip naming a block that exists but cannot be simulated by this endpoint (for example an epoch-2.x block) returns 400.

post/v3/transactions/simulate

Parameters

./components/parameters/tip.yaml — unresolved $ref

Request body

transaction_hexstring required

SIP-005-encoded transaction in hex format

Response

Result of the simulated transaction

txidstring

The transaction ID

tip_block_idstring

The block ID of the chain tip the transaction was simulated on top of

consensus_hashstring

Consensus hash of the tenure the simulated block would extend

block_heightinteger

Height of the ephemeral block the transaction was simulated in

result_hexstring

Clarity value returned by the transaction, encoded as a 0x-prefixed hex string

stx_burnedinteger

Amount of microSTX burned

execution_costExecutionCost — unresolved $ref
execution_limitExecutionCost — unresolved $ref
eventsobject[]

Events generated by the transaction

post_condition_abortedboolean

Whether the transaction was aborted by a post-condition

vm_errorstring nullable

VM error, if any

Changes

Changed in 1 of the 53 revisions of this API.1