-
Notifications
You must be signed in to change notification settings - Fork 412
Introduce canonicalization parameters #1808
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
Introduce canonicalization parameters #1808
Conversation
4169060 to
0f00cdb
Compare
|
Would it make sense to add This way the existing And if you could only add new Then you could also add the For
|
|
ConceptACK. Would be nice to have draft PR built on this that resolves bitcoindevkit/bdk_wallet#40 so we know that this is all that's needed at the chain level before merging this. |
oleonardolima
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.
cACK 0f00cdb
|
Took this out of the |
@notmandatory I do not think so. Different calls to |
We want ordering for these txids. In case of conflict between them, we need a way to prioritize ones over others. This order should be controlled by the caller. |
c70b40b to
b780142
Compare
f73f26e to
c8f2ddf
Compare
37fa16d to
d309780
Compare
d309780 to
03f5041
Compare
03f5041 to
53d6fa1
Compare
|
@LLFourn I have a draft PR (bitcoindevkit/bdk_wallet#220) which showcases that this API is enough for |
LagginTimes
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.
Just a few consistency nits:
- Commit message 53d6fa1 needs to be updated to rename
CanonicalizationMods→CanonicalizationParams. - Same change needs to be done in the PR description changelog.
Besides these, this LGTM!
0f5176b to
05fe0d5
Compare
Introduce `CanonicalizationParams` which is passed in to `CanonicalIter::new`. `CanonicalizationParams::assume_canonical` is the only field right now. This contains a list of txids that we assume to be canonical, superceding any other canonicalization rules.
05fe0d5 to
53afb35
Compare
LagginTimes
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.
ACK 53afb35
ValuedMammal
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.
ACK 53afb35
|
Looks good to me. @LLFourn Please re-review if you find any issues |
Partially Fixes bitcoindevkit/bdk_wallet#40
Description
Add the ability to modify the canonicalization algorithm. Right now, the only modifier is
assume_canonicalwhich takes in aVec(ordered list) of txids and superimposes it on the canonicalization algorithm. Txs later in the list (higher index) have a higher priority (in case of conflicts).Notes to the reviewers
None at the moment.
Changelog notice
CanonicalizationParamsto allow the caller to modify the canonicalization algorithm. This in a new parameter onCanonicalIter::new.TxGraph::insert_txto allow for updating a transaction's witness field. This is useful for initially introducing an unsigned tx and adding witnesses later on.Checklists
All Submissions:
cargo fmtandcargo clippybefore committingNew Features:
Bugfixes: