-
Notifications
You must be signed in to change notification settings - Fork 0
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
Draft
aigerimu
wants to merge
7
commits into
main
Choose a base branch
from
trace
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+64
−0
Draft
traces #603
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)](/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. | ||
|
||
<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](https://companyname-a7d5b98e.mintlify.app/ton/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). | ||
</Aside> | ||
|
||
## Using traces in Tonviewer | ||
|
||
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. | ||
|
||
### Tracing operations | ||
|
||
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_. | ||
|
||
**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). | ||
|
||
<Image | ||
src="/resources/images/rpc/nft_transfer_trace_light.png" | ||
darkSrc="/resources/images/rpc/nft_transfer_trace_dark.png" | ||
alt="NFT transfer trace" | ||
/> | ||
|
||
## High-level access using API | ||
|
||
To fetch transaction data, use the high-level [`GET /traces`](/api-reference/actions/get-traces) endpoint. | ||
This method allows you to retrieve all related transactions for a given operation, without parsing individual transactions. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Nice example, but there should be a link to a documentation page about tick-tock.
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.
https://companyname-a7d5b98e.mintlify.app/ton/tblkch#4-2-4-kinds-of-transactions
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.
thank you