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

Can we remove policy module and use rust-miniscript ? #1382

Open
notmandatory opened this issue Mar 21, 2024 · 5 comments · May be fixed by #1786
Open

Can we remove policy module and use rust-miniscript ? #1382

notmandatory opened this issue Mar 21, 2024 · 5 comments · May be fixed by #1786
Assignees
Labels
discussion There's still a discussion ongoing
Milestone

Comments

@notmandatory
Copy link
Member

notmandatory commented Mar 21, 2024

Can we use the new planning module now?

@notmandatory notmandatory added this to BDK Mar 21, 2024
@notmandatory notmandatory converted this from a draft issue Mar 21, 2024
@notmandatory notmandatory moved this to Discussion in BDK Mar 21, 2024
@notmandatory notmandatory added the discussion There's still a discussion ongoing label Mar 21, 2024
@notmandatory notmandatory added this to the 1.0.0-alpha milestone Mar 21, 2024
@notmandatory notmandatory self-assigned this Mar 21, 2024
@casey-bowman
Copy link
Contributor

casey-bowman commented Mar 22, 2024

It seems there is related work @tcharding is doing in rust-psbt, too. See his comment here.

I hope to learn more as I delve into the code myself this weekend. Hopefully I can contribute at least some review on the move to the planning module.

Last night I upgraded a POC on Jupyter notebook which I'd put together based on @danielabrozzoni's Multisigs & Carrots workshop repo. Now it works with BDK 1.0.0-alpha.7. The POC creates a taproot output with multiple timelocks for a channel factory. In parallel, the participants sign a PSBT with this taproot as an input. The PSBTs are combined and the result finalized. I tested it successfully on regtest using esplora this morning. I had to separate into two lines the creation of each policy from its subsequent compilation into miniscript, to make the type Miniscript<String, Tap>, explicit.

I especially value being able to work with policies in a composable fashion and earlier this week wrote up a plan to make templates for policies and their associated extended public keys. Yesterday I noticed a similar idea regarding templates for descriptors that was brought up in January as part of a draft BIP that would let PSBTs convey descriptors without transaction info. My sense is that this would be good at the level of any sub-policy, to let policies be conveyed by PSBTs.

Anyway I'll go back to lurking, but I hope eventually to contribute.

@ValuedMammal
Copy link
Contributor

@casey-bowman You might have some good ideas for a future book of bdk tutorial about spending policies.

@casey-bowman
Copy link
Contributor

@casey-bowman You might have some good ideas for a future book of bdk tutorial about spending policies.

Definitely. I'd like to give back somehow, and the tutorial looks like a great resource in the making. I see there's mention of a DescriptorTemplate in it. As I work in implementing and playing around with what I envision for the policy templates, I hope to share some of these ideas and make them congruent with existing descriptor templates.

@notmandatory
Copy link
Member Author

I'm moving this out of the 1.0 milestone since the existing policy mechanism works and switching to the new planning module will take too much time to implement and test right now.

@notmandatory notmandatory removed this from the 1.0.0-alpha milestone Apr 15, 2024
@danielabrozzoni
Copy link
Member

I'm moving this out of the 1.0 milestone since the existing policy mechanism works and switching to the new planning module will take too much time to implement and test right now.

Agreed, I'm also not sure if it would make sense to implement the planning module separately from the txbuilder overhaul.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion There's still a discussion ongoing
Projects
Status: Discussion
Development

Successfully merging a pull request may close this issue.

4 participants