Skip to main content
A trace is a partially ordered set of messages. This set includes all dependent messages. In other words, if message B was sent while message A was being processed, then both of these messages belong to exactly one trace. Strictly speaking, this set is partially ordered according to the causal relation “A is sent as a result of processing B.” When drawing a trace, messages are usually drawn on the edges, and the addresses of the accounts to which the messages are sent are drawn at the vertices. Transactions that occurred on the account at that moment in time are also usually signed at the vertex.

Start of the trace

Most often, a trace begins with an external message. It is the first one, since there is no message that could generate an external-in. However, trace may be started not only by external messages but also by tick-tock transactions, commonly used within TON Blockchain system contracts. Traces can also start with split and merge transactions, but since they are not currently implemented, this will not occur in a real network.
Trace diagramTrace diagram
As a result, messages in the trace are partially ordered by their logical time (lt), reflecting their logical dependencies. The diagram shows transactions on independent accounts, each triggered by an incoming message, with lt values indicated for every message. It is important to note that in the network in general, lt is formed as follows:
  • lt transactions = lt incoming message + 1
  • lt outgoing message = lt transaction + outgoing message index This scheme is not applicable to the first vertex if the trace is started by special transactions mentioned above, as in that case there is no incoming message for the first vertex.
Traces with logical timeTraces with logical time

Traces representation in Tonviewer

In Tonviewer, traces are visualized as directed acyclic graphs (DAGs), where transactions are nodes and messages are edges, showing the full sequence of account state changes.

Examples

The NFT transfer illustrates a single operation that consists of multiple messages. To learn how to read traces, follow this article. This trace is started with an external message and can be inspected in Tonviewer NFT transfer traceNFT transfer trace Here is the example of the trace that started with tick-tock transaction Trace initiated by tick-tock transactionTrace initiated by tick-tock transaction

Access using API

To fetch traces data, use the GET /traces endpoint. This method allows finding a trace if any of its parameters are known.