Introduce canonicalization parameters#1808
Introduce canonicalization parameters#1808ValuedMammal merged 4 commits intobitcoindevkit:masterfrom
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. |
|
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.
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
|
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: