---
# System prepended metadata

title: 2025-09-18 Update

---

2025-09-18 Update

### Removed `anyhow` dependency in Blockchain Commons library stack

- While some of our crates already used `thiserror` version 1 in certain cases, ten of the library crates in our stack used `anyhow` for ad hoc, string-based error reporting, of which four foundational crates are directly or indirectly dependncies of the `zewif`, `zewif-zcashd`, `zewif-zingo`, and `zmigrate` crates:
    - bc-envelope
    - bc-components
    - dcbor
    - bc-crypto
- All library crates now exclusively use `anyhow` version 2 to report semantic errors. All such crates have had version number bumps and have been updated on https://crates.io.
- This was necessary so `zewif` crate, based on our stack, would not have (directly or indirectly) any dependency on `anyhow`, and all errors thrown are now relatively easy to deal with programatically and to internationalize. Our app-level crates (CLI tools, servers) still use `anyhow` as that is its best use. With these modifications, Zcash can adopt any Blockchain Commons library crates without re-introducing dependencies on `anyhow`.

### zewif

- Replaced the blanket `anyhow` dependency with a crate-local `Error` enum powered by `thiserror` v2, plus a `Result` alias, so every module now reports precise failure modes instead of opaque `anyhow::Error` values (`src/error.rs`, widespread signature updates across `src/*`).
- Updated all serialization helpers and macros (`blob_macro.rs`, `data_macro.rs`, `sapling_*`, `orchard_*`, etc.) to propagate the new typed errors and removed the no-longer-needed `StringContext` shim once conversions were in place.
- Aligned dependency metadata and removed the crate’s private `Cargo.lock`, relying on the workspace lock instead.

### zewif-zcashd

- Introduced a comprehensive `Error` type with contextual variants covering parser underflow, invalid CompactSize encodings, UFVK lookup failures, command execution errors, and more; added `ResultExt`/`OptionExt` helpers to maintain ergonomic error enrichment (`src/error.rs`).
- Rewrote the parser macro and supporting modules so every parser returns the new `Result`, eliminating `anyhow` from the parsing stack and improving diagnostics when decoding Berkeley DB wallet dumps (`src/parser/parse_macro.rs`, `src/zcashd_wallet/parseable_types.rs`, `src/zcashd_parser.rs`, etc.).
- Cleaned up obsolete scaffolding (e.g., removed the stale `Cargo.lock`, deprecated registry helpers) and refactored the migration code to surface the richer errors while trimming redundant warnings.

### zewif-zingo

- Dropped `anyhow` in favor of a focused `ParseError` enum implemented with `thiserror` v2, giving explicit variants for unsupported dump versions, malformed strings, IO failures, and mnemonic entropy errors (`src/error.rs`).
- Replaced the borrowed `zewif` parser stack with a lightweight `BinaryReader` wrapper that handles length-checked reads and contextualizes IO errors, yielding clearer parsing boundaries (`src/binary.rs`, `src/zingo_parser.rs`, `src/wallet_capability.rs`).
- Adjusted `Cargo.toml` and module exports so the crate builds solely on the new typed errors while continuing to service the CLI ingest path.

### zmigrate

- Overhauled the CLI tooling to match the typed-error stack: refreshed the zcashd dump script to validate Berkeley DB tooling before execution and pipe the new `--from/--to` interface (`run_zcashd_dumps.sh`), and re-enabled the Zingo ingestion path with a guarded `dump`-only workflow (`src/main.rs`, `src/zingo_cmd.rs`).
- Refreshed the regression suite to consume the updated APIs from `zewif`/`zewif-zcashd`, improving reporting for migration coverage and formatting the generated summaries (`tests/test_*`).
- Added an opt-in `zingo` Cargo feature so Zingo dependencies, scripts, and tests stay inactive unless explicitly requested, keeping default builds lean (`Cargo.toml`, `run_zingo_dumps.sh`, test modules).