Repository navigation
bdk_turso 0.3.1
Added
- Default B-tree indexes for lookup columns:
block(hash),txout(script),anchor(txid),anchor(block_hash), andkeychain_script_pubkey(script)with thewalletfeature.Store::migrate()creates them for new and existing databases. Options::with_transaction_behaviorselectsDeferred,Immediate,Exclusive, orConcurrenttransactions for every store operation, andTransactionBehavioris re-exported from Turso.Concurrentswitches local databases to MVCC journal mode;Store::migrateandStore::migrate_tostill useDeferredfor DDL.Error::ConflictingOptionsreports option combinations that Turso cannot run, such aswith_multiprocess_waltogether withTransactionBehavior::Concurrent.- Reproducible benchmark suite comparing
bdk_turso,bdk_sqlite, andbdk_redbon wallet changeset reads and writes, concurrent writes at several writer counts, database opening, and on-disk storage. Sample and batch sizes, writer counts, dataset shape, Turso options, and enabled backends are configurable through an optionalbenches/config.tomlor--config. Results are published in BENCHMARK.md and are not run or thresholded in CI.
Changed
Store::migrate()builds the new lookup indexes on existing databases the next time it runs. Expect a one-time index-build cost and extra disk usage proportional to table size; the indexes are additive, so older versions can still open the database.Store::migrate_tonow copies user indexes as well as tables and rows. It returnsError::Migrationif the destination already has an index with the same name but a different definition, rather than leaving the destination without the index.- Expanded documentation for every experimental Turso option with when to use it, how it affects query behavior, and whether it changes the crate's schema or persistence queries. Added tests that run the crate's read and write queries with the experimental options enabled.
- The wallet and transaction examples now load settings from a shared
examples/config.toml.examples/example.tomlis the committed template; the local file is ignored by git, and a missing or invalid configuration stops with an actionable error.
Fixed
- PSBT persistence now fails closed with
Error::PsbtRequiresEncryptionunless the store was opened with local at-rest encryption. Stores without encryption, stores created with unknown opening options, and remote stores are rejected. - Local and remote Turso connections now use a five-second busy timeout. Concurrent writers wait for the write lock instead of failing immediately with a
Busyerror, matching the default behavior ofbdk_sqlite's SQLx connections.
crates.io: https://crates.io/crates/bdk_turso/0.3.1
docs.rs: https://docs.rs/bdk_turso/0.3.1