-
Notifications
You must be signed in to change notification settings - Fork 440
Further improve unconfirmed tx conflict resolution #1102
Copy link
Copy link
Closed
Labels
new featureNew feature or requestNew feature or request
Milestone
Description
Describe the enhancement
At the end of ticket #1063's description, there is a Further work section which states:
Our current structures do not handle unconfirmed conflicts properly when the conflicting transactions have the same
last_seentimestamp (thanks to @rajarshimaitra for pointing this out).bdk/crates/chain/tests/test_indexed_tx_graph.rs
Lines 692 to 695 in fe7bba1
// FIXME: Currently both the mempool tx are indexed and listed out. This can happen in case of RBF fee bumps, // when both the txs are observed at a single sync time. This can be resolved by checking the input's nSequence. // Additionally in case of non RBF conflicts at same `seen_at`, conflicting txids can be reported back for filtering // out in higher layers. This is similar to what core rpc does in case of unresolvable conflicts. I propose we deal with this as follows:
When two unconfirmed txs conflict, but have the same last_seen, we can check the input's sequences (using RBF rules). Otherwise, we sort by feerate (if possible). We fallback to lexicographical sorting of txids.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
new featureNew feature or requestNew feature or request
Type
Projects
Status
Done