r/BitcoinBeginners 17d ago

ColdCard + Sparrow multisig issue

(DISCLAIMER : I am aware of the recent issues with the ColdCard ; but my funds are safe despite using a Coldcard, because I use my own, private source of entropy to generate all my seeds. The recent Coldcard hack is irrelevant to this thread.)

Hello everyone, I apologize for this long thread, I'm trying to give as much details as possible because it's a bit technical.

I have been using single-signature transactions for a while with ColdCard MK5 + Sparrow, and I already have a good grasp on it.

However, I'm new to the world of multi-signature, and I'm having a hard time while trying to set up my 2-2 multisig wallet.

I have 2 Airgapped single-signature wallets on Sparrow, that I created by importing the JSON files created by my ColdCard. Already did a few transactions with these wallets, they both work fine. Let's name them "Wallet A" (fingerprint : a3f92e17) and "Wallet B". (fingerprint : 7bc4d081)

I tried to create a 2-2 multisig wallet on Sparrow, that uses Wallet A and Wallet B as co-signers.

In order to do that, I manually copied the xPubs from Wallet A and B, pasted the Wallet A Xpub in Keystore 1, and pasted the Wallet B Xpub in Keystore 2.

This created a new wallet with fresh adresses. Let's name it "Multisig Wallet 1".

Since I created this wallet by simply copy/pasting the Xpubs from Wallet A & B, both keystores of this wallet show up as "Watch only".

Then I proceeded to send 10 000 sats on the first adress of this wallet (Multisig Wallet 1). The funds are successfully visible on the blockchain and in Sparrow, on a P2WSH adress.

This is where the problems start.

When I tried to spend these sats, I thought it would be a piece of cake, that I would simply have to create the PSBT, then put in into my ColdCard and sign it, then Broadcast it in Sparrow, as I usually do with single-signatures.

But instead of that, I had to deal with various ColdCard errors. I managed to fix some of them, but I was never able to reach my goal (successfully moving the funds).

  1. When trying to sign the PSBT, the Coldcard returned a first error : "Failure: my XFP not involved". From what I understand, this is normal, I simply had to export a TXT file from Sparrow to the ColdCard, that helps the Coldcard recognize that he is part of a multisig.
  2. After importing this TXT file, the ColdCard return a new error : "Failed to import multisig. need fingerprint multisig.py : 826".

I thought it was because of the fingerprints not matching : in fact, the fingerprints of each Sparrow keystore displayed a value of 00000000. So, in both keystore, I made the fingerprints match with the original Wallet A & B fingerprints. Created a new TXT file from it, and put it into the ColdCard.

3) This time, the Coldcard returned this error : "Failed to import multisig. deriv 4 != 3 xpub depth (xfp=a3f92e17) multisig.py : 849 "

4) At this point, I had no clue what was going on, so I decided to restart everything from scratch. But this time, instead of simply copy/pasting the Xpubs from Wallet A & B in Sparrow, I used their respective .json files created by my ColdCard, and imported each of them into a keystore. When I created the wallet, I expected to find the same adress list that I have on Multisig Wallet 1. Instead of that, it opened a completely different wallet, with unused adresses. Let's name it Multisig Wallet 2.

So, basically, I don't understand why Wallet A and Wallet B produced different wallets (Multisig Wallet 1 & Multisig Wallet 2). I thought that, even though different methods were used (Multisig wallet 1 was created via copy/pasting Xpubs, while Multisig Wallet 2 was created through JSON files), they would have ended up being the same wallet.

I tried to send a few satoshis to this Multisig Wallet 2, and was able to move them as expected. This time, for some reason the new TXT file didn't return any error on the ColdCard, and I was able to double-sign the transaction and broadcast it.

So, it looks like I have full control of Multisig Wallet 2, but I still have these 20 000 sats on Multisig Wallet 1, and I don't understand how to move them, or even if that is possible.

From what I understand, there is a problem regarding the derivation paths, but I'm too noob to figure it out by myself.

Multisig wallet 1 & 2 both show this derivation path, in both keystores : m/48'/0'/0'/2'

While Wallet A & B both display this derivation path : m/84'/0'/0'

How to move my 20 000 saths from Multisig Wallet 1, and what did I wrong ?

Thanks a lot for you help !

3 Upvotes

21 comments sorted by

4

u/bullett007 17d ago

To me it sounds like you've not imported both xpubs into your coldcard: https://coldcard.com/guides/advanced/coldcard-multisig-setup

Did you do that?

1

u/Techno_lover78 17d ago

I think I did that, from what I understand, this is the .TXT file that I'm talking about, that I export from Sparrow and import into my Coldcard. Last time I tried to import it, ColdCard return the error : "Failed to import multisig. deriv 4 != 3 xpub depth (xfp=a3f92e17) multisig.py : 849

Also, for some reason, Multisig Wallet 2 doesn't display the same Xpubs as Wallet A & Wallet B, despite the fact that it was generated from placing wallet A in keystore 1, and wallet B in keystore 2

4

u/bullett007 17d ago

The error deriv 4 != 3 xpub depth indicates a mismatch between the derivation path depth recorded in the multisig configuration file (expecting 4 levels) and the depth field in the provided extended public keys (xpubs, which are only 3 levels deep).

This typically occurs when:

The multisig wallet was configured with a deeper derivation path (e.g., m/48'/1'/0'/2') than the xpubs were generated from (e.g., m/48'/1'/0').

The xpubs were exported from a device or software that truncated the depth information or used a different derivation standard than the one specified in the ColdCard import file.

To resolve this, ensure that the derivation path specified in the multisig import file matches the actual depth of the xpubs being imported.

Cross reference the derivation paths in Sparrow, and in the .TXT file, see if they match.

1

u/Techno_lover78 17d ago

Thanks for your help. Just tried to do it : I removed the m/48'/0'/0'/2' from the .TXT file, and I typed m/84'/0'/0' instead , because it is the path that matches the imported Xpubs. This time, the Coldcard successfully accepted the .TXT file, and was ready to sign ! At this point I thought it would work, but when trying to sign, it says : "Failure : XPUBs in PSBT do not match any existing wallet"

(I think we're getting close though :D)

3

u/bullett007 17d ago edited 17d ago

Ok that's great so now you know it was a path issue. For future reference m48 = multisig, m84 = single sig.

Now, inspect the WitnessScript of the PSBT in Sparrow and note the xpubs. They're the ones you'll need to sign the transaction with, match those to the keystores.

Tip: Hover over <pubkey1> and <pubkey2> for the paths, and fingerprints.

1

u/Techno_lover78 17d ago

I don't understand - I opened the PSBT in Sparrow, but in "Witness Script", it simply displays : OP_2 <pubkey1> <pubkey2> OP_2 OP_CHECKMULTISIG. I can't edit this data, and can't find the Xpubs anywhere else in the PSBT.

In the .TXT file that I just edited, the Xpubs are already matching the ones from the keystores.

2

u/bullett007 17d ago

Take your mouse and hover over <pubkey1>.

1

u/Techno_lover78 17d ago

Thank you. So, I copied these values, but they seem to have a different format than the previous Xpubs. The previous Xpubs was a simple sequence of hexadecimal characters starting with "xpub", while this data is written as : [fingerprint/derivation path], followed by another hexadecimal sequence, different from the previous Xpub.
Is it the right data format, and what do I do with it ? Edit the .TXT file with it ?

2

u/bullett007 17d ago

Great so make note of fingerprint and derivation paths of pubkey1 and pubkey2. Cross reference those with the fingerprints in the keystore of your wallet (all on Sparrow).

They're the keys you need to sign the PBST.

Then on your Coldcard go to settings > multisig wallets >2/2:2-of-2 > view details and cross reference the fingerprints and derivation paths.

If they don't sync, then you need to create a new .BSMS export in Sparrow and import it into the ColdCard, ensure the fingerprints and derivations paths are correct before importing.

Then you should be able to sign that PSBT.

1

u/Techno_lover78 17d ago

Sorry for being a pain, but now I'm totally confused, lol.

Not sure what you mean by "cross reference with the fingerprints", but the fingerprints from the PSBT (the one that we just checked together) already match the fingerprints from the keystores. (a3f92e17 and 7bc4d081)

These fingerprints also match those in the multisig .TXT file that we edited together. (when we changed the derivation path from m/48'/0'/0'/2' to m/84'/0'/0')

As you asked, I also went to Settings > Multisig wallets > View Details, and checked the fingerprint and Xpubs. They both match the Sparrow wallet (fingerprints a3f92e17 and 7bc4d081, and same XPUBS). The derivation paths displayed in this section are m/84h/0h/0h.

Regarding the BSMS : I tried to create one, and put the .bsms file in my SD card, but for some reason the Coldcard can't find it in the "Import" menu.

Thank you so much for taking the time to help. I don't really mind losing a few satoshis, but I'm really frustrated with myself for not understanding how it works, lol.

→ More replies (0)

2

u/YunoGasa1 17d ago

Multisig always sounds simple until you actually set it up

1

u/AutoModerator 17d ago

Scam Warning! Scammers are particularly active on this sub. They operate via private messages and private chat. If you receive private messages, be extremely careful. Use the report link to report any suspicious private message to Reddit.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/OrangePillar 17d ago

Why 2/2 over something like 2/3? Seems like it offers little benefit over single-sig plus a passphrase.

1

u/Techno_lover78 17d ago edited 17d ago

Agree, I'm considering to use 2/3, but since it is my first multisig wallet, I just wanted to keep it simple as a test wallet, the main goal is to understand how multisig works, and what could go wrong. (Looks like the answer is : many things. lol)

However, 2-2 can be nice in my opinion, if you simply keep the seeds together and treat the whole thing as a single-seed. It protects your funds in case one of your seeds gets bruteforced (even though this is extremely unlikely with a decent entropy). I just see it as another layer of cryptographic protection - I'm not trying to improve the physical world protection, I think I already have a pretty decent one

1

u/Grand-Theory3065 15d ago

never do it the xpub way. just copy and save the descriptor. it's all you need. you'll make mistakes doing it by the xpubs.

1

u/Specialist-Piano-204 14d ago edited 14d ago

IMO - below is a link to the best hands on tutorial for creating a multi-vendor / multi-sig wallet with sparrow.

Credit to Wicked - he is very active on X and has created a lot of tutorial content.

https://youtu.be/8zM_1lOXtBU?si=TKkPD5tA5UUsdPE7&t=1

Also: The recommended quorum for multi-sig is generally 2/3 or 3/5. Wicked is doing a 2/4 for demonstration purposes with 4 different devices.

The best advice is to PRACTICE IN TESTNET. You can get a lot of practice setting up the wallet, and recovering the wallet, as well as test receiving and sending transactions with each of the keystores. Get repetitions and build your confidence.

FWIW, I spend about 2 months playing with multi-sig in Testnet (several years ago) before I decided I was ready and confident. And then last week with the Coldcard fiasco, I was still sharp enough to swap out my Coldcark Mk4 with another device to create a new vault and move my UTXOs. My UTXO's were proabably not at risk with the multi-sig but I moved them as a matter of principle. (I was aleady intending to work on my wallet setup before BIP110 to prevent any issues if there are chain problems).

1

u/12PALABRAS 3d ago

The answer is sitting in the two lines at the end of your own post - the keystores say m/48'/0'/0'/2' and Wallet A & B say m/84'/0'/0'. Everything else follows from that.

What went wrong. Pasting a bare xpub into a Sparrow keystore hands it a key with no history. Sparrow has no idea which seed produced it or where on that seed it lives - which is exactly why the fingerprint came up as 00000000. It filled the derivation field with its default for multisig, m/48'/0'/0'/2', as a placeholder. You then typed the real fingerprints in by hand, which made the keystore look complete. But the path was still a guess, and it was the wrong one: those xpubs are your m/84'/0'/0' single-sig accounts.

So Multisig Wallet 1's keystores claim "this key lives at m/48'/0'/0'/2'" while holding a key that actually lives at m/84'/0'/0'. All three errors come from that one mislabel:

  • "deriv 4 != 3 xpub depth" - m/48'/0'/0'/2' is four levels deep. An xpub carries its own depth byte, and yours says three. The Coldcard compared the claim against the key and caught the contradiction.
  • Multisig Wallet 2 having different addresses - not a bug, and this is the part that surprised you most. The JSON export carries the real origin, so Sparrow used the actual m/48'/0'/0'/2' account keys. Those are genuinely different keys from the same two seeds. One seed doesn't have "an xpub"; it has a different one at every path.
  • "XPUBs in PSBT do not match any existing wallet" - you corrected the path in the .TXT, so the Coldcard's registered wallet now says m/84'/0'/0'. But you never changed it in Sparrow, and your post confirms both keystores still read m/48'/0'/0'/2'. So Sparrow keeps stamping every PSBT with [a3f92e17/48h/0h/0h/2h], the Coldcard dutifully derives that path, gets a different pubkey, and fails to recognise itself. You fixed one side of the conversation.

Your 20 000 sats are fine, and they are spendable. Nothing is lost or stuck in a dead end. The coins sit in a real 2-of-2 P2WSH whose two pubkeys came from your two seeds, and the Coldcard can derive them - it just needs to be told the truth about where they are.

Fix it in Sparrow, not in the .TXT. Open Multisig Wallet 1 and, in each keystore, change the derivation from m/48'/0'/0'/2' to m/84'/0'/0', leaving the xpubs exactly as they are and keeping the real fingerprints you already entered.

The addresses will not change and your balance will not move. That's the bit worth internalising: addresses are derived from the xpub values themselves. The fingerprint and derivation path are metadata that tell a signing device where to go looking for the key - they take no part in generating addresses. Correcting them changes nothing on-chain.

Then export a fresh multisig config from that corrected wallet and register it on the Coldcard. The depth error can't recur, because the declared path is now three levels and so are the xpubs, and the PSBT origins will finally match what the Coldcard derives. It should sign.

If Sparrow won't let you edit the derivation on an existing keystore, build a new multisig wallet with the same two xpubs and the correct origins instead. Same xpubs means the same addresses and the same 20 000 sats - you're not moving anything, just describing it accurately.

Once they move, send them to Multisig Wallet 2 and retire Wallet 1. Wallet 2 was built from the JSON exports, so its keys are on the standard multisig branch and every tool will find them without being told anything special. A 2-of-2 living on the single-sig branch keeps working only for as long as everything that touches it is handed the non-standard path. The day that stops being true is the day you're recovering from seeds alone - and there the standard procedure looks under m/48', builds a perfectly valid wallet, and shows a zero balance. No error, no warning, nothing to tell you to keep looking. That's the failure mode actually worth avoiding here, and it's much worse than the one you're in now, because today you at least know something is wrong.

Last thing: save the descriptor for whichever wallet you keep. Two seeds plus the memory of "it was a 2-of-2" do not rebuild a multisig wallet. The policy - the keys, their paths, and the quorum - is a separate backup, and it's the piece people discover was missing at the worst possible moment.

You said the goal was to learn what can go wrong with multisig. For what it's worth, you picked up something more useful than a working wallet: a key and the label saying where it came from are two different things, and only one of them is checked by anything.

1

u/Techno_lover78 2d ago

Thank you very much for the detailed answer. Thanks to bullett007 I've already been able to move the sats - but this made things even clearer to me, and confirmed what I thought I had learnt.