You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
awaitTxStatusChange currently only returns Unknown or Committed.
In case of a rollback then we only ever get Unknown, which e.g. makes awaitTxConfirmed keep looping as if we were still waiting for the tx to show up at all.
As we discussed before, we should have awaitTxStatusChange actually return the current status of the transaction, rather than include the 8 block wait for confirmation.
Utilities built on top of this primitive can then implement an appropriate way to deal with rollbacks when they see TentativelyConfirmed followed by Unknown
The text was updated successfully, but these errors were encountered:
awaitTxStatusChange was reworked in #122, changes are listed it PR.
It will now return TentativelyConfirmed as soon as Tx willlive mempool and get propagated to chain, but it will still return Unknown if Tx was discarded from the mempool. So awaitTxConfirmed can still loop forever and there is no protection from that as far as I can see besides some custom off-chain logic.
New node release (1.35) will introduce mempool queries, but It fills like on top of that TxStatus need one more variant like Discarded or something to be able to manage discarding from the mempool in off-chain Contract code.
awaitTxStatusChange
currently only returnsUnknown
orCommitted
.In case of a rollback then we only ever get
Unknown
, which e.g. makesawaitTxConfirmed
keep looping as if we were still waiting for the tx to show up at all.As we discussed before, we should have awaitTxStatusChange actually return the current status of the transaction, rather than include the 8 block wait for confirmation.
Utilities built on top of this primitive can then implement an appropriate way to deal with rollbacks when they see
TentativelyConfirmed
followed byUnknown
The text was updated successfully, but these errors were encountered: