Skip to content

Commit

Permalink
update to final text
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey-Ostrovsky committed Nov 29, 2024
1 parent 0cda07e commit 8f67ebf
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion docs/v3/documentation/tvm/tvm-overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,14 @@ Besides exit_code and consumed gas data, TVM indirectly outputs the following da

All other register values will be neglected.

Note, that since there is a limit on max cell-depth `<1024`, and particularly the limit in messages and c4 and c5 depth `<=512`, for c5 register there will be a limit on the number of output actions in one transaction `<=255` during `action phase`, exceeding `<=512` limit will result in earlier error during `compute phase`. If a contract needs to send more than 255, it may send a message with the request to itself and send all necessary messages in subsequent transaction.
I think this will be most accurate:

Note that there is a global limit on max cell-depth `<1024` during contract execution. However registers c4 and c5 must be `<=512` in depth. Going beyond these limits results an error at the end of compute phase.
An additional constraint is imposed in the action phase. A contract cannot create more than 255 output actions.

:::tip
If a contract wants to send more than 255 messages, it can do so by sending a message to itself, which will contain the request of sending the remaining messages. An example of this approach can be seen at https://github.com/ton-blockchain/highload-wallet-contract-v3/blob/main/contracts/highload-wallet-v3.func#L50.
:::


## See Also
Expand Down

0 comments on commit 8f67ebf

Please sign in to comment.