-
Notifications
You must be signed in to change notification settings - Fork 406
IndexedTxGraph
: Transactions that conflict with relevant txs are also relevant.
#2008
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IndexedTxGraph
: Transactions that conflict with relevant txs are also relevant.
#2008
Conversation
Change behavior of {insert|apply}-if-relevant methods of `IndexedTxGraph` to also consider txs that conflict with relevant txs as relevant. Rationale: It is useful to determine why something is evicted from the mempool. For example, an incoming transaction may be evicted from the mempool due to insufficient fees or a conflicting transaction is confirmed. * Insufficient fees - the user may want to CPFP the tx. * Conflicting tx is confirmed - the sender probably purposefully cancelled the tx. The user may want to forget about this tx once it reaches x confirmations. The `IntentTracker` will make use of these relevant-conflicts. A note about chain sources: For some chain sources, obtaining relevant-conflicts is extremely costly or downright impossible (i.e. Electrum, BIP-158 filters). `bdk_bitcoind_rpc::Emitter` is still the most robust chain source to use.
Concept ACK |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 6938c8b
6938c8b
to
c846ad8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 7ca58b3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 7ca58b3
Description
This PR changes the behavior of
IndexedTxGraph
insert-if-relevant methods to consider relevant-tx-conflicts as relevant.Affected methods:
.apply_block_relevant
.batch_insert_relevant
.batch_insert_relevant_unconfirmed
Rationale
It is useful to be able to determine:
In order to do this, we need to track conflicts of spk-relevant transactions.
For example, an incoming transaction may be evicted from the mempool due to insufficient fees or cancelled (a conflicting transaction is confirmed). The caller may want to handle these two possibilities differently:
The
IntentTracker
will make use of these relevant-conflicts to help determine the course of action.Side note about chain sources
For some chain sources, obtaining relevant-conflicts is extremely costly or downright impossible (i.e. Electrum, BIP-158 filters).
bdk_bitcoind_rpc::Emitter
is still the most robust chain source to use.Changelog notice
Checklists
All Submissions:
New Features: