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

Provide dedicated descriptors for change addresses with tapret #57

Closed
crisdut opened this issue Nov 7, 2022 Discussed in #53 · 4 comments
Closed

Provide dedicated descriptors for change addresses with tapret #57

crisdut opened this issue Nov 7, 2022 Discussed in #53 · 4 comments

Comments

@crisdut
Copy link
Member

crisdut commented Nov 7, 2022

Discussed in #53

Originally posted by crisdut October 12, 2022
According to this comment, the descriptor change is provided by the same wallet used to provide the inputs.

I think the command line needs an optional parameter to allow choose your change descriptor.

This important feature for TapRet commitments, because always we need a TapTree to add commitment.

TapRet commitment user case (example):

  1. We create a Taptree output descriptor with OP_CHECKSIG.
change_desc="tr(A,pk(B))#mjnpzw6a"
  1. We construct a PSBT file.
btc-cold construct --input  <INPUTS> <WALLET_FILE> <PSBT_FILE> <FEE> --allow-tapret-path 1 --account-file <ACCOUNT_FILE> --change $change_desc 
  1. After RGB finalize, the Taptree is updated with the commitment script

  2. If we want to spend the bitcoins of the output descriptor, we need to create a new wallet based on the script of the step 1

btc-cold create  $change_desc <WALLET_FILE> --account-file <ACCOUNT_FILE>
  1. Use the new wallet to construct a new PSBT file.

Does make sense?

I will start work on this issue.

@dr-orlovsky
Copy link
Member

You are right about that existance of tapret commiments makes it harder to deal with change outputs; but I do not agree that this should be addressed by creating a dedicated descriptor. Instead, my plan was to support extended descriptor format supporting tapret fragment and a list of tweaks which should be looked for at specific indexes.

@dr-orlovsky
Copy link
Member

Like I did in this early prototype concept: https://github.com/BP-WG/stingerjet-docs

See the end of the README, the taprets final section of a sample.

@dr-orlovsky dr-orlovsky changed the title Support to change descriptors Provide dedicated descriptors for change addresses with tapret Nov 8, 2022
@dr-orlovsky dr-orlovsky changed the title Provide dedicated descriptors for change addresses with tapret Support tapret in the descriptors Nov 8, 2022
@dr-orlovsky dr-orlovsky changed the title Support tapret in the descriptors Provide dedicated descriptors for change addresses with tapre Nov 8, 2022
@dr-orlovsky dr-orlovsky changed the title Provide dedicated descriptors for change addresses with tapre Provide dedicated descriptors for change addresses with tapret Nov 8, 2022
@dr-orlovsky
Copy link
Member

Just not to duplicate messages I propose to continue discussion on the proper way of supporting tapret commitments in wallet descriptors in #53

Closing in favor of issue which tracks the status (#58)

@crisdut
Copy link
Member Author

crisdut commented Nov 8, 2022

Just not to duplicate messages I propose to continue discussion on the proper way of supporting tapret commitments in wallet descriptors in #53

Ok, I'm sorry.

I created an issue just because I started implementation of the solution.

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