Any successfully sent message is always delivered, this is guaranteed by message queues in shardchains.
If the receiving contract failed processing of message (computation phase exit_code not 0 and not 1), and message contains enough value and was sent with bounceable flag, then the bounce message is guaranteed to be sent.

Jan 10, 2023, 2:59 PM
I see. And what about timeouts on messages? Always delivered within a timeframe? Or I guess it probably determined by the existing network load and generally quite fast.
Also what is proof that a message has been sent successfully? And is that proof always available to the sending contract?
Jan 10, 2023, 3:07 PM
Messages are delivered in order of their creation, usually quite fast.
You may be interested in chapter 2. https://ton.org/docs/tblkch.pdf
If the message was sent with mode & 2 == 0, then either the full transaction fails or this outgoing message is sent.
Otherwise, there is no way to check whether message was sent (or counting balance, but that's error prone...)
Jan 10, 2023, 3:08 PM
Ok and record of message being sent and its mode is stored locally in the sending contracts own data? or this is just an implementation option for the sender?
Jan 10, 2023, 3:11 PM
No, nothing is stored in contract data when sending message. Your contract may save them, but the message data has no use.
By the way, this allows to keep storage fees small, or transactions list could eat up the contract balance.
Jan 10, 2023, 3:14 PM
This can also be useful:
https://ton.org/docs/develop/smart-contracts/guidelines/message-delivery-guarantees
Jan 10, 2023, 3:18 PM
Oh, this article wasn't in place when I visited documentation last time)
Jan 10, 2023, 3:18 PM
I will definitely take a look. I know we want to keep the memory footprint of the contracts light. Perhaps just some meta-data can be stored about the last message sent and overwritten when transaction completes ...
"messages that were sent from one account and transactions which happened on one account are strictly ordered as well. Thanks to this, for every account we always know the order of transactions, received messages and sent messages." I know that TONAPI has a trace facility but from within the account contract how would this information be accessed?
Jan 10, 2023, 3:39 PM
The contract cannot access blockchain state. Not even its own code as cell.
Jan 10, 2023, 3:49 PM

© 2024 Draquery.com All rights reserved.