Skip to content

Revert "Remove unnecessary m/ prefix requirement"#2674

Closed
tcharding wants to merge 2 commits intorust-bitcoin:masterfrom
tcharding:04-09-revert-2451
Closed

Revert "Remove unnecessary m/ prefix requirement"#2674
tcharding wants to merge 2 commits intorust-bitcoin:masterfrom
tcharding:04-09-revert-2451

Conversation

@tcharding
Copy link
Copy Markdown
Member

This reverts commit ccbd09d.

There were merits to the change in #2451, and the bip is somewhat unclear on the matter, however the change breaks our ability to parse output from Bitcoin Core RPC call getaddressinfo.

For the release to progress we need to revert this change.

This reverts commit ccbd09d.

There were merits to the change in rust-bitcoin#2451, and the bip is somewhat
unclear on the matter, however the change breaks our ability to parse
output from Bitcoin Core RPC call `getaddressinfo`.

For the release to progress we need to revert this change.
@tcharding tcharding added the port-0.32.x Needs porting to 0.32.x branch label Apr 8, 2024
@github-actions github-actions bot added C-bitcoin PRs modifying the bitcoin crate test labels Apr 8, 2024
@coveralls
Copy link
Copy Markdown

coveralls commented Apr 8, 2024

Pull Request Test Coverage Report for Build 8608077559

Details

  • 54 of 54 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.005%) to 83.132%

Totals Coverage Status
Change from base Build 8607427232: 0.005%
Covered Lines: 19191
Relevant Lines: 23085

💛 - Coveralls

@apoelstra
Copy link
Copy Markdown
Member

CI failure is real.

In the integration test of the new PSBT signing API the derivation path
strings do not have a leading 'm/'.

The PR that introduced the new API must have overlapped with the one
that removed the prefix from the `bip32` modules `DerivationPath` string
parsing because when we reverted that change these paths were not
included.
@tcharding
Copy link
Copy Markdown
Member Author

Ha, your too quick today. Fixed now.

@tcharding
Copy link
Copy Markdown
Member Author

I had a go at explaining why patch 2 is needed, its a guess though.

@apoelstra
Copy link
Copy Markdown
Member

I don't think it's correct that the first part must be m. This makes it impossible to express partial paths (or paths which start with fingerprints; but we don't support this anyway).

@tcharding
Copy link
Copy Markdown
Member Author

tcharding commented Apr 9, 2024

I don't think it's correct that the first part must be m.

I agree but was just going to revert for this release and fix it in the next one (hence #2673). Would you prefer to see it fixed this release?

@apoelstra
Copy link
Copy Markdown
Member

I agree but was just going to revert for this release and fix it in the next one (hence #2673). Would you prefer to see it fixed this release?

I would prefer that we be able to parse with or without a m in this release. Not clear what "fix" will mean but at least for now let's be able to parse all the paths that are out there.

@tcharding
Copy link
Copy Markdown
Member Author

tcharding commented Apr 10, 2024

Replaced by #2677

@tcharding tcharding closed this Apr 10, 2024
@tcharding tcharding deleted the 04-09-revert-2451 branch April 12, 2024 19:40
apoelstra added a commit that referenced this pull request Apr 15, 2024
830c1e9 Allow m prefix in derivation paths (Tobin C. Harding)

Pull request description:

  Recently in #2451 we disallowed bip32 derivation paths with the leading 'm' variable.

  There is some confusion as to what exactly the bip specifies however Bitcoin Core RPC call `getaddressinfo` returns a derivation path with a leading "m/". This means we need to be able to parse it irrespective of what the bip says.

  Be more liberal in what we accept as a derivation path, including both with and without the leading 'm/'.

  Leave the full investigation of the bip to a later date.

  Change back some of the test strings as makes sense and include test strings to showcase the full current behaviour.

  This PR replaces #2674.

ACKs for top commit:
  apoelstra:
    ACK 830c1e9
  sanket1729:
    ACK 830c1e9
  junderw:
    ACK 830c1e9

Tree-SHA512: 7a4fccd49cb8cd91a6c8db51d758ae116d9d2e98fead7b87520ca302022b37ddbcf3f85453941c5f336f8e934ad224beba99527dc29ce8368fbb1f25508c1615
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-bitcoin PRs modifying the bitcoin crate port-0.32.x Needs porting to 0.32.x branch test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants