• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

rust-bitcoin / rust-bitcoin / 14755418885
83%

Build:
DEFAULT BRANCH: master
Ran 30 Apr 2025 01:12PM UTC
Jobs 1
Files 131
Run time 78min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

30 Apr 2025 01:12PM UTC coverage: 84.188% (-0.02%) from 84.209%
14755418885

push

github

apoelstra
Merge rust-bitcoin/rust-bitcoin#4387: bip32: overhaul error types and add a "maximum depth exceeded" error

b9a12043b bip32: return error when trying to derive a path too deep (Andrew Poelstra)
73781e047 bip32: rename Error to ParseError (Andrew Poelstra)
a66ad97fb bip32: split InvalidChildNumber and InvalidChildNumberFormat out of error (Andrew Poelstra)
a891fb9b7 bip32: remove unused error variants (Andrew Poelstra)
f0a237c00 bip32: split out DerivationError from the main error enum (Andrew Poelstra)
32d96f6c3 bip32: make Xpriv::new_master be infallible (Andrew Poelstra)
0e5e021b6 bip32: change several cryptographically unreachable paths to expects (Andrew Poelstra)

Pull request description:

  This PR makes a first pass at splitting the `bip32::Error` type into multiple distinct types -- one for derivation (which can fail if you try to derive a hardened child of an xpub, or if you try to derive too many layers), one for parsing child numbers or derivation paths, and one for parsing xkeys. Along the way it cleans up a ton of weird things and typos, e.g. the psbt `GetKeyError` having an unused `Bip32` variant whose display text references "bip 23".

  Because all the error types get renamed, every part of this PR is an API break, but only the last commit is a "real" API break which uses the new `DerivationError::MaximumDepthExceeded` error variant to return an error when trying to derive a path of length 256 or longer. This means that `Xpriv::derive_xpriv` again returns an error result.

  I will make a simpler version of this last commit suitable for backporting to 0.32.x. (In 0.32.x `Xpriv::derive_priv` returns an error, so we can change it to error out on max-depth-exceeded without breaking the API. Sadly most users are likely to be ... (continued)

80 of 111 new or added lines in 2 files covered. (72.07%)

2 existing lines in 1 file now uncovered.

22873 of 27169 relevant lines covered (84.19%)

16479.84 hits per line

Uncovered Changes

Lines Coverage ∆ File
28
85.19
-0.9% bitcoin/src/bip32.rs
3
86.38
0.05% bitcoin/src/psbt/mod.rs

Coverage Regressions

Lines Coverage ∆ File
2
85.19
-0.9% bitcoin/src/bip32.rs
Jobs
ID Job ID Ran Files Coverage
1 14755418885.1 30 Apr 2025 01:12PM UTC 131
84.19
GitHub Action Run
Source Files on build 14755418885
  • Tree
  • List 131
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #14755418885
  • ee037042 on github
  • Prev Build on master (#14743039472)
  • Next Build on master (#14756442335)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc