From 8f67ebfd0151c059c07fa0e652062d902bfe18ad Mon Sep 17 00:00:00 2001 From: Alexey Ostrovsky Date: Fri, 29 Nov 2024 12:40:29 +0300 Subject: [PATCH] update to final text --- docs/v3/documentation/tvm/tvm-overview.mdx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/v3/documentation/tvm/tvm-overview.mdx b/docs/v3/documentation/tvm/tvm-overview.mdx index 2ca5e7ba5d..323ccbf02f 100644 --- a/docs/v3/documentation/tvm/tvm-overview.mdx +++ b/docs/v3/documentation/tvm/tvm-overview.mdx @@ -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