Bitcoin Forum
November 17, 2024, 05:00:22 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Cannot import multisig Taproot descriptor correctly  (Read 68 times)
andy912 (OP)
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
August 04, 2023, 02:09:03 PM
 #1

Hello! I am trying to create a multisig taproot address. From what I understand, I believe I have to create a descriptor and derive the address from it. So I create my descriptor which looks like this:

'tr(50929b74c1a04954b78b4b6035e97a5e078a5a0f28ec96d547bfee9ace803ac0,multi_a(2,033434452fc571cd5573ced84e604192ffc37c1b14682af0cc165e6cc55fa94d9e,02d60f3616c56a0d1d0f71581311eb2262a9eb802edf8a22d5209805ffc16aa8fe,02055d26aae49e08d0d812df967054fa40e114eec4d8f2130ddd4bafdc33f42b80))#kmt6wy28'

which follows the format: tr(KI, multi_a(2, PK1, PK2, PK3)#checksum (2-of-3 multisig) following the instructions in the response of this post: https://bitcoin.stackexchange.com/questions/115700/how-do-i-create-a-taproot-multisig-address-requiring-21-of-210-keys-to-spend .

However, when I import the descriptor into my wallet, and then I list my wallet descriptors, I get:

'wsh(multi(2,033434452fc571cd5573ced84e604192ffc37c1b14682af0cc165e6cc55fa94d9e,02d60f3616c56a0d1d0f71581311eb2262a9eb802edf8a22d5209805ffc16aa8fe,02055d26aae49e08d0d812df967054fa40e114eec4d8f2130ddd4bafdc33f42b80))#hurzvw9x'

which basically has the same keys of the original one, but of course is a different type of script (P2WSH).

Why cannot my descriptor be imported correctly as a P2TR script? Any response or advise would be greatly appreciated.
Findingnemo
Hero Member
*****
Offline Offline

Activity: 2520
Merit: 860


Bitcoin = Financial freedom


View Profile
August 04, 2023, 02:53:47 PM
Last edit: August 09, 2023, 05:40:32 PM by Findingnemo
 #2

The descriptor you shared appears to be a witness script hash (P2WSH) multisig, not a Taproot (P2TR) multisig.

So you didn't create a multisig taproot address in the first place or didn't import the Descriptor with the right keys tr(KEY, multi(k, PK1, PK2, PK3, ...)) so go back and follow all the processes without any errs.

To create a correct descriptor for a Taproot multisig address, you'll need to follow the correct format. Here's a step-by-step guide on how to do it:
Quote

Step 1: Determine the Parameters

Decide on the number of required signatures (k) for your multisig setup. For example, if you want a 2-of-3 multisig, k would be 2.
Gather the public keys (PK1, PK2, PK3, etc.) of the participants who will be part of the multisig setup.
Step 2: Format the Descriptor

Use the tr() function to indicate that you want to create a Taproot output.
Inside the tr() function, use the multi() function to indicate a multisig setup.
Add the required parameters inside the functions.
The general format for the descriptor will be:

less
Copy code
tr(KEY, multi(k, PK1, PK2, PK3, ...))
Replace KEY with your Taproot public key (usually starting with "02" or "03"), k with the number of required signatures, and PK1, PK2, PK3, etc., with the public keys of the participants.

Step 3: Example Descriptor
Here's an example of a descriptor for a 2-of-3 Taproot multisig setup:

less
Copy code
tr(02d3b2d1ad5a1ce2263c8de39ee0f861446bc59f70989d01174f5f78cbf8e235c2, multi(2, 033434452fc571cd5573ced84e604192ffc37c1b14682af0cc165e6cc55fa94d9e, 02d60f3616c56a0d1d0f71581311eb2262a9eb802edf8a22d5209805ffc16aa8fe, 02055d26aae49e08d0d812df967054fa40e114eec4d8f2130ddd4bafdc33f42b80))
In this example, the Taproot public key (KEY) starts with "02," and we have three public keys for the multisig setup (PK1, PK2, PK3).

Step 4: Import the Descriptor

Once you have the correct descriptor, you can import it into your wallet. Look for an option in your wallet software to import descriptors or scripts.
Some wallets may have specific import formats or ways to add descriptors. Refer to your wallet's documentation or support resources for guidance on how to import the descriptor.
Step 5: Verify the Taproot Multisig Address

After importing the descriptor, the wallet should process it and display the Taproot multisig address associated with the descriptor.
Verify that the displayed address matches the Taproot multisig address you intended to create.


███████████████████████████
███████▄████████████▄██████
████████▄████████▄████████
███▀█████▀▄███▄▀█████▀███
█████▀█▀▄██▀▀▀██▄▀█▀█████
███████▄███████████▄███████
███████████████████████████
███████▀███████████▀███████
████▄██▄▀██▄▄▄██▀▄██▄████
████▄████▄▀███▀▄████▄████
██▄███▀▀█▀██████▀█▀███▄███
██▀█▀████████████████▀█▀███
███████████████████████████
 
 Duelbits 
██
██
██
██
██
██
██
██

██

██

██

██

██
TRY OUR UNIQUE GAMES!
    ◥ DICE  ◥ MINES  ◥ PLINKO  ◥ DUEL POKER  ◥ DICE DUELS   
█▀▀











█▄▄
 
███
▀▀▀
███
▀▀▀
███
▀▀▀
███
▀▀▀

███
▀▀▀
███
▀▀▀
 
███
▀▀▀

███
▀▀▀
███
▀▀▀
███
▀▀▀
███
▀▀▀
███
▀▀▀
 
███
▀▀▀
███
▀▀▀
███
▀▀▀
███
▀▀▀

███
▀▀▀
███
▀▀▀
 
███
▀▀▀
███
▀▀▀
███
▀▀▀

███
▀▀▀
███
▀▀▀
███
▀▀▀
 
███
▀▀▀
███
▀▀▀

███
▀▀▀
███
▀▀▀
███
▀▀▀

███
▀▀▀
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
 KENONEW 
 
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀█











▄▄█
10,000x
 
MULTIPLIER
██
██
██
██
██
██
██
██

██

██

██

██

██
 
NEARLY
UP TO
50%
REWARDS
██
██
██
██
██
██
██
██

██

██

██

██

██
[/tabl
nc50lc
Legendary
*
Online Online

Activity: 2604
Merit: 6416


Self-proclaimed Genius


View Profile
August 04, 2023, 03:09:08 PM
 #3

However, when I import the descriptor into my wallet, and then I list my wallet descriptors, I get:
I've just tested the format in RegTest and it imported correctly as TapRoot MultiSig.

Here's the descriptor that I've imported:
Code:
tr(0272fb0d1f9f2553274005ca26095dc54762634fbadb5656304ef27961cbceadb1,multi_a(2,024be0123fa08303e0b56a7cb2a8b7589db0f9569e97bc90cf030225f60811eaf4,03ef254268bcac8bd7a6ffb7ae86e1afae4c1b1f9c055b455d50f4851f18dd9344,022a35576e45ba2fe72782f5bf0c870476c56085d763da678ce9a40da49c77067b))#rmq662ky

I've also tested yours and it's also imported properly after I fixed the checksum which should be "#psz0pxl2".
So I'm thinking that you might have failed to import the descriptor and what's shown was your previously imported P2WSH descriptor.

I'm using version 25.0, by the way.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
andy912 (OP)
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
August 04, 2023, 04:07:14 PM
 #4

The descriptor you shared appears to be a witness script hash (P2WSH) multisig, not a Taproot (P2TR) multisig.

So you didn't create a multisig taproot address in the first place or didn't import the Descriptor with the right keys tr(KEY, multi(k, PK1, PK2, PK3, ...)) so go back and follow all the processes without any errs.

To create a correct descriptor for a Taproot multisig address, you'll need to follow the correct format. Here's a step-by-step guide on how to do it:
Code:

Step 1: Determine the Parameters

Decide on the number of required signatures (k) for your multisig setup. For example, if you want a 2-of-3 multisig, k would be 2.
Gather the public keys (PK1, PK2, PK3, etc.) of the participants who will be part of the multisig setup.
Step 2: Format the Descriptor

Use the tr() function to indicate that you want to create a Taproot output.
Inside the tr() function, use the multi() function to indicate a multisig setup.
Add the required parameters inside the functions.
The general format for the descriptor will be:

less
Copy code
tr(KEY, multi(k, PK1, PK2, PK3, ...))
Replace KEY with your Taproot public key (usually starting with "02" or "03"), k with the number of required signatures, and PK1, PK2, PK3, etc., with the public keys of the participants.

Step 3: Example Descriptor
Here's an example of a descriptor for a 2-of-3 Taproot multisig setup:

less
Copy code
tr(02d3b2d1ad5a1ce2263c8de39ee0f861446bc59f70989d01174f5f78cbf8e235c2, multi(2, 033434452fc571cd5573ced84e604192ffc37c1b14682af0cc165e6cc55fa94d9e, 02d60f3616c56a0d1d0f71581311eb2262a9eb802edf8a22d5209805ffc16aa8fe, 02055d26aae49e08d0d812df967054fa40e114eec4d8f2130ddd4bafdc33f42b80))
In this example, the Taproot public key (KEY) starts with "02," and we have three public keys for the multisig setup (PK1, PK2, PK3).

Step 4: Import the Descriptor

Once you have the correct descriptor, you can import it into your wallet. Look for an option in your wallet software to import descriptors or scripts.
Some wallets may have specific import formats or ways to add descriptors. Refer to your wallet's documentation or support resources for guidance on how to import the descriptor.
Step 5: Verify the Taproot Multisig Address

After importing the descriptor, the wallet should process it and display the Taproot multisig address associated with the descriptor.
Verify that the displayed address matches the Taproot multisig address you intended to create.



Hi, yes, the response I was getting from the importdescriptors command was actually being mocked and I hadn't realized. So when I disabled the mock, the taproot descriptor was imported correctly. I tried to delete the Topic, but I wasn't able to do that. Thanks for the reply anyway!
andy912 (OP)
Newbie
*
Offline Offline

Activity: 5
Merit: 0


View Profile
August 04, 2023, 04:13:59 PM
 #5

However, when I import the descriptor into my wallet, and then I list my wallet descriptors, I get:
I've just tested the format in RegTest and it imported correctly as TapRoot MultiSig.

Here's the descriptor that I've imported:
Code:
tr(0272fb0d1f9f2553274005ca26095dc54762634fbadb5656304ef27961cbceadb1,multi_a(2,024be0123fa08303e0b56a7cb2a8b7589db0f9569e97bc90cf030225f60811eaf4,03ef254268bcac8bd7a6ffb7ae86e1afae4c1b1f9c055b455d50f4851f18dd9344,022a35576e45ba2fe72782f5bf0c870476c56085d763da678ce9a40da49c77067b))#rmq662ky

I've also tested yours and it's also imported properly after I fixed the checksum which should be "#psz0pxl2".
So I'm thinking that you might have failed to import the descriptor and what's shown was your previously imported P2WSH descriptor.

I'm using version 25.0, by the way.

Hi, yes, the response I was getting from the importdescriptors command was actually being mocked and I hadn't realized. So when I disabled the mock, the taproot descriptor was imported correctly. I tried to delete the Topic, but I wasn't able to do that. Thanks for the reply anyway!
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!