Skip to content

Commit 22b1862

Browse files
committed
traces
1 parent 0a299ba commit 22b1862

File tree

5 files changed

+108
-0
lines changed

5 files changed

+108
-0
lines changed

docs.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@
224224
"group": "RPC providers",
225225
"pages": [
226226
"ecosystem/rpc/overview",
227+
"ecosystem/rpc/traces",
227228
{
228229
"group": "TON Center",
229230
"pages": [

ecosystem/rpc/traces.mdx

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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+
![Trace](/resources/images/rpc/trace_def.svg)
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+
![Trace logical time](/resources/images/rpc/traces_lt.svg)
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+
![NFT transfer trace](/resources/images/rpc/nft_transfer_trace.png)
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+
156 KB
Loading

resources/images/rpc/trace_def.svg

Lines changed: 12 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)