|
| 1 | +--- |
| 2 | +title: "Traces" |
| 3 | +--- |
| 4 | + |
| 5 | +import { Aside } from "/snippets/aside.jsx"; |
| 6 | + |
| 7 | +A trace is a set of messages and transactions produced by a single external message. |
| 8 | + |
| 9 | +Each _i-th_ transaction in the trace is triggered by a message sent during the action phase of some earlier _j-th_ transaction, where _j < i_. |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | +All messages and transactions in the trace are ordered by their [logical time (lt)](/ton/tblkch#1-4-1-logical-time), reflecting their logical dependencies. The diagram shows transactions on independent accounts, each triggered by an incoming message, with `lt` values indicated for every message. |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | +<Aside type={"note"}> |
| 18 | + Transactions may be triggered not only by external messages but also by tick-tock events, commonly used within internal TON blockchain contracts, such as governance or elector contracts. |
| 19 | +</Aside> |
| 20 | + |
| 21 | + |
| 22 | +## Using traces in Tonviewer |
| 23 | + |
| 24 | +In [Tonviewer](https://tonviewer.com/), traces are visualized as **directed acyclic graphs (DAGs)**, where _transactions are nodes_ and _messages are edges_, showing the full sequence of account state changes triggered by a single external message. |
| 25 | + |
| 26 | +### Tracing operations |
| 27 | + |
| 28 | +Traces offer **a high-level** view of an operation, illustrating how multiple transactions and messages interact to produce the final result. Within the graph, related transactions are grouped into human-readable actions, _providing developers with both the low-level transaction flow and the corresponding higher-level operations_. |
| 29 | + |
| 30 | +**Example** |
| 31 | + |
| 32 | +The NFT transfer illustrates a single operation that consists of **three transactions**, each triggered by messages. To learn how to read traces, follow [this article](/ecosystem/explorers/tonviewer#steps-to-analyze-an-operation). |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | +## High-level access using API |
| 38 | + |
| 39 | +To fetch transaction data, use the high-level [`GET /traces`](/api-reference/actions/get-traces) endpoint. |
| 40 | +This method allows you to retrieve all related transactions for a given operation, without parsing individual transactions. |
| 41 | + |
0 commit comments