-
Notifications
You must be signed in to change notification settings - Fork 85
WIP: Upgrade rust-miniscript / rust-bitcoin to latest version #1228
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
Conversation
_ => None, | ||
} | ||
.ok_or(LianaPolicyError::IncompatibleDesc)?; | ||
SemanticPolicy::Thresh(thresh) if thresh.is_or() && thresh.n() > 1 => { |
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.
shouldn't we check thresh.k() == 1?
SemanticPolicy::Thresh(thresh) if thresh.is_or() && thresh.n() > 1 => { | |
SemanticPolicy::Thresh(thresh) if thresh.is_or() && thresh.n() > 1 && threshk() == 1 => { |
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 think this is already checked by thresh.is_or()
.
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 think it makes sense to keep this thresh.n() > 1
condition here, but perhaps this is not strictly necessary as the previous version didn't have subs.len() > 1
and we already ensure further below that the primary path and recovery paths are not empty.
Yes. In general i don't think the code here is correct. I need to go through the descriptor core logic one more time. |
also not from these PR, but here if assert fail we will panic shouldn'nt we error instead? |
@@ -185,11 +187,14 @@ impl PathInfo { | |||
) -> Result<PathInfo, LianaPolicyError> { | |||
match policy { | |||
SemanticPolicy::Key(key) => Ok(PathInfo::Single(key)), | |||
SemanticPolicy::Threshold(k, subs) => { | |||
let keys: Result<_, LianaPolicyError> = subs | |||
SemanticPolicy::Thresh(thresh) if thresh.k() > 0 && thresh.n() >= thresh.k() => { |
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.
Is the if
condition required here if these checks are already performed in the Threshold
constructor?
SemanticPolicy::Threshold(k, subs) => { | ||
let keys: Result<_, LianaPolicyError> = subs | ||
SemanticPolicy::Thresh(thresh) if thresh.k() > 0 && thresh.n() >= thresh.k() => { | ||
// FIXME |
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.
Is this FIXME
still required? The code seems OK 🤔
This upgrades bitcoin to 0.32 and related dependencies accordingly. The changes to the liana and lianad crates are taken from darosior's commit 20ee8b1 in draft PR wizardsardine#1228.
This upgrades bitcoin to 0.32 and related dependencies accordingly. The changes to the liana and lianad crates are taken from darosior's commit 20ee8b1 in draft PR wizardsardine#1228.
This upgrades bitcoin to 0.32 and related dependencies accordingly. The changes to the liana and lianad crates are taken from darosior's commit 20ee8b1 in draft PR wizardsardine#1228.
This upgrades bitcoin to 0.32 and related dependencies accordingly. The changes to the liana and lianad crates are taken from darosior's commit 20ee8b1 in draft PR wizardsardine#1228.
This upgrades bitcoin to 0.32 and related dependencies accordingly. The changes to the liana and lianad crates are taken from darosior's commit 20ee8b1 in draft PR wizardsardine#1228.
This upgrades bitcoin to 0.32 and related dependencies accordingly. Note that the bdk_electrum crate is not upgraded to the most recent version available due to a degradation in Electrum sync performance in relation to the fetching and validation of Merkle proofs. Once that issue has been resolved, we can further upgrade BDK dependencies. Non-BDK changes to the liana and lianad crates are taken from darosior's commit 20ee8b1 in draft PR wizardsardine#1228.
This upgrades bitcoin to 0.32 and related dependencies accordingly. Note that the bdk_electrum crate is not upgraded to the most recent version available due to a degradation in Electrum sync performance in relation to the fetching and validation of Merkle proofs. Once that issue has been resolved, we can further upgrade BDK dependencies. Non-BDK changes to the liana and lianad crates are taken from darosior's commit 20ee8b1 in draft PR wizardsardine#1228.
This upgrades bitcoin to 0.32 and related dependencies accordingly. Note that the bdk_electrum crate is not upgraded to the most recent version available due to a degradation in Electrum sync performance in relation to the fetching and validation of Merkle proofs. Once that issue has been resolved, we can further upgrade BDK dependencies. Non-BDK changes to the liana and lianad crates are taken from darosior's commit 20ee8b1 in draft PR wizardsardine#1228.
This upgrades bitcoin to 0.32 and related dependencies accordingly. Note that the bdk_electrum crate has not been upgraded to the most recent version available as the Electrum syncing there takes much longer due to the fetching and validation of Merkle proofs. There are ongoing BDK changes in relation to that and so we can further upgrade this dependency once those changes have been completed. Non-BDK changes to the liana and lianad crates are taken from darosior's commit 20ee8b1 in draft PR wizardsardine#1228.
This upgrades bitcoin to 0.32 and related dependencies accordingly. Note that the bdk_electrum crate has not been upgraded to the most recent version available as the Electrum syncing there takes much longer due to the fetching and validation of Merkle proofs. There are ongoing BDK changes in relation to that and so we can further upgrade this dependency once those changes have been completed. Non-BDK changes to the liana and lianad crates are taken from darosior's commit 20ee8b1 in draft PR wizardsardine#1228.
This upgrades bitcoin to 0.32 and related dependencies accordingly. Note that the bdk_electrum crate has not been upgraded to the most recent version available as the Electrum syncing there takes much longer due to the fetching and validation of Merkle proofs. There are ongoing BDK changes in relation to that and so we can further upgrade this dependency once those changes have been completed. Non-BDK changes to the liana and lianad crates are taken from darosior's commit 20ee8b1 in draft PR wizardsardine#1228.
c5f5284 upgrade bitcoin to 0.32 and related (Michael Mallan) Pull request description: This is to upgrade bitcoin to 0.32 and related dependencies accordingly. Note that the bdk_electrum crate has not been upgraded to the most recent version available as the Electrum syncing there takes much longer due to the fetching and validation of Merkle proofs. There are ongoing changes in relation to that (https://github.com/bitcoindevkit/bdk/issues/1699) and so we can further upgrade this dependency once those changes have been completed. Non-BDK changes to the liana and lianad crates are taken from commit 20ee8b1 in draft PR #1228, which this replaces. (Once this PR has been tested and approved, we can release a new version of the async_hwi crate and point to that.) ACKs for top commit: edouardparis: ACK c5f5284 Tree-SHA512: 3cb1a2060ecc4c6b9631df0eadf5692ad35495b9303edbb80a437aca60ae062a7227f20ddeb5eb722cf57dd80bfa752372a14d26b8f306844237bfdb5f41e51a
Replaced by #1555. |
I need to go over the changes again, and this introduces a massive performance hit. From quick profiling i think it's from upstream changes in the miniscript policy compiler.
Running
cargo test descriptors
before:After:
Fixes #1224.