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

Support for sortedmulti_a #320

Open
dr-orlovsky opened this issue Mar 22, 2022 · 19 comments
Open

Support for sortedmulti_a #320

dr-orlovsky opened this issue Mar 22, 2022 · 19 comments
Labels
good first issue Good for newcomers
Projects
Milestone

Comments

@dr-orlovsky
Copy link
Contributor

The support is part of Bitcoin core, but absent here

@dr-orlovsky dr-orlovsky changed the title Support for sorderdmulti_a Support for sortedmulti_a Mar 22, 2022
@sanket1729
Copy link
Member

sanket1729 commented Mar 22, 2022

Note that this would only be supported at the top level. Supporting it at the miniscript level is not possible and is currently not in spec. Same reason why miniscript only has multi and no sorted_multi

@sanket1729 sanket1729 added this to the 8.0.0 milestone Mar 22, 2022
@dr-orlovsky dr-orlovsky added this to Todo in Taproot Apr 1, 2022
@notmandatory
Copy link
Contributor

Is it possible to remove this issue from the 8.0.0 milestone so that the next release can go out sooner? Projects like bdk need #450 before we can update to rust-bitcoin 0.29.

@apoelstra
Copy link
Member

I would also like #478 -- let's bump this to the next milestone so we can do a quick release. Ok by you @sanket1729 ?

@apoelstra
Copy link
Member

Oh, actually I don't care (I'm working on elements-miniscript but it is just a fork off the git repo, it doesn't use crates.io versions). But I agree with the sentiment that we ought to have a current release that matches rust-bitcoin.

@sanket1729
Copy link
Member

In future releases, we should automatically release a new version of rust-miniscript whenever there is a new version of rust-bitcoin. Other normal feature releases of rust-miniscript can go at their own pace.

@apoelstra
Copy link
Member

I will prepare a new release ... but apparently we have 71 PRs since the last one so it may take me a while to make a changelog!

@sanket1729
Copy link
Member

@apoelstra, I think I made some progress on changelog

@sanket1729
Copy link
Member

Let me check my local branh

@sanket1729
Copy link
Member

@apoelstra, there is already a changelog at 6f3c967

@sanket1729 sanket1729 added low-priority Low priority issues that don't require urgent attention good first issue Good for newcomers and removed low-priority Low priority issues that don't require urgent attention labels Jan 17, 2023
@sanket1729
Copy link
Member

Adding top-level support for sortedmulti_a is certainly something we want to do. But something I don't have the time for now. Perhaps, a simple good first issue for someone who is looking for intermediate coding.

@ameya-deshmukh
Copy link

@sanket1729 I'd love to pick this up! Can I?

@sanket1729
Copy link
Member

Sure, feel free to ask any questions here

@Harshit933
Copy link
Contributor

Hello @sanket1729 @apoelstra I would like to take up this issue, Although I am still learning about descriptors, this would be a good issue to apply my knowledge.

@apoelstra
Copy link
Member

@Harshit933 yep, this looks like a fairly self-contained issue. You can look at the existing tr descriptor for how Taproot works, and the existing sortedmulti descriptor to see what a top-level "sorted multisig" descriptor looks like.

@Harshit933
Copy link
Contributor

I read some things about sortedmulti_a. Although the documentation around it is quite less. There are somethings that I wanted to ask.

  • Does sortedmulti_a supports only x-only public keys? If this is true why is this descriptor only for taproot
  • Like in the taproot descriptor we can have multiple trees in it. Does sortedmulti_a also can have multiple trees?

And this is a basic one :

  • How miniscript and descriptor related? From reading the miniscript module I am thinking that miniscript is used as blocks for building descriptors. But I am still confused as how this works

@apoelstra
Copy link
Member

  • Does sortedmulti_a supports only x-only public keys? If this is true why is this descriptor only for taproot

Only Taproot has the CHECKSIGADD opcode. If you are using the old CHECKMULTISIG then the existing sortedmulti will do you.

  • Like in the taproot descriptor we can have multiple trees in it. Does sortedmulti_a also can have multiple trees?

No, sortedmulti is only a top-level thing.

How miniscript and descriptor related? From reading the miniscript module I am thinking that miniscript is used as blocks for building descriptors. But I am still confused as how this works

(Output) descriptors describe the script part of Bitcoin outputs (the other part of an output is a BTC amount, which stands on its own). They indicate whether the output is Taproot, segwit v0, P2SH, P2WPKH, etc etc. For descriptor types that have a freeform script (p2sh, p2wsh, taproot, etc) Miniscript sits inside and describes the script itself.

@Harshit933
Copy link
Contributor

Only Taproot has the CHECKSIGADD opcode. If you are using the old CHECKMULTISIG then the existing sortedmulti will do you.

Is there any website where I can find all the opcode?

(Output) descriptors describe the script part of Bitcoin outputs (the other part of an output is a BTC amount, which stands on its own). They indicate whether the output is Taproot, segwit v0, P2SH, P2WPKH, etc etc. For descriptor types that have a freeform script (p2sh, p2wsh, taproot, etc) Miniscript sits inside and describes the script itself.

Thanks, this clears a lot of things.

@sanket1729
Copy link
Member

@Harshit933, you can cross reference bitcoin core implementation for sortedmulti_a, while attempting this PR. That should serve as a good starting point for what needs to be done.

@Harshit933
Copy link
Contributor

@Harshit933, you can cross reference bitcoin core implementation for sortedmulti_a, while attempting this PR. That should serve as a good starting point for what needs to be done.

Thanks for the suggestion. I have looked inside the core implementation of sortedmulti_a and I have some questions inside #641

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
Development

No branches or pull requests

6 participants