-
Notifications
You must be signed in to change notification settings - Fork 418
Check foreign utxos are not local before inclusion #1823
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
Check foreign utxos are not local before inclusion #1823
Conversation
|
As part of BDK review club for #1798 we talked about bitcoindevkit/bdk_wallet#29 and its fix candidate #1823 :
|
|
Next steps based on review club:
|
6811398 to
995df71
Compare
995df71 to
54a9667
Compare
evanlinjin
left a comment
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.
I have no strong opinion about whether we should make this breaking/not-breaking.
Generally, I think it's easier for maintainers if we are allowed to break everything and tell everyone to upgrade. For BDK, I think as long as we make the persistence crates backwards-compatible we are good.
54a9667 to
72acc19
Compare
I agree it's better to implement the appropriate fix than one that is potentially sub-optimal, so in that case I'd be in favor of adding the |
72acc19 to
36f2c5d
Compare
|
I have rebased, added some test to check all execution paths and addressed the comments. |
36f2c5d to
5c323eb
Compare
|
Rebased again. CI errors are related to dependencies and not this PR code. |
5c323eb to
55a8d5f
Compare
|
Rebased onto b26ff89 |
55a8d5f to
7d30a99
Compare
|
Rebased onto 362c3dc |
The new check is added to ensure all added foreign utxos are not owned by the wallet.
7d30a99 to
3acf109
Compare
|
Rebased onto 739b54f |
|
Already commented on bitcoindevkit/bdk_wallet#29, but adding it here too for an easier context. As discussed in today lib dev team call, the behavior explained above is something we should not constrain, and the issue mentioned in the discord chat should be controlled by the user, which makes this PR irrelevant for the issue. |
Description
Considering all foreign utxos must not be owned by wallet
The new check is added to ensure this invariant holds.
Before this change, foreign utxos could belong to the wallet, breaking the expected invariant, as exposed by this test at cc15e5d:
Fixes bitcoindevkit/bdk_wallet#29
Changelog notice
No API changes.
Checklists
cargo fmtandcargo clippybefore committing