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

Is there any guide to read the code? #342

Closed
huahuahu opened this issue Nov 19, 2019 · 2 comments
Closed

Is there any guide to read the code? #342

huahuahu opened this issue Nov 19, 2019 · 2 comments

Comments

@huahuahu
Copy link

Thanks for the code.
Hi, I am new to blockchain, is there any guide about the code? For examples, the UML diagram or how to use the code?

@jonasnick
Copy link
Contributor

jonasnick commented Nov 19, 2019

Hi, did you have a look at the documentation (https://docs.rs/bitcoin, for example address creation)? There's also this issue demonstrating how to sign a transaction: #294. And @stevenroose hal command line tool (https://github.com/stevenroose/hal) can also serve as an example.

@huahuahu
Copy link
Author

Hi, did you have a look at the documentation (https://docs.rs/bitcoin, for example address creation)? There's also this issue demonstrating how to sign a transaction: #294. And @stevenroose hal command line tool (https://github.com/stevenroose/hal) can also serve as an example.
Thanks for the reply.

yancyribbens pushed a commit to yancyribbens/rust-bitcoin that referenced this issue Mar 23, 2024
2b13694 Add non-trivial multi-node example (Aman Rojjha)
1c2a80e Add validity and malleability checks. (Aman Rojjha)
0866807 Add P2Tr compiler (Aman Rojjha)
285207e Internal-key extraction done (Aman Rojjha)
26fc574 Policy to single-leaf TapTree compilation done (Aman Rojjha)

Pull request description:

  This PR builds on top of rust-bitcoin#278.

  This is one in a series of PRs aimed to implement a feature-complete *Pay-to-Taproot* **P2Tr** compiler.
  Specifically, this introduces a basic compilation for a given policy by collecting the leaf nodes of the *tree* generated by considering root-level disjunctive `OR`and using this to generate a `TapTree`.

  > Assuming that _duplicate keys_ are **NOT** possible even in different branches of the TapTree.

  # Follow Up PRs

  - rust-bitcoin#342  - Uses heuristic for tree-generation/ _merging_ algorithm while buillding `TapTree` to optimize over the *expected average total cost*.
  - rust-bitcoin#352
  - A future PR implementing enumerative strategies for optimizing `thresh` `k`-of-`n` and similar structures.

ACKs for top commit:
  apoelstra:
    ACK 2b13694
  sanket1729:
    ACK 2b13694 . Let's push forward on this. In the interest of ACKs and multiple rebases already done here, I am merging this. We recently shifted to rust 2018. And this code has a bunch of warnings because of it.

Tree-SHA512: 4ceca51a383f5d52b572a16937bbcc3a9c53f0247e4b6df57a6547fd0b1c7cc33ff04dd9a476914bcf6d0a09e255918b8f7ebfe176c839d6ae31c84613dce67f
yancyribbens pushed a commit to yancyribbens/rust-bitcoin that referenced this issue Mar 23, 2024
… Policy into a valid Descriptor

169d849 Add policy to descriptor target compilation method (Aman Rojjha)

Pull request description:

  This PR works on top of  rust-bitcoin#291 and rust-bitcoin#342. It introduces a new function `compile_to_descriptor` which requires a `DescriptorCtx` (suggestions for a better enum name are welcome!) allowing directly compilation of a policy into the specified descriptor type.

ACKs for top commit:
  apoelstra:
    ACK 169d849
  sanket1729:
    ACK 169d849

Tree-SHA512: 0f895f4774ea4f56db76280ac756df616a70e5d7d60cc128f9a050ef86658f786b2d45885d748dba51751146a6e93b3731f4ae193b7d80284ffaea20be1e8f92
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

No branches or pull requests

2 participants