Skip to content

Conversation

Eunovo
Copy link
Contributor

@Eunovo Eunovo commented Jun 7, 2024

This PR adds support for rawnode() and rawleaf() under tr() descriptor discussed in #24114 and tr-rawnode-and-rawleaf

@DrahtBot
Copy link
Contributor

DrahtBot commented Jun 7, 2024

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage & Benchmarks

For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/30243.

Reviews

See the guideline for information on the review process.
A summary of reviews will appear here.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #32861 (Have createwalletdescriptor auto-detect an unused(KEY) by Sjors)
  • #32784 (wallet: derivehdkey RPC to get xpub at arbitrary path by Sjors)
  • #32652 (wallet: add codex32 argument to addhdkey by roconnor-blockstream)
  • #32471 (wallet/rpc: fix listdescriptors RPC fails to return descriptors with private key information when wallet contains descriptors missing any key by Eunovo)
  • #29136 (wallet: addhdkey RPC to add just keys to wallets via new unused(KEY) descriptor by achow101)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

LLM Linter (✨ experimental)

Possible typos and grammar issues:

  • “A struct hold information on a node taproot descriptor script tree” -> “A struct holding information on a node in a taproot descriptor script tree” [“hold” should be “holding”, and insert “in a” for clarity]

drahtbot_id_4_m

@Eunovo Eunovo marked this pull request as draft June 7, 2024 11:55
@Eunovo Eunovo force-pushed the tr-partial-descriptors branch from 6700dd3 to 9923fdc Compare June 7, 2024 15:07
@DrahtBot
Copy link
Contributor

DrahtBot commented Jun 7, 2024

🚧 At least one of the CI tasks failed. Make sure to run all tests locally, according to the
documentation.

Possibly this is due to a silent merge conflict (the changes in this pull request being
incompatible with the current code in the target branch). If so, make sure to rebase on the latest
commit of the target branch.

Leave a comment here, if you need help tracking down a confusing failure.

Debug: https://github.com/bitcoin/bitcoin/runs/25939869075

Copy link
Contributor

@ajtowns ajtowns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems okay to me. Presumably should update doc/descriptors.md though, and might also be nice to have some functional tests demonstrating it works end-to-end? (Add some examples to DESCS in wallet_miniscript.py maybe?

@Eunovo
Copy link
Contributor Author

Eunovo commented Jun 11, 2024

Seems okay to me. Presumably should update doc/descriptors.md though, and might also be nice to have some functional tests demonstrating it works end-to-end? (Add some examples to DESCS in wallet_miniscript.py maybe?

@ajtowns I'll do that.

@Eunovo Eunovo force-pushed the tr-partial-descriptors branch from 9923fdc to 6f10ab5 Compare June 11, 2024 21:16
@Eunovo
Copy link
Contributor Author

Eunovo commented Jun 11, 2024

@ajtowns Thanks for the review. I added some examples to wallet_miniscript.py and updated descriptors.md

@dergoegge
Copy link
Member

Found a crash in the mocked_descriptor_parse fuzz target, to reproduce:

$ echo "dHIoJUJELHJhd2xlYWYoQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCLEE3LCUyNywlQjcsJTIzLCVCZCwlRkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQmNGKSk=" | base64 --decode > pr30243-mocked_descriptor_parse.crash
$ FUZZ=mocked_descriptor_parse src/test/fuzz/fuzz pr30243-mocked_descriptor_parse.crash
fuzz: script/signingprovider.cpp:368: TaprootBuilder &TaprootBuilder::Add(int, Span<const unsigned char>, int, bool): Assertion `(leaf_version & ~TAPROOT_LEAF_MASK) == 0' failed.

@Eunovo
Copy link
Contributor Author

Eunovo commented Jun 15, 2024

Found a crash in the mocked_descriptor_parse fuzz target, to reproduce:

Thanks for this @dergoegge. I'll fix it

@Eunovo
Copy link
Contributor Author

Eunovo commented Jun 18, 2024

Found a crash in the mocked_descriptor_parse fuzz target, to reproduce:

$ echo "dHIoJUJELHJhd2xlYWYoQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCLEE3LCUyNywlQjcsJTIzLCVCZCwlRkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJCQmNGKSk=" | base64 --decode > pr30243-mocked_descriptor_parse.crash
$ FUZZ=mocked_descriptor_parse src/test/fuzz/fuzz pr30243-mocked_descriptor_parse.crash
fuzz: script/signingprovider.cpp:368: TaprootBuilder &TaprootBuilder::Add(int, Span<const unsigned char>, int, bool): Assertion `(leaf_version & ~TAPROOT_LEAF_MASK) == 0' failed.

@dergoegge Pushed 7efb115 to fix this

@Eunovo Eunovo requested review from ajtowns and brunoerg July 8, 2024 11:30
@Eunovo Eunovo requested a review from brunoerg July 11, 2024 07:47
@brunoerg
Copy link
Contributor

You can squash some commits.

@Eunovo Eunovo force-pushed the tr-partial-descriptors branch from 134ee16 to a945bc2 Compare July 11, 2024 13:19
@Eunovo
Copy link
Contributor Author

Eunovo commented Jul 11, 2024

You can squash some commits.

Thanks @brunoerg. Done!

@Eunovo Eunovo force-pushed the tr-partial-descriptors branch from b9c2be8 to b118fbd Compare March 24, 2025 10:09
@Eunovo Eunovo changed the title Tr partial descriptors descriptors: taproot partial descriptors Mar 24, 2025
@Eunovo
Copy link
Contributor Author

Eunovo commented Mar 24, 2025

Rebased on master 770d39a

  • changed Span to std::span

@DrahtBot
Copy link
Contributor

DrahtBot commented May 1, 2025

🚧 At least one of the CI tasks failed.
Task previous releases, depends DEBUG: https://github.com/bitcoin/bitcoin/runs/39283280181
LLM reason (✨ experimental): The CI failure is caused by compilation errors due to instantiating abstract classes that have pure virtual functions not implemented.

Hints

Try to run the tests locally, according to the documentation. However, a CI failure may still
happen due to a number of reasons, for example:

  • Possibly due to a silent merge conflict (the changes in this pull request being
    incompatible with the current code in the target branch). If so, make sure to rebase on the latest
    commit of the target branch.

  • A sanitizer issue, which can only be found by compiling with the sanitizer and running the
    affected test.

  • An intermittent issue.

Leave a comment here, if you need help tracking down a confusing failure.

@Eunovo Eunovo force-pushed the tr-partial-descriptors branch from b118fbd to be910db Compare May 6, 2025 08:04
@DrahtBot DrahtBot removed the CI failed label May 6, 2025
@Eunovo
Copy link
Contributor Author

Eunovo commented May 6, 2025

Rebased on master.

@DrahtBot
Copy link
Contributor

🚧 At least one of the CI tasks failed.
Task previous releases, depends DEBUG: https://github.com/bitcoin/bitcoin/runs/41705051946
LLM reason (✨ experimental): (empty)

Hints

Try to run the tests locally, according to the documentation. However, a CI failure may still
happen due to a number of reasons, for example:

  • Possibly due to a silent merge conflict (the changes in this pull request being
    incompatible with the current code in the target branch). If so, make sure to rebase on the latest
    commit of the target branch.

  • A sanitizer issue, which can only be found by compiling with the sanitizer and running the
    affected test.

  • An intermittent issue.

Leave a comment here, if you need help tracking down a confusing failure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants