Skip to content

fix: land the remaining stacked store fixes and fuzz coverage on master - #31

Merged
portlandhodl merged 8 commits into
masterfrom
merge/store-fixes-into-master
Oct 21, 2026
Merged

portlandhodl merged 8 commits into
masterfrom
merge/store-fixes-into-master

Conversation

@portlandhodl

Copy link
Copy Markdown
Collaborator

Summary

PRs #27–#30 were merged into their stacked base branches, but the stack was never merged into master. This PR lands the remaining commits:

The anchor/local-chain decoupling from #26 is already on master.

Verification

  • DATABASE_TEST_URL=postgres://... cargo test --all-targets: 63 lib + 2 integration tests passed.
  • cargo clippy --all-targets -- -D warnings: passed.
  • cargo +nightly clippy --manifest-path fuzz/Cargo.toml --all-targets -- -D warnings: passed.
  • All four fuzz targets ran locally for 10 seconds each with no findings.
  • The Fuzz workflow already passed on the top of this stack.

Also

Re-enabled the repository's CI workflow, which GitHub had disabled for inactivity, so this PR and future changes get the full test suite.

portlandhodl and others added 8 commits October 21, 2026 11:45
bdk_core anchors are ordered over block height, block hash, and confirmation time. Key anchor_tx by the full identity and verify the stored columns against the JSON payload on load. Distinct anchors are no longer collapsed, and a stale changeset can no longer overwrite a newer confirmation time.
Replace Row::get (which unwraps decode failures) with try_get and map failures to BdkSqlxError::QueryError on both backends. Read SQLite integer columns as i64 and range-check them, so oversized height/vout/last_revealed/block_height values and wrong storage classes fail the load instead of panicking.
DescriptorExt::descriptor_id() unwraps at_derivation_index(0), which panics for multipath keys and hardened derivation. Validate those shapes first and derive index 0 fallibly, returning BdkSqlxError::UnsupportedDescriptor so a corrupt or caller-supplied changeset cannot panic the process.
…criptors

Add a cargo-fuzz crate with four targets: changeset persist/load idempotence, corrupt SQLite row decoding, full anchor identity, and descriptor-id validation. Add a Fuzz workflow that builds and lints the fuzz crate and runs each target for 90 seconds on PRs (300 seconds on the weekly schedule).
test: add fuzz targets and CI for store boundaries
Remove the unused sqlx chrono/uuid features, which pulled uuid 1.28 and required Rust 1.89 despite the crate's 1.88 MSRV. Drop the example's bdk_electrum dependency, which transitively pinned vulnerable webpki-roots 0.25; the example now demonstrates persistence and wallet reloading without a network sync.
@portlandhodl
portlandhodl merged commit 6b57441 into master Oct 21, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant