diff --git a/foundations/actions/reserve.mdx b/foundations/actions/reserve.mdx index 056894e3c..e1060b91b 100644 --- a/foundations/actions/reserve.mdx +++ b/foundations/actions/reserve.mdx @@ -31,7 +31,7 @@ Notation: - `amount` – the amount of Toncoin passed to the `RAWRESERVE` instruction. - `mode` – the integer mode passed to the `RAWRESERVE` instruction. - `original_balance`: - - if after the storage phase, account's balance is less than the value of incoming message with bounce flag set to `false`, then `original_balance` is set to $0$; + - if after the storage phase, account's balance is less than the value of incoming message with bounce flag set to `false`, then `original_balance` is set to 0; - otherwise, `original_balance` equals account's balance before the compute phase minus incoming message value. - `remaining_balance` – account's balance before the reservation action. - `reserve` – the final amount to be reserved. @@ -39,8 +39,7 @@ Notation: The algorithm is as follows: 1. Check that `mode` has flag `ReserveBounceIfActionFail`: - - if so, then in case of any failure the action phase will be interrupted and the bounce phase will be initiated; - - if not, then in case of any failure the reservation action will be skipped. + - if so, then in case of any failure during reservation, the [bounce phase](/foundations/phases#bounce-phase) is initiated. 1. Set `reserve` to `amount`. 1. Check that `mode` has flag `ReserveAddOriginalBalance`: 1. If so, then check that `mode` has flag `ReserveInvertSign`: @@ -86,4 +85,4 @@ The following errors can occur during the reservation flow: - Some problems with unpacking the reserve action cell. - A problem related to extra-currency. -If the action had flag `16`, then in case of any of the above errors a [bounce message](/foundations/messages/internal#bounces) is sent back to a sender. +If the action had flag `16`, i.e., `ReserveBounceIfActionFail`, then in case of any of the above errors the transaction enters the [bounce phase](/foundations/phases#bounce-phase). diff --git a/foundations/messages/internal.mdx b/foundations/messages/internal.mdx index 6fa765fa7..e8fff35ed 100644 --- a/foundations/messages/internal.mdx +++ b/foundations/messages/internal.mdx @@ -93,8 +93,8 @@ A bounce message is used to inform the sender that handling of their message fai - there is enough Toncoin to send it left from handling the failed message, - and the message is bounceable, - and when either - - a message throws an error from the [compute phase](/foundations/phases#compute-phase) during message processing and state was not committed by [`COMMIT`](/tvm/instructions#f80f-commit) TVM instruction, - - or a message throws an error in the [action phase](/foundations/phases#action-phase) and mode [`SendBounceIfActionFail`](/foundations/messages/modes) is used. + - a contract throws an error from the [compute phase](/foundations/phases#compute-phase) during message processing, and the state was not committed by [`COMMIT`](/tvm/instructions#f80f-commit) TVM instruction, + - or an action fails in the [action phase](/foundations/phases#action-phase) with the `+16` flag enabled, for example [`SendBounceIfActionFail`](/foundations/messages/modes) in case of message sends or [`ReserveBounceIfActionFail`](/foundations/actions/reserve#modes) in case of reservations. ### Default bounce