Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEMO: Depend on a new psbt-v0 crate #1621

Closed

Conversation

tcharding
Copy link
Contributor

@tcharding tcharding commented Sep 20, 2024

EDIT: Please see simpler idea posted below before bothering to read this.

TL;DR What if we created apsbt crate in the github.com/rust-bitcoin org?

This is just an idea, raising a PR to see if you guys would likely get behind it and/or involved.

This PR shows the diff required to make it work. The diff is on purpose verbose, it could be made much smaller. I did it like this as a demo to make sure I got everything.

I've hacked up a new psbt-v0 crate with the goals of:

  • Create crate directly from rust-bitcoin v0.32.2 and rust-miniscript 12.0.0 with minimal changes so it can be diff'ed an verified.
  • Be a drop in replacement for the psbt modules in bitcoin and miniscript.

This hopes to enable the following:

  • Make development on PSBT separate from development on rust-bitcoin
  • Get a different set of maintainers involved
  • Make development of PSBT crate more rapid, more fun, and more productive

My claim is that PSBT has different stakeholders to other code in bitcoin and miniscript and the fact that it lives in these two crates (specifically bitcoin) makes it harder to attract devs and harder to patch than necessary.

github: https://github.com/tcharding/rust-psbt-v0

Potential Roadmap:

v0.1.0 would be the drop in replacement with minimal changes. Next we could potentially do:

  • Re-write signing API
  • Implement PSBTv2
  • Re-write the whole thing with what we've learned over the last few years

notes on testing

If you want to prove this works you'll need something like

I've hacked up a new `psbt-v0` crate with the goals of:

- Create crate directly from `rust-bitcoin v0.32.2` and `rust-miniscript
  12.0.0` with minimal changes so it can be diff'ed an verified.
- Be a drop in replacement for the `psbt` modules in `bitcoin` and `miniscript`.

This hopes to enable the following:

- Make development on PSBT separate from development on `rust-bitcoin`
- Get a different set of maintainers involved
- Make development of PSBT crate more rapid, more fun, and more productive

My claim is that PSBT has different stakeholders to other code in
`bitcoin` and `miniscript` and the fact that it lives in these two
crates (specifically `bitcoin`) makes it harder to attract devs and
harder to patch than necessary.

github: https://github.com/tcharding/rust-psbt-v0

Potential Roadmap:

`v0.1.0` would be the drop in replacement with minimal changes. Next
we could perhaps do:

- Re-write signing API
- Implement PSBTv2
- Re-write the whole thing with what we've learned over the last few
  years
@tcharding tcharding changed the title Depend on a new psbt-v0 crate DEMO: Depend on a new psbt-v0 crate Sep 20, 2024
@tcharding
Copy link
Contributor Author

Had an even simpler idea:

  1. Re-expose bitcoin::psbt::* from miniscript, and release in minor version
  2. Patch bdk to only use PSBT stuff from miniscript (internal change only)
  3. Create psbt-v0 which contains stuff imported from bitcoin::psbt
  4. Patch miniscript to use psbt-v0, release in minor version [0]
  5. Deprecate bitcoin::psbt and release minor version, having no effect on bdk - WIN

[0] - Open question, is step 4 semver compliant, and if not can we fudge it like this since we know the code is the same?

@apoelstra
Copy link

Step 4 unfortunately will not be semver-compliant, because it will change a psbt re-export which is compatible with rust-bitcoin to one that isn't.

@tcharding
Copy link
Contributor Author

hmm, yeah and this would break builds for other people. Drats.

@tcharding
Copy link
Contributor Author

Demo not needed now, crate is live.

@tcharding tcharding closed this Sep 23, 2024
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.

2 participants