From c54e1e965232f159e9e89ad441db02d09d25e038 Mon Sep 17 00:00:00 2001 From: Alekos Filini Date: Fri, 30 Jul 2021 17:47:45 +0200 Subject: [PATCH 01/10] Bump version to 0.10.0-rc.1 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index fd3c5a91..ddf2e3b1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bdk" -version = "0.9.1-dev" +version = "0.10.0-rc.1" edition = "2018" authors = ["Alekos Filini ", "Riccardo Casatta "] homepage = "https://bitcoindevkit.org" From cbec0b0bcf5f50992ca00edb38a2ec33ebdb606d Mon Sep 17 00:00:00 2001 From: Alekos Filini Date: Mon, 9 Aug 2021 14:55:17 +0200 Subject: [PATCH 02/10] Update changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index db401649..3591bb24 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [v0.10.0] - [v0.9.0] + - Added `RpcBlockchain` in the `AnyBlockchain` struct to allow using Rpc backend where `AnyBlockchain` is used (eg `bdk-cli`) - Removed hard dependency on `tokio`. @@ -369,3 +371,4 @@ final transaction is created by calling `finish` on the builder. [v0.7.0]: https://github.com/bitcoindevkit/bdk/compare/v0.6.0...v0.7.0 [v0.8.0]: https://github.com/bitcoindevkit/bdk/compare/v0.7.0...v0.8.0 [v0.9.0]: https://github.com/bitcoindevkit/bdk/compare/v0.8.0...v0.9.0 +[v0.10.0]: https://github.com/bitcoindevkit/bdk/compare/v0.9.0...v0.10.0 From c8593ecf709ae03cabf4a49f7d5ab3b948399d2b Mon Sep 17 00:00:00 2001 From: Alekos Filini Date: Mon, 9 Aug 2021 14:56:22 +0200 Subject: [PATCH 03/10] Update version in `src/lib.rs` --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 0a7d61b3..8ece0805 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -40,7 +40,7 @@ //! interact with the bitcoin P2P network. //! //! ```toml -//! bdk = "0.9.0" +//! bdk = "0.10.0" //! ``` #![cfg_attr( feature = "electrum", From 9aba3196ffc2841a0bbc09244e0e1c3f437b123c Mon Sep 17 00:00:00 2001 From: Alekos Filini Date: Mon, 9 Aug 2021 14:57:06 +0200 Subject: [PATCH 04/10] Bump version of `bdk-macros` to `v0.5.0` --- macros/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macros/Cargo.toml b/macros/Cargo.toml index 492e2e19..efec36d1 100644 --- a/macros/Cargo.toml +++ b/macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bdk-macros" -version = "0.4.0" +version = "0.5.0" authors = ["Alekos Filini "] edition = "2018" homepage = "https://bitcoindevkit.org" From d03d3c0dbd7c0ccd20f2cc6fca839439c7cab1cc Mon Sep 17 00:00:00 2001 From: Alekos Filini Date: Mon, 9 Aug 2021 14:57:58 +0200 Subject: [PATCH 05/10] Update `bdk-macros` --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index ddf2e3b1..6db3b0ea 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,7 @@ readme = "README.md" license = "MIT OR Apache-2.0" [dependencies] -bdk-macros = { path = "macros"} # TODO: Change this to version number after next release. +bdk-macros = "0.5" log = "^0.4" miniscript = "5.1" bitcoin = { version = "~0.26.2", features = ["use-serde", "base64"] } From a5d3a4d31aee61fe4197373bfc2f7e1ebd180caa Mon Sep 17 00:00:00 2001 From: Alekos Filini Date: Mon, 9 Aug 2021 14:58:32 +0200 Subject: [PATCH 06/10] Bump version to 0.10.0 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 6db3b0ea..93a2fff4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bdk" -version = "0.10.0-rc.1" +version = "0.10.0" edition = "2018" authors = ["Alekos Filini ", "Riccardo Casatta "] homepage = "https://bitcoindevkit.org" From b8680b299d80ee2a464c2e5f89b76d318cc22c0a Mon Sep 17 00:00:00 2001 From: Alekos Filini Date: Mon, 9 Aug 2021 17:00:05 +0200 Subject: [PATCH 07/10] Bump version to 0.10.1-dev --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 93a2fff4..fada0692 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bdk" -version = "0.10.0" +version = "0.10.1-dev" edition = "2018" authors = ["Alekos Filini ", "Riccardo Casatta "] homepage = "https://bitcoindevkit.org" From 39d2bd0d21d95c26bc680ef8a022eccef7cc115b Mon Sep 17 00:00:00 2001 From: Steve Myers Date: Tue, 17 Aug 2021 13:41:10 +0200 Subject: [PATCH 08/10] Update dev-dependencies electrsd to 0.10 --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index fada0692..14bc850a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -87,7 +87,7 @@ test-md-docs = ["electrum"] lazy_static = "1.4" env_logger = "0.7" clap = "2.33" -electrsd = { version= "0.8", features = ["trigger", "bitcoind_0_21_1"] } +electrsd = { version= "0.10", features = ["trigger", "bitcoind_0_21_1"] } [[example]] name = "address_validator" From 5e0011e1a807574e6885b1d1a453ba6361100bdd Mon Sep 17 00:00:00 2001 From: Steve Myers Date: Tue, 17 Aug 2021 17:52:07 +0200 Subject: [PATCH 09/10] Change dependencies bitcoincore-rpc to core-rpc, update bitcoin to ^0.27 and miniscript to ^6.0 --- Cargo.toml | 14 +++++++------- src/blockchain/rpc.rs | 12 ++++++------ src/error.rs | 4 ++-- src/lib.rs | 2 +- src/testutils/blockchain_tests.rs | 4 ++-- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 14bc850a..adb36231 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,20 +14,20 @@ license = "MIT OR Apache-2.0" [dependencies] bdk-macros = "0.5" log = "^0.4" -miniscript = "5.1" -bitcoin = { version = "~0.26.2", features = ["use-serde", "base64"] } +miniscript = "^6.0" +bitcoin = { version = "^0.27", features = ["use-serde", "base64"] } serde = { version = "^1.0", features = ["derive"] } serde_json = { version = "^1.0" } rand = "^0.7" # Optional dependencies sled = { version = "0.34", optional = true } -electrum-client = { version = "0.7", optional = true } +electrum-client = { version = "0.8", optional = true } reqwest = { version = "0.11", optional = true, features = ["json"] } ureq = { version = "2.1", default-features = false, features = ["json"], optional = true } futures = { version = "0.3", optional = true } async-trait = { version = "0.1", optional = true } -rocksdb = { version = "0.14", optional = true } +rocksdb = { version = "0.14", default-features = false, features = ["snappy"], optional = true } cc = { version = ">=1.0.64", optional = true } socks = { version = "0.3", optional = true } lazy_static = { version = "1.4", optional = true } @@ -36,7 +36,7 @@ zeroize = { version = "<1.4.0", optional = true } bitcoinconsensus = { version = "0.19.0-3", optional = true } # Needed by bdk_blockchain_tests macro -bitcoincore-rpc = { version = "0.13", optional = true } +core-rpc = { version = "0.14", optional = true } [target.'cfg(target_arch = "wasm32")'.dependencies] async-trait = "0.1" @@ -52,7 +52,7 @@ compact_filters = ["rocksdb", "socks", "lazy_static", "cc"] key-value-db = ["sled"] all-keys = ["keys-bip39"] keys-bip39 = ["tiny-bip39", "zeroize"] -rpc = ["bitcoincore-rpc"] +rpc = ["core-rpc"] # We currently provide mulitple implementations of `Blockchain`, all are # blocking except for the `EsploraBlockchain` which can be either async or @@ -77,7 +77,7 @@ esplora = [] # Debug/Test features -test-blockchains = ["bitcoincore-rpc", "electrum-client"] +test-blockchains = ["core-rpc", "electrum-client"] test-electrum = ["electrum", "electrsd/electrs_0_8_10", "test-blockchains"] test-rpc = ["rpc", "electrsd/electrs_0_8_10", "test-blockchains"] test-esplora = ["esplora", "ureq", "electrsd/legacy", "electrsd/esplora_a33e97e1", "test-blockchains"] diff --git a/src/blockchain/rpc.rs b/src/blockchain/rpc.rs index fd06dcf1..050e5ca0 100644 --- a/src/blockchain/rpc.rs +++ b/src/blockchain/rpc.rs @@ -38,13 +38,13 @@ use crate::database::{BatchDatabase, DatabaseUtils}; use crate::descriptor::{get_checksum, IntoWalletDescriptor}; use crate::wallet::utils::SecpCtx; use crate::{ConfirmationTime, Error, FeeRate, KeychainKind, LocalUtxo, TransactionDetails}; -use bitcoincore_rpc::json::{ +use core_rpc::json::{ GetAddressInfoResultLabel, ImportMultiOptions, ImportMultiRequest, ImportMultiRequestScriptPubkey, ImportMultiRescanSince, }; -use bitcoincore_rpc::jsonrpc::serde_json::Value; -use bitcoincore_rpc::Auth as RpcAuth; -use bitcoincore_rpc::{Client, RpcApi}; +use core_rpc::jsonrpc::serde_json::Value; +use core_rpc::Auth as RpcAuth; +use core_rpc::{Client, RpcApi}; use log::debug; use serde::{Deserialize, Serialize}; use std::collections::{HashMap, HashSet}; @@ -82,7 +82,7 @@ pub struct RpcConfig { pub skip_blocks: Option, } -/// This struct is equivalent to [bitcoincore_rpc::Auth] but it implements [serde::Serialize] +/// This struct is equivalent to [core_rpc::Auth] but it implements [serde::Serialize] /// To be removed once upstream equivalent is implementing Serialize (json serialization format /// should be the same) https://github.com/rust-bitcoin/rust-bitcoincore-rpc/pull/181 #[derive(Clone, Debug, Hash, Eq, PartialEq, Ord, PartialOrd, Serialize, Deserialize)] @@ -357,7 +357,7 @@ impl ConfigurableBlockchain for RpcBlockchain { let wallet_url = format!("{}/wallet/{}", config.url, &wallet_name); debug!("connecting to {} auth:{:?}", wallet_url, config.auth); - let client = Client::new(wallet_url, config.auth.clone().into())?; + let client = Client::new(wallet_url.as_str(), config.auth.clone().into())?; let loaded_wallets = client.list_wallets()?; if loaded_wallets.contains(&wallet_name) { debug!("wallet already loaded {:?}", wallet_name); diff --git a/src/error.rs b/src/error.rs index 73bf7119..ebbd2745 100644 --- a/src/error.rs +++ b/src/error.rs @@ -139,7 +139,7 @@ pub enum Error { Sled(sled::Error), #[cfg(feature = "rpc")] /// Rpc client error - Rpc(bitcoincore_rpc::Error), + Rpc(core_rpc::Error), } impl fmt::Display for Error { @@ -193,7 +193,7 @@ impl_error!(electrum_client::Error, Electrum); #[cfg(feature = "key-value-db")] impl_error!(sled::Error, Sled); #[cfg(feature = "rpc")] -impl_error!(bitcoincore_rpc::Error, Rpc); +impl_error!(core_rpc::Error, Rpc); #[cfg(feature = "compact_filters")] impl From for Error { diff --git a/src/lib.rs b/src/lib.rs index 8ece0805..b340deb2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -236,7 +236,7 @@ extern crate bdk_macros; extern crate lazy_static; #[cfg(feature = "rpc")] -pub extern crate bitcoincore_rpc; +pub extern crate core_rpc; #[cfg(feature = "electrum")] pub extern crate electrum_client; diff --git a/src/testutils/blockchain_tests.rs b/src/testutils/blockchain_tests.rs index 2df72d32..3a5e7593 100644 --- a/src/testutils/blockchain_tests.rs +++ b/src/testutils/blockchain_tests.rs @@ -3,9 +3,9 @@ use bitcoin::consensus::encode::{deserialize, serialize}; use bitcoin::hashes::hex::{FromHex, ToHex}; use bitcoin::hashes::sha256d; use bitcoin::{Address, Amount, Script, Transaction, Txid}; -pub use bitcoincore_rpc::bitcoincore_rpc_json::AddressType; -pub use bitcoincore_rpc::{Auth, Client as RpcClient, RpcApi}; use core::str::FromStr; +pub use core_rpc::core_rpc_json::AddressType; +pub use core_rpc::{Auth, Client as RpcClient, RpcApi}; use electrsd::bitcoind::BitcoinD; use electrsd::{bitcoind, Conf, ElectrsD}; pub use electrum_client::{Client as ElectrumClient, ElectrumApi}; From 582d2f38146de5fb1e0dd9779b15849c9e5adf10 Mon Sep 17 00:00:00 2001 From: Steve Myers Date: Wed, 18 Aug 2021 09:10:47 +0200 Subject: [PATCH 10/10] Remove unneeded cache paths for test-blockchains CI job --- .github/workflows/cont_integration.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/cont_integration.yml b/.github/workflows/cont_integration.yml index aa03c865..92fe2990 100644 --- a/.github/workflows/cont_integration.yml +++ b/.github/workflows/cont_integration.yml @@ -95,8 +95,6 @@ jobs: with: path: | ~/.cargo/registry - ~/.cargo/bitcoin - ~/.cargo/electrs ~/.cargo/git target key: ${{ runner.os }}-cargo-${{ github.job }}-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }}