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
On devnet, I noticed that a RefundTransaction is present in both RefundTransactions and ExecutedRefundTransactions. This is unexpected because we remove the transaction from the RefundTransactions storage map before inserting it into the ExecutedRefundTransactions storage map.
This could be a sign of a race condition since we have multiple running instances of the bridge daemons.
One daemon adds this transaction to the pending list after another daemon removed it from the pending list and set it as executed.
This results in tfchain emitting ExpiredRefundTransaction events for this transaction continuously because it exists in the pending transactions map. However, bridge validators keep skipping this event since the transaction exists in the executed transactions.
Perhaps we should investigate how this can happen and how the flow can be further improved to prevent such occurrences.
The text was updated successfully, but these errors were encountered:
sameh-farouk
changed the title
Bridge: A RefundTransaction present in both RefundTransactions and ExecutedRefundTransactions which shouldn't happen.
Bridge: A refund transaction present in both pending transactions and executed transactions which shouldn't happen.
Nov 12, 2023
On devnet, I noticed that a
RefundTransaction
is present in bothRefundTransactions
andExecutedRefundTransactions
. This is unexpected because we remove the transaction from theRefundTransactions
storage map before inserting it into theExecutedRefundTransactions
storage map.tfchain/substrate-node/pallets/pallet-tft-bridge/src/tft_bridge.rs
Lines 419 to 422 in 1da1c15
This could be a sign of a race condition since we have multiple running instances of the bridge daemons.
One daemon adds this transaction to the pending list after another daemon removed it from the pending list and set it as executed.
This results in tfchain emitting
ExpiredRefundTransaction
events for this transaction continuously because it exists in the pending transactions map. However, bridge validators keep skipping this event since the transaction exists in the executed transactions.Perhaps we should investigate how this can happen and how the flow can be further improved to prevent such occurrences.
The text was updated successfully, but these errors were encountered: