diff --git a/ecosystem/explorers/tonviewer.mdx b/ecosystem/explorers/tonviewer.mdx index 7e0feb2a..1bd51370 100644 --- a/ecosystem/explorers/tonviewer.mdx +++ b/ecosystem/explorers/tonviewer.mdx @@ -69,7 +69,7 @@ At point **A** (`mintmachine.ton`), an external-in message initiates the operati 2. **Identify accounts** -- A — sender's wallet contract (`mintmachine.ton`). +- A — sender's wallet contract (mintmachine.ton). - B — jetton wallet contract governed by the jetton master. 3. **Inspect messages** @@ -126,7 +126,7 @@ The trace begins at point **A** (the user’s `mintmachine.ton` contract). An ex 2. **Identify accounts** -- A — user's `mintmachine.ton` account, sending the initial funds. +- A — user's mintmachine.ton account, sending the initial funds. - B — user's jetton wallet. - C — DEX jetton wallet. - D — DEX smart contract executing the swap. @@ -188,3 +188,13 @@ All transactions along the trace completed their phases without error, no warnin 5. **Find the failure point** No failure point — the operation completed successfully. + +## Debugging with retracer + +Sometimes, reading messages and transaction phases is not enough. +A transaction may show _successful compute and action phases, exit codes of `0`, and no errors in messages_ — yet still produce no effect on-chain. + +In such cases, you need to trace the **TVM execution path**. +[Retracer](https://retracer.ton.org/) lets you replay the transaction and inspect what happened inside the virtual machine. + +See [Debugging with TVM Retracer](/guides/debug#debugging-with-tvm-retracer) for details. diff --git a/guides/debug.mdx b/guides/debug.mdx index eee9aa2a..d2c849d1 100644 --- a/guides/debug.mdx +++ b/guides/debug.mdx @@ -129,11 +129,19 @@ However, the slice has only **725** bits, and **711** bits were already read, as You should locate the `load_uint(64)` call that causes the issue and ensure enough bits are available or adjust the read width. - +**TVM log limits** + +The size of TVM debug output depends on the verbosity level: + +| Level | Setting | Max size | +| ----- | :----------------------------------------------------------------------------: | :-------------------: | +| 0 | `none` | 256 bytes _(default)_ | +| 1–4 | `vm_logs`
`vm_logs_location`
`vm_logs_gas`
`vm_logs_full` | 1 MB | +| 5 + | `vm_logs_verbose` and above | 32 MB | + +When the output exceeds its limit, it is truncated **from the bottom** — +older entries are discarded, and only the most recent lines are kept. +Logs are **not rotated**. ## Explore the transaction tree @@ -154,3 +162,23 @@ Two tools are commonly used: - [TxTracer Sandbox](https://txtracer.ton.org/sandbox/) — requires a custom `@ton/sandbox` package; runs in your browser. Also, these tools allow you to explore each transaction's separate logs. + +## Debugging with TVM Retracer + +Even when a contract executes successfully (exit code = `0`) with no errors, its actions may not produce the expected on-chain effect. [TVM Retracer](https://retracer.ton.org/) lets you replay the transaction and inspect VM-level execution. + +### Scenarios for retracing + +- All transaction phases complete without errors, yet the expected outcome is missing. +- An action is skipped, or a transfer does not reach its destination. +- You need a step-by-step view of how the TVM executed your contract logic. + +### How to analyze a transaction + +1. Obtain the transaction hash from a [blockchain explorer](/ecosystem/explorers/overview). +1. Open [TVM Retracer](https://retracer.ton.org/) and enter the transaction hash. +1. Review the execution: + +- Inspect **Logs section** for executed instructions and exceptions. +- Examine **Actions cell (C5)** to review data passed between contracts. +- Check **message modes** — some modes can suppress errors, causing actions to be skipped. diff --git a/resources/dictionaries/custom.txt b/resources/dictionaries/custom.txt index f0ffb28f..903fee23 100644 --- a/resources/dictionaries/custom.txt +++ b/resources/dictionaries/custom.txt @@ -1,36 +1,331 @@ # ! is a prefix that forbids a word. # * is a prefix/suffix that tells the spell checker that a word can be combined with another word. # + is a prefix/suffix that tells the spell checker that a word MUST be combined with another word to be valid. -# ~ is a prefix that tells the spell checker to only use the word when case sensitivity is turned off. # Custom dictionaries support a few special characters: -abelian +# ~ is a prefix that tells the spell checker to only use the word when case sensitivity is turned off. ABI ABIs -accountchain +ADNL +API +APIs Accountchain +Aigerim +Aiogram +Alefman +Alibaba +Altcoin +Andrey +Avacoin +Axios +Baranov +Basechain +Binance +Birman +Bitmask +Bitshares +Blockchain +Blockscout +BoC +BoCs +Booleans +Bounceable +Brodie +Brujn +Buildx +Burnosov +Buterin +CCITT +CEX +CEXes +CEXs +CLion +CMake +CPUs +CTA +CTAs +Callables +Catchain +Catchains +Catchcain +Certik +Chainbase +Ciphertexts +Circom +Coalus +Codepage +Codepages +Codepoint +Codespaces +Codium +Coinbase +Combinator +Combinators +Configs +Configurator +Coq +Crosschain +Crowdin +Cryptobot +Cryptocurrencies +Cryptosystem +Cryptosystems +DApp +DApps +DEX +DEXes +DEXs +DHT +DHTs +DYOR +Daniil +Datagram +Decompiled +Decompiler +Deduplication +Dehasher +Deployer +Diffie +Dockerize +Dockerized +Dodis +Duif +Durov +EOA +EOAs +EVAA +EVM +EVMs +Emelyanenko +Endian +Enums +Eruda +Ethena +Ethereum +Ethers +Etherscan +Everscale +FTs +Fift +Figma +Flappy +Frontmatter +GTon +Ganache +Gb +Gbps +Gigadrop +Gigatons +Gilmanova +Gitpod +Goldschlag +Golev +Grafana +Gunicorn +Hackathon +Hashmap +Hashmaps +Hasse +Hetzner +Highload +Homotopy +IPFS +Imedashvili +Inclusivity +Initializer +Interchain +Jetbrains +Jettons +Kademlia +Kelmer +Keyblock +Keyblocks +Kiayas +Kol +Kolya +Lamport +Lange +Larimer +Latinisms +Leaderboard +Liskov +Liteclient +Litecoin +Liteserver +Liteservers +Lottie +Luby +Luhn +Lynis +MTProto +MTon +Mainnet +Masterchain +Maymounkov +Memoizing +Mempool +Merkle +Metafile +Metaverse +Micropayments +Microtransaction +Minimalistic +Mintlify +Monero +Multicasting +Multichain +Multiplatform +Mytonctrl +NFTs +NOPs +NVMe +Nakamoto +Namespace +Namespaces +Navbar +Neovim +Nginx +Niels +Nikolay +Notcoin +Nowarp +Nullability +Nullable +Nullables +OCaml +Offchaining +Oleg +Ona +Onchain +Onda +PDFs +PRNG +PRNGs +Pavel +Pease +Permissionless +Peyton +Phaser +Pitaya +Pragmas +Precompiled +Preloads +Prolog +Prometheus +Pseudocode +Pushgateway +Pyth +Qodo +RLDP +RPCs +Ratelance +Redistributable +Reindex +Reindexes +Reindexing +Relatedly +Reputational +Reth +Retracer +Revm +Ristretto +Rollup +SBTs +SCCCG +SDKs +SECD +SELinux +STON.fi +SVM +Scannability +Schnorr +Sedov +Serializable +Sharding +Shokrollahi +Shostak +Singlechain +Snarkjs +Solana +Soulbound +Spellbook +Stablecoin +Stablecoins +Syverson +TEPs +TMAs +TVM +TVMs +Tal +Tanenbaum +Tanja +Tblkch +Tencent +Testnet +Tezos +Tock +Tokenomics +Tolk +Toncenter +Toncoin +Toncoins +Toncx +Tonhub +Tonkeeper +Tonkey +Tonlib +Tonstarter +Tonviewer +Tradoor +UIs +URIs +USDe +USDt +Uint +Uiua +Unary +Underload +Uninit +Universa +Upgradability +VMs +VPNs +VSCodium +Vadim +Validator +Validators +Viem +Volkov +Vultr +Wagmi +Walkthrough +Walletconnect +Watchlist +Webserver +Weil +XMPL +XORing +Xia +Yolo +Yu +Yung +ZK-proof +Zellic +abelian +accountchain accountchains addon adnl -ADNL -Aigerim -Aiogram akifoq -Alefman algorithm -Alibaba allowlist allowlists altcoin -Altcoin altcoins -Andrey antecessor antecessors anycast aor api -API -APIs arith arity asin @@ -38,153 +333,90 @@ asm asms asynchrony autogenerates -Avacoin axios -Axios -Baranov basechain -Basechain bb befor bene -Binance birational birationally -Birman bitcode bitmask -Bitmask -Bitshares bitstring bitstrings bitwise blazingly blockchain -Blockchain blockchains blockquote blockquotes -Blockscout boc -BoC -BoCs booleans -Booleans bounceability bounceable -Bounceable -Brodie browseability -Brujn buildx -Buildx bundler -Burnosov -Buterin +cNFT +cNFTs callables -Callables callee callout callouts canonicalization catch-chain catchain -Catchain -Catchains -Catchcain catchchain cbcast cbcasts -CCITT celldb -Certik -CEX -CEXes -CEXs chainable -Chainbase cheatsheet ciphertexts -Ciphertexts circom -Circom clcf -CLion -CMake -cNFT -cNFTs -Coalus codegen codepage -Codepage codepages -Codepages -Codepoint codepoints codespace codespaces -Codespaces -Codium codomain cofactor cofactors -Coinbase combinator -Combinator combinators -Combinators componentwise composable concatenative configs -Configs configurator -Configurator consortiums constructivization constructivized cooldown -Coq counterparty -CPUs cron crosschain -Crosschain -Crowdin crypto -Cryptobot cryptocurrencies -Cryptocurrencies cryptocurrency cryptosystem -Cryptosystem cryptosystems -Cryptosystems cryptowallet -CTA -CTAs -Daniil dApp -DApp dApps -DApps datacenters -Datagram datagrams declarator decodable -Decompiled -Decompiler deduplicate deduplicates deduplicating deduplication -Deduplication -Dehasher delegators denylist deployer -Deployer dequeued dequeueing dereference @@ -194,247 +426,129 @@ deserialized deserializes deserializing devnet -DEX -DEXes -DEXs -DHT -DHTs -Diffie dockerize -Dockerize dockerized -Dockerized -Dodis dotenv dton -Duif -Durov -DYOR -Emelyanenko enablement endian -Endian enqueued -Enums -EOA -EOAs -Eruda -Ethena -Ethereum -Ethers -Etherscan -EVAA -Everscale -EVM -EVMs failover fift -Fift -Figma -Flappy forall frontmatter -Frontmatter -FTs -Ganache gasless gatekeeping -Gb -Gbps geo getgems getters -Gigadrop gigaton -Gigatons -Gilmanova gitbook -Gitpod globals -Goldschlag -Golev -Grafana grammY -GTon -Gunicorn gwei hackathon -Hackathon hackathons hard-code hard-coded hardcode hardcoded hashmap -Hashmap -Hashmaps -Hasse -Hetzner highload -Highload -Homotopy hostname iconUrl ident -Imedashvili impactful incentivizes inclusivity -Inclusivity indeterministic infobox init initializer -Initializer injective injectivity inlined inlining -Interchain involutive -IPFS isogeny jemalloc -Jetbrains jettons -Jettons js -Kademlia -Kelmer +kTon keyblock -Keyblock keyblocks -Keyblocks keypair keystore keystores -Kiayas -Kol -Kolya -kTon -Lamport -Lange -Larimer -Latinisms leaderboard -Leaderboard linkability -Liskov -Liteclient -Litecoin liteserver -Liteserver liteservers -Liteservers liveness llms lockdown lookups lottie -Lottie lt -Luby -Luhn -Lynis mainnet -Mainnet masterchain -Masterchain masterchains matchers mathlib -Maymounkov memecoin memoization -Memoizing mempool -Mempool -Merkle metafile -Metafile -Metaverse micropayment micropayments -Micropayments microton microtransaction -Microtransaction microtransactions milli minimalistic -Minimalistic minmax mintable mintless -Mintlify +mintmachine misclick misclicks misconfiguration misconfigured mitigations -Monero monoid monorepo monospace monospaced montgomery -MTon -MTProto multibyte multicast -Multicasting multichain -Multichain multiplatform -Multiplatform multiset multisig multisignature mytoncore mytonctrl -Mytonctrl -Nakamoto namespace -Namespace namespaces -Namespaces nano +nanoTon +nanoToncoin nanogram nanoton -nanoTon nanotoncoin -nanoToncoin nanotoncoins nanotons navbar -Navbar -Neovim nft -NFTs -Nginx -Niels -Nikolay nonexist -NOPs nota -Notcoin -Nowarp nullability -Nullability nullable -Nullable nullables -Nullables nullary -NVMe -OCaml offchain -Offchaining -Oleg -Ona onchain -Onchain -Onda onwards openlib openrouter @@ -442,16 +556,9 @@ outcoming param parameterization pasteable -Pavel paywalled -PDFs -Pease performant permissionless -Permissionless -Peyton -Phaser -Pitaya plaintext plaintexts plsc @@ -459,9 +566,7 @@ pluggable postprocessed pragma pragmas -Pragmas precommitted -Precompiled preconfigure preconfigured predefines @@ -470,52 +575,31 @@ preimage preimages preloading preloads -Preloads -PRNG -PRNGs projectId -Prolog prometheus -Prometheus proxying pseudocode -Pseudocode pseudorandom pseudorandomly pushgateway -Pushgateway px -Pyth pytoniq -Qodo queryable ragpull -Ratelance recv redeclaration redeclared redistributable -Redistributable reindex -Reindex reindexes -Reindexes -Reindexing reinitializes reinstalls relatedly -Relatedly relayer -Reputational resharding resynced -Reth -Revm -Ristretto -RLDP +retracer rollup -Rollup -RPCs ruleset runbooks runtimes @@ -523,20 +607,11 @@ sandboxing savelist savelists sbt -SBTs scannability -Scannability -SCCCG -Schnorr sdks -SDKs -SECD -Sedov -SELinux semver seqno seqnos -Serializable serializer serializers setwebpass @@ -545,28 +620,17 @@ shardchain shardchains sharded sharding -Sharding sharedlibrary -Shokrollahi shorteners -Shostak sidechains -Singlechain skillset smartcont -Snarkjs -Solana -Soulbound -Spellbook sse stablecoin -Stablecoin stablecoins -Stablecoins stakers standart stdlib -STON.fi styleguide subarrays subcase @@ -599,66 +663,34 @@ subwallet subwallets sudo superserver -SVM swappable systemd -Syverson -tagless -Tal -Tanenbaum -Tanja tApp tApps -Tblkch -Tencent -TEPs +tagless testnet -Testnet -Tezos -TMAs tock -Tock tokenomics -Tokenomics tolk -Tolk toncenter -Toncenter toncoin -Toncoin -Toncoins -Toncx tondevwallet -Tonhub -Tonkeeper -Tonkey tonlib -Tonlib tonscan -Tonstarter tonviewer -Tonviewer tonweb toolchain toolset tracebacks -Tradoor trie truthy ts tsUSDe -TVM -TVMs uint -Uint -UIs -Uiua unary -Unary unblockable undecodable underload -Underload underloaded underloads underperformance @@ -667,10 +699,8 @@ undiscussed unencrypted unenveloped unforgeable -Uninit unintuitive uniswap -Universa unixtime unpair unparsed @@ -679,47 +709,20 @@ untrusted untyped unvoted updatable -Upgradability uptimes -URIs -USDe -USDt utils utime -Vadim +vCPUs validator -Validator validators -Validators variadic varuint* -vCPUs -Viem virtualized -VMs -Volkov -VPNs -VSCodium -Vultr -Wagmi walkthrough -Walkthrough -Walletconnect -Watchlist webserver -Webserver webview -Weil whitepaper whitepapers workchain workchains -Xia -XMPL -XORing -Yolo -Yu -Yung -Zellic zerostate -ZK-proof