-
Notifications
You must be signed in to change notification settings - Fork 3k
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
in wallet with many hardware cosigners, pairing order should be smarter (pairing error, keystore, sign_transaction, multisig) #6541
Comments
The signing logic used to simply try to sign with each keystore in order. Lines 1565 to 1569 in c313c70
Based on your report I assume you are plugging in devices ~one-by-one, hence the one-off scan does not help. |
Hmm that does not explain your issue. Just before the pairing error (first picture), do you a get a dialog with "Please select which Coldcard device to use"? |
Yes, I get the dialog and I select the only coldcard that is currently connected. Then it says "signing" for a few seconds before switching to the "cannot pair" error. |
All right, in that case I understand. Let me explain the current logic, and what I think is happening: When you click sign, a loop starts that will try to sign with each keystore. In your case, neither coldcards were "ready" when you clicked "sign". At one point in the flow however, you connected the second coldcard. To explain why the user is prompted to select the device manually instead of skipping the keystore right away, I need to give an example with a Trezor device, and I need to explain the auto-pairing heuristics. Note also that the manual-select-device dialog only lists "unpaired" connected devices. Therefore, I suppose, ideally we should change the code somehow to get the device-connected-in-the-meantime paired first. |
That sounds correct. A couple other scenarios to note:
So it seems to me like it isn't scanning for connected devices when you click to sign an unsigned payment |
I'm doing a stress test 8 of 8 native multisig wallet with 8 different hardware devices.
Electrum 4.0.2 appimage on debian
One odd issue I've noticed when starting to sign a transaction is that it seems to roll through prompting to connect every device, but if I connect a device out of order (which is really hard to determine) then I get this error:
![Screenshot from 2020-08-26 18-20-11](https://user-images.githubusercontent.com/288011/91591650-3b8a3400-e92b-11ea-8335-3bba966139eb.png)
To be precise, in this setup there are 2 different coldcards and in order to sign with the "second" coldcard I have to click "no" on the first connection attempt and THEN plug in the "second" coldcard.
Maybe this is a big ask since I'm not sure how the logic works, but it seems like electrum should be smart enough to detect that the device is actually part of the key set.
I'll also note that I have not experienced this issue with Trezor or Bitbox but have with Ledger. It might just be that I've always plugged them in in the expected order.
The text was updated successfully, but these errors were encountered: