]> Untitled Git - bdk/commitdiff
Merge bitcoindevkit/bdk#1836: Fix SQLite panic when syncing many UTXOs by enabling... github/release/0.30 v0.30.2
authorSteve Myers <steve@notmandatory.org>
Fri, 21 Feb 2025 22:43:50 +0000 (16:43 -0600)
committerSteve Myers <steve@notmandatory.org>
Fri, 21 Feb 2025 22:45:02 +0000 (16:45 -0600)
7c4850f240ccc9223eb7eac0d6a3422dd4124daf release: bump version to 0.30.2 (Steve Myers)
10655114e829d4d196c7aca0e5780af7ad1595b9 fix(sqlite): set connection journal_mode to WAL and busy_timeout to 5000 ms (Steve Myers)
344fa3ff25044555a619a7509349c6f0ff45d2c6 test: repro bug with large num utxos and sqlite (Steve Myers)
957b219c8291f238058404277d7e55b75755c006 deps: downgrade dev dep electrsd to 0.24.0 (Steve Myers)
3b388927cf843ab666745c08576ccb3df5fffa35 ci: fix pinned rustls and add ci/pin-msrv.sh (Steve Myers)

Pull request description:

  ### Description

  fixes #1827
  replaces #1828

  I changed the `SqliteDatabase` struct to create new  rusqlite `Connection`s with [WAL](https://www.sqlite.org/wal.html) journal mode enabled and 5000ms busy_timeout. This prevents a large sync from trying to start and commit a batch (db transaction) while the initial non-batch connection is still busy writing it's data.

  ### Notes to the reviewers

  I commented out the `electrum::test_electrum_large_num_utxos` test since it takes an hour to run. Before the fix in thie PR it would also fail with only 10 large TX.

  The dev dependency and pinning changes were required to run the new, and other tests.

  ### Changelog notice

  - Fix SQLite panic when syncing many UTXOs

  ### 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:

  * [ ] This pull request breaks the existing API
  * [x] 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:
  ValuedMammal:
    utACK 7c4850f2
  nymius:
    tACK 7c4850f
  evanlinjin:
    utACK 7c4850f240ccc9223eb7eac0d6a3422dd4124daf

Tree-SHA512: ad10b8b4354bdcbc5b9aeb1d06f68f30501dcf4ed687b387f514ff7de5e034b729dbdf25f59a8b269e562f0dab8992aa187bf187e3e0adf585838ae96afb40cc


Trivial merge