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

GUI displays only one xpub for multisig wallet #4777

Closed
stepansnigirev opened this issue Oct 15, 2018 · 18 comments
Closed

GUI displays only one xpub for multisig wallet #4777

stepansnigirev opened this issue Oct 15, 2018 · 18 comments

Comments

@stepansnigirev
Copy link

When using multisig wallet (no matter with software or hardware key storage) I can't see master public keys of the co-signers. Only the very first one is displayed.

multisig_xpubs

@SomberNight
Copy link
Member

Does this wallet actually work? It seems all the xpubs are the same (I don't think it's a display bug).

Try opening the wallet file on disk with a text editor, and search for "xpub".

When you create a new wallet, can you reproduce this problem there?

@stepansnigirev
Copy link
Author

Yes, it's display issue. Wallet works - I can sign with all my hardware devices.
Wallet file has all the xpubs:

    "x1/": {
        "derivation": "m/45'/0",
        "hw_type": "trezor",
        "label": "trezor touch",
        "type": "hardware",
        "xpub": "xpub6APSzbcJN1zTroLEViJtjCF3cAVWwQuFTX36PxHaMGXbVbSpHqAGsrs1xmRsEPmKHtsQ8XKrii8hw9otbgEpQ674eiw2dBKkuu91eeFLWKK"
    },
    "x2/": {
        "cfg": {
            "mode": 0,
            "pair": ""
        },
        "derivation": "m/45'/0",
        "hw_type": "ledger",
        "label": "",
        "type": "hardware",
        "xpub": "xpub6A6UyKUUPQoK6JBcHc1gLhCYkkybTZGRpBs7Fmu3mtWWEQnqXGcWTVQJgaWsQiydohgJsf9L7Edrg5rLmbMN6NDHV8k65zmcYRaH5iVhsgb"
    },
    "x3/": {
        "cfg": {
            "mode": 0,
            "pair": ""
        },
        "derivation": "m/45'/0",
        "hw_type": "ledger",
        "label": "",
        "type": "hardware",
        "xpub": "xpub6Bb95ETB27TXcHw3LUugns8KEoXSQcrzu5kD424589yqu4ZDf8wPqcS6JHHnapnKdy8RKeDeDUkYyhsZAbxJYezjzXBVak17SnX4XfUb3d9"
    }

The same happens if you do software multisig, all xpubs are in the file but they are not displayed by the GUI.

You can just try to set up multisig address by yourself with random xpubs and reproduce this issue. Only the first one is shown.

@SomberNight
Copy link
Member

SomberNight commented Oct 15, 2018

You can just try to set up multisig address by yourself with random xpubs and reproduce this issue. Only the first one is shown.

Yes well, it's not that simple :) Before asking, I've already tried. I see you are on a Mac; I can only test atm on Linux and Windows. I could not reproduce on either.

It would be nice if someone else could try to reproduce on MacOS.
Are you using the official 3.2.3 binary or running from source/etc?

@stepansnigirev
Copy link
Author

I was running an official binary from electrum.org
I also built electrum from source (master branch) - the same issue

Just tried on Windows - everything works perfectly. I will try on my other mac laptop at home and write you back.

I am running on macOS High Sierra 10.13.6

@SomberNight
Copy link
Member

If you can run from source, maybe try:

diff --git a/electrum/gui/qt/main_window.py b/electrum/gui/qt/main_window.py
index 5be84beca..8699fe37f 100644
--- a/electrum/gui/qt/main_window.py
+++ b/electrum/gui/qt/main_window.py
@@ -2094,6 +2094,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
             mpk_text.addCopyButton(self.app)
             def show_mpk(index):
                 mpk_text.setText(mpk_list[index])
+                mpk_text.update()
             # only show the combobox in case multiple accounts are available
             if len(mpk_list) > 1:
                 def label(key):

@stepansnigirev
Copy link
Author

Thanks for pointing out where to look =)

This helped:

def show_mpk(index):
    mpk_text.setText(mpk_list[index])
    mpk_text.repaint()

@SomberNight
Copy link
Member

So to make sure, .update() didn't work?

The Qt docs suggest using update instead of repaint.

re update:

Updates the widget unless updates are disabled or the widget is hidden.

Heh, I guess you could try checking updatesEnabled() and isVisible()

@stepansnigirev
Copy link
Author

update() didn't work.
I checked updatesEnabled() and isVisible() - both are True

@stepansnigirev
Copy link
Author

stepansnigirev commented Oct 15, 2018

I updated pyQt to latest version (5.11.3) and everything works now, without any changes in the code.
But only when I build from source. Binary still doesn't work.

@SomberNight
Copy link
Member

But only when I build from source. Binary still doesn't work.

Yes this is expected, the binary has a fixed version of PyQt5 bundled; it won't use the one installed on the system.

Thanks for investigating. We could just bump the version of PyQt5 we bundle, but unfortunately that would also raise the min supported MacOS version. See #3685 (comment)

@SomberNight SomberNight added this to the 3.3 milestone Oct 16, 2018
@SomberNight
Copy link
Member

Note: same thing in the wizard during the script type/derivation dialog (selecting radio button does not refresh text).

@SomberNight
Copy link
Member

SomberNight commented Dec 19, 2018

Note: the situation is a bit more complicated than just the Qt version.

  • PyQt 5.10
    • macOS 10.11: display bug
    • macOS 10.12: display bug
    • macOS 10.13: display bug
  • PyQt 5.11
    • macOS 10.11: display bug
    • macOS 10.12: display bug
    • macOS 10.13: OK, no "bug"

EDIT: whether you have the "dark" theme (in app) enabled also factors in... argh

@SomberNight
Copy link
Member

SomberNight commented Jun 27, 2019

got new report on IRC for this....
using

  • official electrum 3.3.6 binary
  • on macOS 10.14.4
  • with both dark theme and standard theme

display bug...

@SomberNight
Copy link
Member

Ok I've tested on macOS 10.14.4

  • running from source, Qt 5.11.2 and PyQt 5.11.3, python 3.7.3 -> no bug
  • running from source, Qt 5.11.2 and PyQt 5.11.3, python 3.6.5 -> display bug
  • running official 3.3.6 binary, Qt 5.11.2 and PyQt 5.11.3, python 3.6.4 -> display bug

So I guess we should update Python in the binary...

@sunknudsen
Copy link

Experiencing the same bug.

Try opening the wallet file on disk with a text editor, and search for "xpub".

The file is encrypted. Is there a way to list the master pub keys using command line or the Electrum console?

@SomberNight
Copy link
Member

@sunknudsen run this in the Console tab:

[k.xpub for k in wallet.get_keystores()]

@sunknudsen
Copy link

Thanks @SomberNight, works like a charm.

@fireduck64
Copy link
Contributor

I have reproduced this is 3.3.6 on macos.

The xpubs are different in the wallet file but show the same in the UI.

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

No branches or pull requests

4 participants