]> Untitled Git - bdk/log
bdk
3 years agoFix pre-segwit inputs with esplora
LLFourn [Tue, 15 Mar 2022 23:11:31 +0000 (10:11 +1100)]
Fix pre-segwit inputs with esplora

3 years agoMerge bitcoindevkit/bdk#515: Never delete spent utxos from the database
Alekos Filini [Mon, 14 Mar 2022 15:06:16 +0000 (16:06 +0100)]
Merge bitcoindevkit/bdk#515: Never delete spent utxos from the database

f2f0efc0b3367abf40e33b84fc577fb11f625b04 Never delete spent utxos from the database (Daniela Brozzoni)

Pull request description:

  <!-- You can erase any parts of this template not applicable to your Pull Request. -->

  ### Description

  A `is_spent` field is added to LocalUtxo; when a txo is spent we set
  this field to true instead of deleting the entire utxo from the
  database.
  This allows us to create txs double-spending txs already in blockchain.
  Listunspent won't return spent in mempool utxos, effectively excluding them from the coin selection and balance calculation
  Fixes #414

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
  * [x] I ran `cargo fmt` and `cargo clippy` before committing

  #### New Features:

  * [x] I've added tests for the new feature
  * [x] I've updated `CHANGELOG.md`
  * [x] I'm linking the issue being fixed by this PR

ACKs for top commit:
  afilini:
    Re-ACK f2f0efc

Tree-SHA512: 7984b69c56b3b12746c2301072d637dea1346730aa132f1ea67c5bd8bf685bd557fc7cbdc2fc1185e63c71db07d36cd979514921b2c83c55737cd4b96102377e

3 years agoBump version to 0.17.0-rc.1
Steve Myers [Thu, 10 Mar 2022 23:01:44 +0000 (17:01 -0600)]
Bump version to 0.17.0-rc.1

3 years agoUpdate `electrsd` to v0.15
Alekos Filini [Wed, 16 Feb 2022 16:08:25 +0000 (17:08 +0100)]
Update `electrsd` to v0.15

3 years agoNever delete spent utxos from the database
Daniela Brozzoni [Wed, 9 Mar 2022 15:15:34 +0000 (16:15 +0100)]
Never delete spent utxos from the database

A `is_spent` field is added to LocalUtxo; when a txo is spent we set
this field to true instead of deleting the entire utxo from the
database.
This allows us to create txs double-spending txs already in blockchain.
Listunspent won't return spent utxos, effectively excluding them from the
coin selection and balance calculation

3 years agoMerge bitcoindevkit/bdk#535: Remove blockchain from wallet
Steve Myers [Wed, 9 Mar 2022 16:44:08 +0000 (10:44 -0600)]
Merge bitcoindevkit/bdk#535: Remove blockchain from wallet

0cc4700bd67be84bb5cb0814bf5c8aa9fc3f3cdc Fix typo in CHANGELOG and doc in wallet/mod.rs (Steve Myers)
660faab1e20defe86a7baf132e52928f538b9cbb Fix typo in CHANGELOG (LLFourn)
45767fcaf7c65d5020f99fdc35c147acd6e8d037 Remove max_addresses sync param (LLFourn)
fbb50ad1c886a9cb716146fa823558d7d655c7b7 apply doc suggestions from @notmandatory (Lloyd Fournier)
035307ef54ebc330b1760bbdd17bdab3b167cfeb [rpc] Filter out unrelated transactions (LLFourn)
c0e75fc1a8560cdacf705ff60ef8833befd8280c Split get_tx into its own trait (LLFourn)
dcd90f8b61287164dae60f039848d3605eab8616 Restore but depreciate new_offline (LLFourn)
410a51355bb47dbf3401cbe6f19546255c6721e0 Add SyncOptions as the second argument to Wallet::sync (LLFourn)
326bfe82a89eaa79acf90c34442234c7e53e1caf Remove Blockchain from wallet (LLFourn)

Pull request description:

  While trying to finish #490 I thought that it'd be better to try the idea of getting rid of a lot of the async macros and just having tow different traits for sync and async stuff. While trying to do that I felt that this needed to be done first.

  The goal of this change is to decouple the wallet from the blockchain trait. A wallet is something that keeps track of UTXOs and transactions (and can sign things). The only reason it should need to talk to the blockchain is if doing a `sync`. So we remove all superfluous calls to the blockchain and precisely define the requirements for the blockchain to be used to sync with two new traits: `WalletSync` and `GetHeight`.

  1. Stop requesting height when wallet is created
  2. `new_offline` is just `new` now.
  3. a `WalletSync + GetHeight` is now the first argument to `sync`.
  4. `SyncOptions` replaces the existing options to `sync` and allows for less friction when making breaking changes in the fuutre (no more noop_progress!).
  5. We `Box` the `Progress` now to avoid type parameters
  6. broadcast has been removed from `Wallet`. You just use the blockchain directly to broadcast now.

  ### Notes to the reviewers

  This needs #502 before it can be merged but can reviewed now.
  Be on the look up for stale documentation from this change.
  Our doc build looks broken because of ureq or something.

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
  * [x] I ran `cargo fmt` and `cargo clippy` before committing
  * [x] I've updated `CHANGELOG.md`

Top commit has no ACKs.

Tree-SHA512: a8f3e21e45359be642b1f30d4ac1ba74785439e1b770dbeab0a5a4b8aab1eef4bb6b855aea4382e289257bc890fa713ca832a8b6c9655f7a59e96d412b4da3e6

3 years agoFix typo in CHANGELOG and doc in wallet/mod.rs
Steve Myers [Wed, 9 Mar 2022 02:02:47 +0000 (20:02 -0600)]
Fix typo in CHANGELOG and doc in wallet/mod.rs

3 years agoFix typo in CHANGELOG
LLFourn [Tue, 8 Mar 2022 03:00:29 +0000 (14:00 +1100)]
Fix typo in CHANGELOG

3 years agoRemove max_addresses sync param
LLFourn [Sun, 6 Mar 2022 23:44:41 +0000 (10:44 +1100)]
Remove max_addresses sync param

You can do this with ensure_addresses_cached if you really want to.

3 years agoMerge branch 'master' into remove-blockchain-from-wallet
LLFourn [Thu, 3 Mar 2022 02:13:45 +0000 (13:13 +1100)]
Merge branch 'master' into remove-blockchain-from-wallet

3 years agoMerge bitcoindevkit/bdk#537: refactor wallet address caching into its own public...
Steve Myers [Wed, 2 Mar 2022 05:27:44 +0000 (21:27 -0800)]
Merge bitcoindevkit/bdk#537: refactor wallet address caching into its own public method

edf2f0ce06d27a1434202b79306cd1e998b5614c refactor wallet address caching into its own public method for offline wallet use (a5an0)

Pull request description:

  ### Description

  Currently, the only way to ensure that a wallet's internal database has addresses loaded and cached is through `Wallet::sync`: that function generates and caches up to a number of addresses if they aren't already in the database, and then uses the wallet's blockchain client to sync those addresses. If you are using an offline wallet, there is no mechanism to ensure that the database has addresses loaded. This is a problem for usecases like an offline wallet being used as a multisig signer and wanting to validate change addresses as `Wallet::is_mine` will only work properly if the owned-address is loaded in the database.

  This PR takes the address caching functionality out of `Wallet::sync` and puts it in a new public method that is available to offline wallets. `Wallet::sync` uses this method internally.

  ### Checklists

  #### All Submissions:

  * [X] I've signed all my commits
  * [X] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
  * [X] I ran `cargo fmt` and `cargo clippy` before committing
  * [X] I've added docs for the new feature
  * [X] I've updated `CHANGELOG.md`

Top commit has no ACKs.

Tree-SHA512: 8ddc58d71457163bb20ff663ac508feb4e77000688161b63841a94db30b3f29f60f35fa2467bd99546123148873e3aed11e2f13ae6cbceda6605b83c227d9079

3 years agoMerge branch 'master' into offline-address-cache
Steve Myers [Wed, 2 Mar 2022 05:00:56 +0000 (21:00 -0800)]
Merge branch 'master' into offline-address-cache

3 years agoMerge bitcoindevkit/bdk#522: Add API for internal addresses
Steve Myers [Wed, 2 Mar 2022 04:52:12 +0000 (20:52 -0800)]
Merge bitcoindevkit/bdk#522: Add API for internal addresses

022256c91ac7a4d9324a1a7925394a948feec808 Fix comment on peek_address (Lloyd Fournier)
00f0901bac805360695d0c492df8fa809918863e Add API for internal addresses (LLFourn)

Pull request description:

  There are good reasons for applications to need to get internal
  addresses too. For example creating a transactions that splits an output
  into several smaller ones.

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
  * [x] I ran `cargo fmt` and `cargo clippy` before committing

  #### New Features:

  * [x] I've added tests for the new feature
  * [x] I've added docs for the new feature
  * [x] I've updated `CHANGELOG.md`

ACKs for top commit:
  notmandatory:
    ACK 022256c91ac7a4d9324a1a7925394a948feec808

Tree-SHA512: 0ead6669c9974332708ae6cba1a5be69cd4b3b6c7a21896efdce178d4406265ba072e1cf02d1913178d0a551f3b276d99b75676c632833964f87484e262a61b1

3 years agorefactor wallet address caching into its own public method for offline wallet use
a5an0 [Wed, 2 Feb 2022 13:27:53 +0000 (08:27 -0500)]
refactor wallet address caching into its own public method for offline wallet use

3 years agoFix hierarchy of headers on docs landing page
thunderbiscuit [Thu, 24 Feb 2022 15:48:47 +0000 (10:48 -0500)]
Fix hierarchy of headers on docs landing page

3 years agoapply doc suggestions from @notmandatory
Lloyd Fournier [Thu, 24 Feb 2022 09:59:21 +0000 (20:59 +1100)]
apply doc suggestions from @notmandatory

Co-authored-by: Steve Myers <github@notmandatory.org>
3 years ago[rpc] Filter out unrelated transactions
LLFourn [Thu, 24 Feb 2022 09:32:47 +0000 (20:32 +1100)]
[rpc] Filter out unrelated transactions

For some reason while doing the "remove blockchain from wallet PR" I
changed the tests around in what I thought was a benign way. But it
meant (apparently) that both parties "test_sync_double_receive" were
using the same "blockchain". This meant that when the blockchain was RPC
they both imported their addresses to it and got each other's results
when syncing. This bugged out the sync and this commit fixes that.

3 years agoSplit get_tx into its own trait
LLFourn [Tue, 22 Feb 2022 23:38:35 +0000 (10:38 +1100)]
Split get_tx into its own trait

to make supporting verify_tx easier

3 years agoRestore but depreciate new_offline
LLFourn [Tue, 22 Feb 2022 22:52:18 +0000 (09:52 +1100)]
Restore but depreciate new_offline

3 years agoAdd SyncOptions as the second argument to Wallet::sync
LLFourn [Thu, 27 Jan 2022 05:52:53 +0000 (16:52 +1100)]
Add SyncOptions as the second argument to Wallet::sync

The current options are awkward and it would be good if we could
introduce more in the future without breaking changes.

3 years agoRemove Blockchain from wallet
LLFourn [Wed, 26 Jan 2022 04:17:48 +0000 (15:17 +1100)]
Remove Blockchain from wallet

Although somewhat convenient to have, coupling the Wallet with
the blockchain trait causes development friction and complexity.
What if sometimes the wallet is "offline" (no access to the blockchain)
but sometimes its online?
The only thing the Wallet needs the blockchain for is to sync.
But not all applications will even use the sync method and the sync
method doesn't require the full blockchain functionality.
So we instead pass the blockchain in when we want to sync.

- To further reduce the coupling with blockchain I removed the get_height call from `new` and just use the height of the
last sync in the database.
- I split up the blockchain trait a bit into subtraits.

3 years agoMerge commit 'refs/pull/552/head' of github.com:bitcoindevkit/bdk
Steve Myers [Wed, 23 Feb 2022 22:10:28 +0000 (14:10 -0800)]
Merge commit 'refs/pull/552/head' of github.com:bitcoindevkit/bdk

3 years agoFix comment on peek_address github/get_change_address
Lloyd Fournier [Thu, 13 Jan 2022 04:31:52 +0000 (15:31 +1100)]
Fix comment on peek_address

Co-authored-by: Raj <36541669+rajarshimaitra@users.noreply.github.com>
3 years agoAdd API for internal addresses
LLFourn [Thu, 19 Aug 2021 09:57:35 +0000 (19:57 +1000)]
Add API for internal addresses

There are good reasons for applications to need to get internal
addresses too. For example creating a transactions that splits an output
into several smaller ones.

3 years agoMerge bitcoindevkit/bdk#502: Refactor verification logic
Steve Myers [Tue, 22 Feb 2022 03:21:48 +0000 (19:21 -0800)]
Merge bitcoindevkit/bdk#502: Refactor verification logic

1999d97aeb3d97ee24a9b59a2f1453a26943b595 Remove `verify` flag from `TransactionDetails` via new MIGRATIONS (Steve Myers)
0195bc0636d9a58013f0cbc3781d213b0cfc1509 Update CHANGELOG (rajarshimaitra)
1d7ea89d8a792013212b1d269895b02fe3b410bd Refactor sync time verification (rajarshimaitra)
b05ee78c7335f7e3a1593dc4ff7686e6f72ff5c0 Remove verifcation flag from compact_filters (rajarshimaitra)
53c30b0479c74dde17cd27f8eac7f540e492067d Add verification tests in CI (rajarshimaitra)
6a09075d1a87509e9117eab727132efdf8ea6e1d Remove verify flag from sqlite DB (rajarshimaitra)
61a95d0d15b9944e8b5d13db64ef6ffd9a8d6e29 Update changelog (rajarshimaitra)
08f312a82f889f6bf5dfedfaa565ac2cb59683ae Remove `verify` flag from `TransactionDetails` (rajarshimaitra)
acbf0ae08e0732579652aece9bc48169351884cf Add sync verification for `esplora` (rajarshimaitra)
4761155707a819c4db437e71a36621a027d5302a Add sync verification in `electrum` (rajarshimaitra)
98a3b3282a0ff59bbdf900adc765f6912d1975c1 Remove sync verification (rajarshimaitra)

Pull request description:

  <!-- You can erase any parts of this template not applicable to your Pull Request. -->

  ### Description

  As discussed in https://github.com/bitcoindevkit/bdk/issues/498 and also in team call,
   - default verification from wallet sync is removed
   - `verify_tx` refactored as an wallet API
   - in `sync` verification added for electrum and esplora backends, gated by `verify` flag.
   - `verify` flag is removed from `TransactionDetails`.

  ### Notes to the reviewers

  I haven't looked into `comapct_filters` to see how verification can fit there, but that will probably be required in future.

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
  * [x] I ran `cargo fmt` and `cargo clippy` before committing

  #### Wallet API change:

  * [x] I've updated `CHANGELOG.md`

Top commit has no ACKs.

Tree-SHA512: 72e307008a137468d96d5c2a6ec804b18fa52363606f3c978208ae5dc22973a7f0aa37488e9bb98dde88409a12d59cc5f00c675d2d408e57e661bf6210bee67b

3 years agoMerge branch 'master' into verifcation-refactor
Steve Myers [Tue, 22 Feb 2022 01:47:09 +0000 (17:47 -0800)]
Merge branch 'master' into verifcation-refactor

3 years agoRemove `verify` flag from `TransactionDetails` via new MIGRATIONS
Steve Myers [Mon, 21 Feb 2022 22:06:15 +0000 (14:06 -0800)]
Remove `verify` flag from `TransactionDetails` via new MIGRATIONS

3 years agoUpdate CHANGELOG
rajarshimaitra [Fri, 11 Feb 2022 16:38:17 +0000 (22:08 +0530)]
Update CHANGELOG

3 years agoMerge bitcoindevkit/bdk#551: Fix sent calculation in the RPC backend
Alekos Filini [Sun, 20 Feb 2022 10:19:14 +0000 (11:19 +0100)]
Merge bitcoindevkit/bdk#551: Fix sent calculation in the RPC backend

bfd0d13779003f11fa099a0b665052c18ce6e500 [blockchain] Fix `sent` calculation in the RPC backend (Daniela Brozzoni)
128c37595c5cfeacdb8e999da5795a9aa28ad67b [tests] Pass tx inputs to the testutils macro (Daniela Brozzoni)

Pull request description:

  <!-- You can erase any parts of this template not applicable to your Pull Request. -->

  ### Description

  <!-- Describe the purpose of this PR, what's being adding and/or fixed -->

  ### Notes to the reviewers

  <!-- In this section you can include notes directed to the reviewers, like explaining why some parts
  of the PR were done in a specific way -->

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
  * [x] I ran `cargo fmt` and `cargo clippy` before committing

  #### Bugfixes:

  * [x] I've added tests to reproduce the issue which are now passing

ACKs for top commit:
  afilini:
    ACK bfd0d13779003f11fa099a0b665052c18ce6e500

Tree-SHA512: 1c214819c5dc1f1c30b1c6ef18a44a3013d587651890b26aecfc5203d128173fd91497337186bbee6934f77d3cfe1686e67b83ca6fe6e47b4c1d4b1dbcc656ee

3 years agoBump version to 0.16.2-dev github/release/0.16.0
Steve Myers [Sat, 19 Feb 2022 21:10:04 +0000 (13:10 -0800)]
Bump version to 0.16.2-dev

3 years agoBump version to 0.16.1 v0.16.1
Steve Myers [Sat, 19 Feb 2022 20:46:17 +0000 (12:46 -0800)]
Bump version to 0.16.1

3 years agoPin tokio version to ~1.14
Steve Myers [Thu, 17 Feb 2022 19:37:39 +0000 (11:37 -0800)]
Pin tokio version to ~1.14

3 years ago[ci] Pin nightly docs workflow rust version to nightly-2022-01-25
Steve Myers [Fri, 4 Feb 2022 14:55:00 +0000 (08:55 -0600)]
[ci] Pin nightly docs workflow rust version to nightly-2022-01-25

3 years ago[blockchain] Fix `sent` calculation in the RPC backend
Daniela Brozzoni [Thu, 17 Feb 2022 22:39:11 +0000 (23:39 +0100)]
[blockchain] Fix `sent` calculation in the RPC backend

We used to consider a tx input as ours if we had the
tx that creates it in the database.
This commit actually checks if an input is ours before adding
its value to the `sent` field.

3 years ago[tests] Pass tx inputs to the testutils macro
Daniela Brozzoni [Thu, 17 Feb 2022 22:36:40 +0000 (23:36 +0100)]
[tests] Pass tx inputs to the testutils macro

3 years agoMerge bitcoindevkit/bdk#550: Pin tokio version to ~1.14
Steve Myers [Fri, 18 Feb 2022 02:09:03 +0000 (18:09 -0800)]
Merge bitcoindevkit/bdk#550: Pin tokio version to ~1.14

b04bb590f385db349f8dc70cc169674b530c4205 Pin tokio version to ~1.14 (Steve Myers)

Pull request description:

  ### Description

  The `tokio` project recently changed their MSRV to `1.49.0`. This PR will pin the `tokio` dependency version to `~1.14` which is prior to their MSRV increase.

  ### Notes to the reviewers

  The LDK team took this approach for their `tokio` dev-dependency, see https://github.com/lightningdevkit/rust-lightning/pull/1315.

  As long as `tokio` backports bug fixes  to`1.14.x` releases this should be safe. If we need any new features we can revisit this decision.

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
  * [x] I ran `cargo fmt` and `cargo clippy` before committing

  #### New Features:

  * [ ] I've updated `CHANGELOG.md`

ACKs for top commit:
  LLFourn:
    ACK b04bb590f385db349f8dc70cc169674b530c4205

Tree-SHA512: a44d61e0d644900837b5a99e0f2b9e5706cf9932f7430c3a2c8adbff37c82e4a6a545849fe031da748fcd8c8a70f5266d6974c5b6634b50af5eae148b9a26635

3 years agoPin tokio version to ~1.14
Steve Myers [Thu, 17 Feb 2022 19:37:39 +0000 (11:37 -0800)]
Pin tokio version to ~1.14

3 years agoMerge bitcoindevkit/bdk#542: Implement XKeyUtils on InnerXKey
Alekos Filini [Mon, 14 Feb 2022 19:15:57 +0000 (20:15 +0100)]
Merge bitcoindevkit/bdk#542: Implement XKeyUtils on InnerXKey

b6fe01c4668b1b6737e5e24ae2282f0f55da39cd Implement XKeyUtils on InnerXKey (Gianluca Acerbis)

Pull request description:

  Closes #395

  <!-- You can erase any parts of this template not applicable to your Pull Request. -->

  ### Description

  <!-- Describe the purpose of this PR, what's being adding and/or fixed -->

  ### Notes to the reviewers

  <!-- In this section you can include notes directed to the reviewers, like explaining why some parts
  of the PR were done in a specific way -->

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
  * [x] I ran `cargo fmt` and `cargo clippy` before committing

  #### New Features:

  * [ ] I've added tests for the new feature
  * [ ] I've added docs for the new feature
  * [ ] I've updated `CHANGELOG.md`

  #### Bugfixes:

  * [ ] This pull request breaks the existing API
  * [ ] I've added tests to reproduce the issue which are now passing
  * [x] I'm linking the issue being fixed by this PR

ACKs for top commit:
  danielabrozzoni:
    ACK b6fe01c4668b1b6737e5e24ae2282f0f55da39cd - the code looks good to me, I tested locally and all tests pass
  notmandatory:
    ACK b6fe01c4668b1b6737e5e24ae2282f0f55da39cd

Tree-SHA512: 00a3ed9532a0589ac4be55a7d0c6ac5251f03f716adb2086eb934d9a9b04bcb7fd95aaeba38b68c5c90876644ce53ac5e39a912a4096e789887342f8727ae434

3 years agoImplement XKeyUtils on InnerXKey
Gianluca Acerbis [Tue, 14 Sep 2021 12:56:00 +0000 (12:56 +0000)]
Implement XKeyUtils on InnerXKey

Closes #395

3 years agoRefactor sync time verification
rajarshimaitra [Fri, 21 Jan 2022 16:13:05 +0000 (21:43 +0530)]
Refactor sync time verification

Instead of verifying txs at sync time in every backend, its moved to
script_sync to by default be available to any backend.

3 years agoRemove verifcation flag from compact_filters
rajarshimaitra [Sun, 2 Jan 2022 09:44:32 +0000 (15:14 +0530)]
Remove verifcation flag from compact_filters

3 years agoAdd verification tests in CI
rajarshimaitra [Sun, 2 Jan 2022 08:52:39 +0000 (14:22 +0530)]
Add verification tests in CI

3 years agoRemove verify flag from sqlite DB
rajarshimaitra [Sun, 2 Jan 2022 08:52:10 +0000 (14:22 +0530)]
Remove verify flag from sqlite DB

3 years agoUpdate changelog
rajarshimaitra [Thu, 16 Dec 2021 17:16:44 +0000 (22:46 +0530)]
Update changelog

3 years agoRemove `verify` flag from `TransactionDetails`
rajarshimaitra [Thu, 16 Dec 2021 15:36:59 +0000 (21:06 +0530)]
Remove `verify` flag from `TransactionDetails`

3 years agoAdd sync verification for `esplora`
rajarshimaitra [Thu, 16 Dec 2021 15:27:28 +0000 (20:57 +0530)]
Add sync verification for `esplora`

3 years agoAdd sync verification in `electrum`
rajarshimaitra [Thu, 16 Dec 2021 15:23:16 +0000 (20:53 +0530)]
Add sync verification in `electrum`

3 years agoRemove sync verification
rajarshimaitra [Thu, 16 Dec 2021 15:21:18 +0000 (20:51 +0530)]
Remove sync verification

The default sync verification is removed from wallet module.
By default sync time verification only makes sense for `electrum` and
`esplora` backend as they are usually untrusted 3rd party services.

script verification for transaction is costly, so removing default
script verification optimizes performance.

3 years agoMerge bitcoindevkit/bdk#539: [ci] Pin nightly docs workflow rust version to nightly...
Alekos Filini [Mon, 7 Feb 2022 10:01:36 +0000 (11:01 +0100)]
Merge bitcoindevkit/bdk#539: [ci] Pin nightly docs workflow rust version to nightly-2022-01-25

07c270db03bac07604911e6bd253c18713de0ab0 [ci] Pin nightly docs workflow rust version to nightly-2022-01-25 (Steve Myers)

Pull request description:

  ### Description

  Pin nightly docs workflow rust version to `nightly-2022-01-25` to fix #538 .

  ### Notes to the reviewers

  The nightly docs should be changed to the `stable` version once it supports `feature(doc_cfg)`.

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)

  #### Bugfixes:

  * [x] I'm linking the issue being fixed by this PR

ACKs for top commit:
  afilini:
    ACK 07c270db03bac07604911e6bd253c18713de0ab0

Tree-SHA512: a8e5de051e1963c10d686d5cb5d1785e20f6cd322b9bfcf2d2f5c381d9124a9b8518671dfbedb11550bdfa66c8c64ad505c7e1604e2bfe23600de39cb20467dd

3 years ago[ci] Pin nightly docs workflow rust version to nightly-2022-01-25
Steve Myers [Fri, 4 Feb 2022 14:55:00 +0000 (08:55 -0600)]
[ci] Pin nightly docs workflow rust version to nightly-2022-01-25

3 years agoMerge bitcoindevkit/bdk#532: Release/0.16.0
Alekos Filini [Thu, 27 Jan 2022 09:44:42 +0000 (10:44 +0100)]
Merge bitcoindevkit/bdk#532: Release/0.16.0

fcf422752bb440f08aa9b5384297bbb06bca8cb3 Fix 0.16.0 changelog, include WIF fix (Steve Myers)
6fb42fdea10fcff9a45dd07f966ec4f3746c369d Bump version to 0.16.1-dev (Steve Myers)
3f65e8c64bd620685e40d3b54a0893993513441b Bump version to 0.16.0 (Steve Myers)
3f0101d317ec5a1d0df60c274741ee380563d7fe Bump version to 0.16.0-rc.1 (Steve Myers)

Pull request description:

  ### Description

  Merge the 0.16.0 release branch back into the master branch.

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
  * [x] I ran `cargo fmt` and `cargo clippy` before committing

ACKs for top commit:
  afilini:
    ACK fcf422752bb440f08aa9b5384297bbb06bca8cb3

Tree-SHA512: 7a1e9297f4e93284e5e57124c7afe37d1fbef1da48375b310aad7fe8556be6bba00c3263e9d15540209fc99ba5e928d3fc751d0df6592c2af871599f00941a7b

3 years agoFix 0.16.0 changelog, include WIF fix
Steve Myers [Fri, 21 Jan 2022 20:27:36 +0000 (14:27 -0600)]
Fix 0.16.0 changelog, include WIF fix

3 years agoBump version to 0.16.1-dev
Steve Myers [Fri, 21 Jan 2022 20:27:02 +0000 (14:27 -0600)]
Bump version to 0.16.1-dev

3 years agoBump version to 0.16.0 v0.16.0
Steve Myers [Fri, 21 Jan 2022 18:35:45 +0000 (12:35 -0600)]
Bump version to 0.16.0

3 years agoBump version to 0.16.0-rc.1
Steve Myers [Wed, 12 Jan 2022 17:01:32 +0000 (18:01 +0100)]
Bump version to 0.16.0-rc.1

3 years agoMerge bitcoindevkit/bdk#505: Using dust value from rust-bitcoin in ``is_dust``
Steve Myers [Wed, 12 Jan 2022 16:47:58 +0000 (17:47 +0100)]
Merge bitcoindevkit/bdk#505: Using dust value from rust-bitcoin in ``is_dust``

5ac51dfe74c51c83fe270570d7ffc50888cf554f fix and test is_dust (James Taylor)
a0c140bb29ab37103e4a24d296ac6fcea91da69e add doc comment for IsDust trait (James Taylor)
bf5994b14ade1fc0c37d3e3cda6946c26ceea631 fixed fee in test, removed unnecessary comment (James Taylor)
ca682819b396c44c9139086b1537d32b212499a1 using dust value from rust-bitcoin (James Taylor)

Pull request description:

  ### Description

  This PR aims to fix #472 . We can retrieve the dust value for a given ``bitcoin::blockdata::script::Script``, so I adjusted the ``is_dust`` function within the ``IsDust`` trait to receive such a ``&Script``. Thus, the ``is_dust`` function can make the proper comparison.
  Let me know if you think that there could be a better interface than this.

  Furthermore, because this new ``is_dust`` function provides a tighter upper bound on Bitcoin Core's ``GetDustThreshold()``, it actually invalidated a test. In the test, the drain output for a transaction was no longer considered dust and no longer included in the fee. Instead, the drain output was kicked back to the sender, invalidating the asserts in line 3436, 3437 and 3441 in ``src/wallet/mod.rs``. I increased the ``FeeRate`` in the test just enough that the drain output would be small enough to considered dust again and included in the total fee.

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
  * [x] I ran `cargo fmt` and `cargo clippy` before committing

ACKs for top commit:
  afilini:
    ACK 5ac51dfe74c51c83fe270570d7ffc50888cf554f
  notmandatory:
    re ACK 5ac51dfe74c51c83fe270570d7ffc50888cf554f

Tree-SHA512: addf38fe065de581ddfcd3b4e6db92cd35d5bfa8cac78bd08c01f7a01292724a203ef59b09f3f5cd8e0fa0bb6d89efe72afda36efc11ded0424fc8105326af3f

3 years agoMerge bitcoindevkit/bdk#495: Disable reqwest's default features
Steve Myers [Wed, 12 Jan 2022 08:15:23 +0000 (09:15 +0100)]
Merge bitcoindevkit/bdk#495: Disable reqwest's default features

380a4f2588cf9800bde739eb3ba58ca67b785291 Disable reqwest's default features (Thomas Eizinger)

Pull request description:

  ### Description

  By default, reqwest uses openssl for TLS. Any consumer wanting to use
  rustls will thus pull in unnecessary dependencies.

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
  * [x] I ran `cargo fmt` and `cargo clippy` before committing

  #### New Features:

  * ~[ ] I've added tests for the new feature~
  * ~[ ] I've added docs for the new feature~
  * [x] I've updated `CHANGELOG.md`

  #### Bugfixes:

  * ~[ ] This pull request breaks the existing API~
  * ~[ ] I've added tests to reproduce the issue which are now passing~
  * ~[ ] I'm linking the issue being fixed by this PR~

ACKs for top commit:
  notmandatory:
    ACK 380a4f2588cf9800bde739eb3ba58ca67b785291

Tree-SHA512: 17827fdd7656a1e97b4cc302bc3c4907a8493505c798fafd9b15fde12531a32cf60e7d63e878eb2001d6b3e95f7ae3da730e227eb85c73d9de55b56456cfb3a0

3 years agofix and test is_dust
James Taylor [Tue, 11 Jan 2022 23:21:35 +0000 (18:21 -0500)]
fix and test is_dust

3 years agoMerge commit 'refs/pull/508/head' of github.com:bitcoindevkit/bdk
Steve Myers [Tue, 11 Jan 2022 09:08:33 +0000 (10:08 +0100)]
Merge commit 'refs/pull/508/head' of github.com:bitcoindevkit/bdk

3 years agoDisable reqwest's default features
Thomas Eizinger [Tue, 7 Dec 2021 05:34:03 +0000 (16:34 +1100)]
Disable reqwest's default features

By default, reqwest uses openssl for TLS. Any consumer wanting to use
rustls will thus pull in unnecessary dependencies. To make getting started
with bdk and reqwest easier, we add a `reqwest-default-tls` feature
that can be used to activate reqwest's `default-tls` feature. TLS is
necessary for the esplora integration. Adding this feature makes it possible
for people to use bdk with esplora without adding a reqwest dependency to
their manifest.

3 years agoFix CHANGELOG link for v0.15.0 github/release/0.15.0
Steve Myers [Wed, 29 Dec 2021 21:17:11 +0000 (13:17 -0800)]
Fix CHANGELOG link for v0.15.0

3 years agoMerge bitcoindevkit/bdk#511: Fix nightly_docs.yml publish_docs 'Commit' step
Alekos Filini [Wed, 29 Dec 2021 09:59:24 +0000 (10:59 +0100)]
Merge bitcoindevkit/bdk#511: Fix nightly_docs.yml publish_docs 'Commit' step

947a9c29db7c7bb4855c84e70d986b9ab61339d6 Fix nightly_docs.yml publish_docs 'Commit' step (Steve Myers)

Pull request description:

  ### Description

  I forgot to fix in #503 the `nightly_docs.yaml` `publish_docs` `Commit` step to add new files for the path `./docs/.vuepress/public/docs-rs`.

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)

ACKs for top commit:
  afilini:
    ACK 947a9c2

Tree-SHA512: d2bdbcb6cea46ec1949eba6f334acd5dbbe9b4b1323bb4713dc5d7f749666260ab05c29247c35f08c587b46d6bfb765c6a612c6522fd15211c84f7590f8c4748

4 years agoBump version to 0.15.1-dev
Steve Myers [Thu, 23 Dec 2021 18:40:42 +0000 (10:40 -0800)]
Bump version to 0.15.1-dev

4 years agoMerge commit 'refs/pull/510/head' of github.com:bitcoindevkit/bdk
Steve Myers [Thu, 23 Dec 2021 18:34:58 +0000 (10:34 -0800)]
Merge commit 'refs/pull/510/head' of github.com:bitcoindevkit/bdk

4 years agoFix nightly_docs.yml publish_docs 'Commit' step
Steve Myers [Thu, 23 Dec 2021 18:22:55 +0000 (10:22 -0800)]
Fix nightly_docs.yml publish_docs 'Commit' step

4 years agoMerge commit 'refs/pull/504/head' of github.com:bitcoindevkit/bdk
Alekos Filini [Thu, 23 Dec 2021 11:24:52 +0000 (12:24 +0100)]
Merge commit 'refs/pull/504/head' of github.com:bitcoindevkit/bdk

4 years agoMerge commit 'refs/pull/509/head' of github.com:bitcoindevkit/bdk
Alekos Filini [Thu, 23 Dec 2021 11:22:09 +0000 (12:22 +0100)]
Merge commit 'refs/pull/509/head' of github.com:bitcoindevkit/bdk

4 years agoAdd a custom logo to our docs
Alekos Filini [Thu, 23 Dec 2021 10:36:49 +0000 (11:36 +0100)]
Add a custom logo to our docs

As suggested in #497, add our logo to the docs as well

4 years agoMerge commit 'refs/pull/503/head' of github.com:bitcoindevkit/bdk
Alekos Filini [Thu, 23 Dec 2021 10:34:34 +0000 (11:34 +0100)]
Merge commit 'refs/pull/503/head' of github.com:bitcoindevkit/bdk

4 years agoAdd back old logo to static/bdk.svg
Steve Myers [Thu, 23 Dec 2021 05:38:54 +0000 (21:38 -0800)]
Add back old logo to static/bdk.svg

This is required so that old releases of bdk on crates.io won't show a
broken image link. Should be replaced with SVG version of new logo.

4 years agoBump version to 0.15.0 v0.15.0
Steve Myers [Thu, 23 Dec 2021 04:34:38 +0000 (20:34 -0800)]
Bump version to 0.15.0

4 years agoadd doc comment for IsDust trait
James Taylor [Wed, 22 Dec 2021 06:50:17 +0000 (01:50 -0500)]
add doc comment for IsDust trait

4 years agofixed fee in test, removed unnecessary comment
James Taylor [Sun, 19 Dec 2021 23:37:05 +0000 (18:37 -0500)]
fixed fee in test, removed unnecessary comment

4 years agousing dust value from rust-bitcoin
James Taylor [Sun, 19 Dec 2021 07:55:24 +0000 (02:55 -0500)]
using dust value from rust-bitcoin

4 years agoTest WIF from BIP39 words has correct network
mcroad [Sat, 18 Dec 2021 21:34:18 +0000 (15:34 -0600)]
Test WIF from BIP39 words has correct network

4 years agoAdd fix to changelog
mcroad [Sat, 18 Dec 2021 21:13:09 +0000 (15:13 -0600)]
Add fix to changelog

4 years agoSet the correct inner `private_key` network
mcroad [Sat, 18 Dec 2021 21:10:25 +0000 (15:10 -0600)]
Set the correct inner `private_key` network

4 years agoAdd test to ensure WIF uses the correct network
mcroad [Sat, 18 Dec 2021 21:08:16 +0000 (15:08 -0600)]
Add test to ensure WIF uses the correct network

4 years agoUpdate logo
Alekos Filini [Fri, 10 Dec 2021 12:01:21 +0000 (13:01 +0100)]
Update logo

4 years agoBump version to 0.15.0-rc.1
Steve Myers [Sat, 18 Dec 2021 05:40:07 +0000 (21:40 -0800)]
Bump version to 0.15.0-rc.1

4 years ago[ci] Fix publish_docs job
Steve Myers [Sat, 18 Dec 2021 05:28:39 +0000 (21:28 -0800)]
[ci] Fix publish_docs job

4 years agoMerge bitcoindevkit/bdk#501: Only run clippy for the stable rust version
Steve Myers [Thu, 16 Dec 2021 17:28:58 +0000 (09:28 -0800)]
Merge bitcoindevkit/bdk#501: Only run clippy for the stable rust version

57a1185aef82718b8e6ad1272237f4d8f644fdc2 Only run clippy for the stable rust version (Steve Myers)

Pull request description:

  ### Description

  It was decided during the team call today (2021-12-14)  to only run clippy for the stable rust version.

  ### Notes to the reviewers

  This is required to fix the below build issues when running clippy on rust version 1.46.0.

  ```shell
  cargo clippy --all-targets --features async-interface --no-default-features -- -D warnings
  ```

  ```text
  ...

  Checking bitcoincore-rpc v0.14.0
  error: unknown clippy lint: clippy::no_effect_underscore_binding
    --> src/blockchain/mod.rs:88:1
     |
  88 | #[maybe_async]
     | ^^^^^^^^^^^^^^
     |
     = note: `-D clippy::unknown-clippy-lints` implied by `-D warnings`
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unknown_clippy_lints
     = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)

  error: unknown clippy lint: clippy::no_effect_underscore_binding
     --> src/blockchain/mod.rs:220:1
      |
  220 | #[maybe_async]
      | ^^^^^^^^^^^^^^
      |
      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unknown_clippy_lints
      = note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
  ```

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
  * [x] I ran `cargo fmt` and `cargo clippy` before committing

Top commit has no ACKs.

Tree-SHA512: 3fe0d2829415c7276d5339e217cefba1255c14d6d73ec0a5eff2b8072d189ffef56088623ef75f84e400d3d05e546f759b8048082b467a3738885796b3338323

4 years agoOnly run clippy for the stable rust version
Steve Myers [Wed, 15 Dec 2021 06:06:06 +0000 (22:06 -0800)]
Only run clippy for the stable rust version

4 years agoMerge bitcoindevkit/bdk#492: bump electrsd dep to 0.13
Steve Myers [Wed, 1 Dec 2021 17:33:07 +0000 (09:33 -0800)]
Merge bitcoindevkit/bdk#492: bump electrsd dep to 0.13

f7f9bd2409d51354698aa1f24bccba8ca429f279 bump electrsd dep to 0.13 (Riccardo Casatta)

Pull request description:

  <!-- You can erase any parts of this template not applicable to your Pull Request. -->

  ### Description

  bump electrsd dep to 0.13, close #491

ACKs for top commit:
  rajarshimaitra:
    ACK https://github.com/bitcoindevkit/bdk/pull/492/commits/f7f9bd2409d51354698aa1f24bccba8ca429f279
  notmandatory:
    utACK f7f9bd24

Tree-SHA512: 89a8094387896c9296e2f0120d7a2c7419e979049a12fc9a6ae7fe1810b75af43338db235887dd9054a6b52e400491b77f8e006f61451da54aca9635098ab342

4 years agobump electrsd dep to 0.13
Riccardo Casatta [Wed, 1 Dec 2021 07:45:32 +0000 (08:45 +0100)]
bump electrsd dep to 0.13

4 years agoMerge bitcoindevkit/bdk#487: Use "Description" instead of "Descriptive Title" in...
Steve Myers [Wed, 1 Dec 2021 00:20:31 +0000 (16:20 -0800)]
Merge bitcoindevkit/bdk#487: Use "Description" instead of "Descriptive Title" in SoB Issue Template

084ec036a53c94b4a3f7a7e9d6abd7842d99a939 Use "Description" instead of "Descriptive Title" (rajarshimaitra)

Pull request description:

  <!-- You can erase any parts of this template not applicable to your Pull Request. -->

  ### Description

  <!-- Describe the purpose of this PR, what's being adding and/or fixed -->

  The `Descriptive Title` part is already in the issue title, and we can use `Description` in the issue body.

  ### Notes to the reviewers

  <!-- In this section you can include notes directed to the reviewers, like explaining why some parts
  of the PR were done in a specific way -->

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)

ACKs for top commit:
  thunderbiscuit:
    ACK 084ec03.
  notmandatory:
    ACK 084ec036a53c94b4a3f7a7e9d6abd7842d99a939

Tree-SHA512: 2fc365066849033cce056a46bc9e8ab2d931aa45fd2799ebebe3e07bb789c458491ebf2c05e5868bdff63f60dec0657043f3374135dcfbc79a1f89a2562b1883

4 years agoMerge bitcoindevkit/bdk#478: Fix typos in comments
Steve Myers [Wed, 1 Dec 2021 00:19:01 +0000 (16:19 -0800)]
Merge bitcoindevkit/bdk#478: Fix typos in comments

7f8103dd762572f8b0f01514d0c32723d27c61e9 Fix typos in comments (thunderbiscuit)

Pull request description:

  ### Description

  This PR fixes a bunch of small typos in comments. I'm getting acquainted with the codebase and found a few typos just by chance, and ended up going through it with an IDE searching for typos in all files.

  ### Notes to the reviewers

  To be clear, this PR _only addresses typos that are within comments_.

  ### Checklists

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
  * [x] I ran `cargo fmt` and `cargo clippy` before committing

ACKs for top commit:
  notmandatory:
    ACK 7f8103dd762572f8b0f01514d0c32723d27c61e9

Tree-SHA512: eb3f8f21cbd05de06292affd9ef69c21b52022dfdf25c562c8f4d9c9c011f18175dff0c650cb7efcfb2b665f2af80d9a153be3d12327c47796b0d00bfd5d9803

4 years agoMerge bitcoindevkit/bdk#473: release/0.14.0
Steve Myers [Wed, 1 Dec 2021 00:15:21 +0000 (16:15 -0800)]
Merge bitcoindevkit/bdk#473: release/0.14.0

fed4a597284d20cbd69e9c5be5e4586623f70d59 Bump version to 0.14.1-dev (Steve Myers)
c175dd2aae10b0a48430b58e40f0b66fde4bdc48 Bump version to 0.14.0 (Steve Myers)
6b1cbcc4b71c3ec4aa2abb3ab6836f86dbf80c34 Bump version to 0.14.0-rc.1 (Steve Myers)

Pull request description:

  ### Description

  Merge the 0.14.0 bdk release into the master branch.

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
  * [x] I ran `cargo fmt` and `cargo clippy` before committing

Top commit has no ACKs.

Tree-SHA512: 0a897988c47f56e24b7e831cb45ff348b5637ca1a172555e9456539f5b75f263007421d63820b20737bcddb6f4c8077271471ea830e500ca6f88b902502f8186

4 years agoMerge branch 'master' into release/0.14.0 github/release/0.14.0
Steve Myers [Tue, 30 Nov 2021 23:41:41 +0000 (15:41 -0800)]
Merge branch 'master' into release/0.14.0

4 years agoUse "Description" instead of "Descriptive Title"
rajarshimaitra [Tue, 30 Nov 2021 06:56:36 +0000 (12:26 +0530)]
Use "Description" instead of "Descriptive Title"

4 years agoMerge bitcoindevkit/bdk#475: Fix typo in check_miniscript method declaration and use
Steve Myers [Mon, 29 Nov 2021 22:12:38 +0000 (14:12 -0800)]
Merge bitcoindevkit/bdk#475: Fix typo in check_miniscript method declaration and use

b9fc06195beab8eab4c4c6224dc069ebd5106729 Fix typo in check_miniscript method declaration and use (thunderbiscuit)

Pull request description:

  ### Description

  This PR renames the `check_minsicript()` method on the `CheckMiniscript` trait  and its uses throughout the codebase to `check_miniscript()`.

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
  * [x] I ran `cargo fmt` and `cargo clippy` before committing

ACKs for top commit:
  notmandatory:
    ACK b9fc06195beab8eab4c4c6224dc069ebd5106729

Tree-SHA512: cc4406c653cb86f9b15e60c6f87b95c300784d6b2992abc98b3f2db4b02ce252304cc0ab2c638f080b0caf3889e832885eca19e2d6582a3557c8709311b69644

4 years agoMerge bitcoindevkit/bdk#477: Update issue templates
Steve Myers [Mon, 29 Nov 2021 18:24:52 +0000 (10:24 -0800)]
Merge bitcoindevkit/bdk#477: Update issue templates

8534cd39433211733c325a73ca15fe7d569e8401 Update issue templates (Steve Myers)

Pull request description:

  <!-- You can erase any parts of this template not applicable to your Pull Request. -->

  ### Description

  Add bug reporting issue template and template for proposing a "Summer of Bitcoin" project.

  ### Notes to the reviewers

  The SoB template is basically a copy of what Adi created but lightly formatted to work as github issue templates.

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)

Top commit has no ACKs.

Tree-SHA512: 956f7833b7cc1daf4880f74be3886fb17508719af37a247065c463d3f95b1f058bad785590714c609b0e069fe00784bc71cfb0812a79a70c18a2b5bdb22aca6b

4 years agoBump version to 0.14.1-dev
Steve Myers [Sun, 28 Nov 2021 06:13:29 +0000 (22:13 -0800)]
Bump version to 0.14.1-dev

4 years agoBump version to 0.14.0 v0.14.0
Steve Myers [Sun, 28 Nov 2021 05:00:19 +0000 (21:00 -0800)]
Bump version to 0.14.0

4 years agoUpdate issue templates
Steve Myers [Mon, 15 Nov 2021 20:29:28 +0000 (12:29 -0800)]
Update issue templates

4 years agoMerge bitcoindevkit/bdk#471: moving the function wallet_name_from_descriptor from...
Steve Myers [Thu, 25 Nov 2021 04:44:27 +0000 (20:44 -0800)]
Merge bitcoindevkit/bdk#471: moving the function wallet_name_from_descriptor from blockchain/rpc.rs to wallet/mod.rs as it can be useful not only for rpc

2fc81141806ace8f12e5a019c0866f16fa8a02dc moving the function wallet_name_from_descriptor from blockchain/rpc.rs to wallet/mod.rs as it can be useful not only for rpc (Richard Ulrich)

Pull request description:

  ### Description

  Moving the function wallet_name_from_descriptor from rpc.rs to mod.rs
  Since the local cache for compact filters should be separate per wallet, this function can be useful not only for rpc.

  ### Notes to the reviewers

  I thought about renaming it, but waited for opinions on that.

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
  * [x] I ran `cargo fmt` and `cargo clippy` before committing

ACKs for top commit:
  notmandatory:
    re-ACK  2fc8114

Tree-SHA512: d5732e74f7a54f54dde39fff77f94f12c611a419bed9683025ecf7be95cde330209f676dfc9346ebcd29194325589710eafdd1d533e8073d0662cb397577119f

4 years agoMerge bitcoindevkit/bdk#461: Restructure electrum/esplora sync logic
Steve Myers [Thu, 25 Nov 2021 03:48:19 +0000 (19:48 -0800)]
Merge bitcoindevkit/bdk#461: Restructure electrum/esplora sync logic

9c5770831de58760066dbbb26c0785632dde4991 Make stop_gap a parameter to EsploraBlockchainConfig::new (LLFourn)
0f0a01a742448fa9db67752722fed7d1c028117b s/vin/vout/ (LLFourn)
1a64fd9c9595566366cfe96cc20d8ba2f4da1bd3 Delete src/blockchain/utils.rs (LLFourn)
d3779fac73321f41b82897e6ab69708c957212b2 Fix comments (LLFourn)
d39401162fb72a9a02999908ac0347685d8861a5 Less intermediary data states in sync (LLFourn)
dfb63d389b2804cb55da60de0d8fcad985d50e5c s/observed_txs/finished_txs/g (LLFourn)
188d9a4a8b502b3f681f4c83fd9933b9a952e42c Make variable names consistent (LLFourn)
5eadf5ccf9722aa331008304221e981d01bca1c1 Add some logging to script_sync (LLFourn)
aaad560a91872318890208c4b3d5cb73a63029a8 Always get up to chunk_size heights to request headers for (LLFourn)
e7c13575c88be4fce1f407eae3710cb06c5db039 Don't request conftime during tx request (LLFourn)
808d7d8463c56cbcda0bd55a5eba422cf5080ce7 Update changelog (LLFourn)
732166fcb689ad666eab02a4bb28c33018f7b819 Fix feerate calculation for esplora (LLFourn)
3f5cb6997f8bf0c889747badb9498a402ecf96a4 Invert dependencies in electrum sync (LLFourn)

Pull request description:

  ## Description

  This PR does dependency inversion on the previous sync logic for electrum and esplora captured in the trait `ElectrumLikeSync`. This means that the sync logic does not reference the blockchain at all. Instead the blockchain asks the sync logic (in `script_sync.rs`) what it needs to continue the sync and tries to retrieve it.

  The initial purpose of doing this is to remove invocations of `maybe_await` in the abstract sync logic in preparation for completely removing `maybe_await` in the future. The other major benefit is it gives a lot more freedom for the esplora logic to use the rich data from the responses to complete the sync with less HTTP requests than it did previously.

  ## List of changes

  - sync logic moved to `script_sync.rs` and `ElectrumLikeSync` is gone.
  - esplora makes one http request per sync address. This means it makes half the number of http requests for a fully synced wallet and N*M less requests for a wallet which has N new transactions with M unique input transactions.
  - electrum and esplora save less raw transactions in the database. Electrum still requests input transactions for each of its transactions to calculate the fee but it does not save them to the database anymore.
  - The ureq and reqwest blockchain configuration is now unified into the same struct. This is the only API change. `read_timeout` and `write_timeout` have been removed in favor of a single `timeout` option which is set in both ureq and reqwest.
  - ureq now does concurrent (parallel) requests using threads.
  - An previously unnoticed bug has been fixed where by sending a lot of double spending transactions to the same address you could trick a bdk Esplora wallet into thinking it had a lot of unconfirmed coins. This is because esplora doesn't delete double spent transactions from its indexes immediately (not sure if this is a bug or a feature). A blockchain test is added for this.
  - BONUS: The second commit in this PR fixes the feerate calculation for esplora and adds a test (the previous algorithm didn't work at all). I could have made a separate PR but since I was touching this file a lot I decided to fix it here.

  ## Notes to the reviewers

  - The most important thing to review is the the logic in `script_sync.rs` is sound.
  - Look at the two commits separately.
  - I think CI is failing because of MSRV problems again!
  - It would be cool to measure how much sync time is improved for your existing wallets/projects. For `gun` the speed improvements for modest but it is at least hammering the esplora server much less.
  - I noticed the performance of reqwest in blocking is much worse in this patch than previously. This is because somehow reqwest is not re-using the connection for each request in this new code. I have no idea why. The plan is to get rid of the blocking reqwest implementation in a follow up PR.

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits

ACKs for top commit:
  rajarshimaitra:
    Retested ACK https://github.com/bitcoindevkit/bdk/pull/461/commits/a630685a0ab95604cadbb423f65d8358ba4bc4e4

Tree-SHA512: de74981e9d1f80758a9f20a3314ed7381c6b7c635f7ede80b177651fe2f9e9468064fae26bf80d4254098accfacfe50326ae0968e915186e13313f05bf77990b

4 years agoFix typos in comments
thunderbiscuit [Tue, 23 Nov 2021 18:40:58 +0000 (13:40 -0500)]
Fix typos in comments

4 years agoFix typo in check_miniscript method declaration and use
thunderbiscuit [Tue, 23 Nov 2021 17:59:08 +0000 (12:59 -0500)]
Fix typo in check_miniscript method declaration and use

4 years agoMerge branch 'master' into sync_pipeline
LLFourn [Tue, 23 Nov 2021 00:28:18 +0000 (11:28 +1100)]
Merge branch 'master' into sync_pipeline