-
Notifications
You must be signed in to change notification settings - Fork 7
traces #603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
traces #603
Changes from all commits
22b1862
af0ce79
f0d9b1b
390e8f0
260057b
59f008e
d76cb68
05fc2ef
546e32e
82d820a
9585f04
eed2f0e
0fd5d1e
999c62a
ced5312
62da60e
180587c
c3e7ec8
dd778ee
2eb8b2d
73b3ce1
e7d9330
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,59 @@ | ||||||
| --- | ||||||
| title: "Traces" | ||||||
| --- | ||||||
|
|
||||||
| import { Aside } from "/snippets/aside.jsx"; | ||||||
| import { Image } from '/snippets/image.jsx'; | ||||||
|
|
||||||
| A trace is a set of messages and transactions produced by a single external message. | ||||||
|
|
||||||
| 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_. | ||||||
|
|
||||||
| <div | ||||||
| className="flex justify-center my-4" | ||||||
| > | ||||||
| <Image | ||||||
| src="/resources/images/rpc/trace_def_light.svg" | ||||||
| darkSrc="/resources/images/rpc/trace_def_dark.svg" | ||||||
| alt="Trace diagram" | ||||||
| /> | ||||||
| </div> | ||||||
|
|
||||||
| All messages and transactions in the trace are ordered by their [logical time (lt)](/foundations/whitepapers/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. | ||||||
|
|
||||||
| <Image | ||||||
| src="/resources/images/rpc/traces_lt_light.svg" | ||||||
| darkSrc="/resources/images/rpc/traces_lt_dark.svg" | ||||||
| alt="Traces with logical time" | ||||||
| /> | ||||||
|
|
||||||
| <Aside | ||||||
| type={"note"} | ||||||
| > | ||||||
| Transactions may be triggered not only by external messages but also by [tick-tock](/foundations/whitepapers/tblkch#4-2-4-kinds-of-transactions) events, commonly used within internal TON Blockchain contracts, such as governance or elector contracts. | ||||||
|
|
||||||
| **Example:** [Tick-tock initiated trace](https://tonviewer.com/transaction/c386d3f7cc797aeb4d126a17da9055e47e79a1bce73262e8d665d94636f97bdc). | ||||||
verytactical marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
| </Aside> | ||||||
|
|
||||||
| ## Using traces in Tonviewer | ||||||
|
|
||||||
| In [Tonviewer](https://tonviewer.com/), traces are visualized as [directed acyclic graphs (DAGs)](https://en.wikipedia.org/wiki/Directed_acyclic_graph), where _transactions are nodes_ and _messages are edges_, showing the full sequence of account state changes triggered by a single external message. | ||||||
|
|
||||||
| ### Tracing operations | ||||||
|
|
||||||
| Traces show the execution flow of an operation, such as a Jetton or NFT transfer, illustrating how transactions and messages connect to produce the final result. Each trace is an automatically generated tree of related transactions derived from message propagation. | ||||||
|
|
||||||
| **Example** | ||||||
|
|
||||||
| 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). | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [HIGH] Broken internal anchor to Tonviewer sectionThe in-doc link points to
Suggested change
Please leave a reaction 👍/👎 to this suggestion to improve future reviews for everyone!
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why "three transactions" is so important that reader's attention has to be attracted during the skimming of the article text? |
||||||
|
|
||||||
| <Image | ||||||
| src="/resources/images/rpc/nft_transfer_trace_light.png" | ||||||
| darkSrc="/resources/images/rpc/nft_transfer_trace_dark.png" | ||||||
| alt="NFT transfer trace" | ||||||
| /> | ||||||
|
|
||||||
| ## Access using API | ||||||
|
|
||||||
| To fetch transaction data, use the [`GET /traces`](/ecosystem/api/toncenter/v3/actions-and-traces/list-actions-by-filters-tx-msg-trace) endpoint. | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [HIGH] API endpoint label/link mismatch misleads readersThe text label says “GET /traces” but links to the Actions reference page, which defines
Suggested change
Please leave a reaction 👍/👎 to this suggestion to improve future reviews for everyone! |
||||||
| This method returns all transactions related to a given operation without requiring individual parsing. | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They're ordered by which messages sent which. Logical time is not used directly to order the trace.