zcash / lightwalletd

Lightwalletd is a backend service that provides a bandwidth-efficient interface to the Zcash blockchain
MIT License
84 stars 86 forks source link

Lightwallet GUI not loading #491

Open sourcesolver opened 4 months ago

sourcesolver commented 4 months ago

I set up zcashd and lightwalletd. My zcash.conf is:

txindex=1
lightwalletd=1
experimentalfeatures=1
rpcuser=zcash_rpc
rpcpassword={REDACTED}
gen=1
equihashsolver=tromp
genproclimit=2
showmetrics=0

A "zcash-cli getblockchaininfo" yields:

{
  "chain": "main",
  "blocks": 593635,
  "initial_block_download_complete": false,
  "headers": 596400,
  "bestblockhash": "00000000018468d55106baf69a1fdecf19c3a005026d7e5fdcdc63a13dc7bdaf",
  "difficulty": 81901676.42779195,
  "verificationprogress": 0.2087527909233866,
  "chainwork": "000000000000000000000000000000000000000000000000018b4c7bc8ac5425",
  "pruned": false,
  "size_on_disk": 53312416077,
  "estimatedheight": 2597820,
  "commitments": 1396318,
  "chainSupply": {
    "monitored": true,
    "chainValue": 7295298.41406848,
    "chainValueZat": 729529841406848
  },
  "valuePools": [
    {
      "id": "transparent",
      "monitored": true,
      "chainValue": 6948376.87134777,
      "chainValueZat": 694837687134777
    },
    {
      "id": "sprout",
      "monitored": true,
      "chainValue": 145185.19224038,
      "chainValueZat": 14518519224038
    },
    {
      "id": "sapling",
      "monitored": true,
      "chainValue": 201736.35048033,
      "chainValueZat": 20173635048033
    },
    {
      "id": "orchard",
      "monitored": true,
      "chainValue": 0.00000000,
      "chainValueZat": 0
    }
  ],
  "softforks": [
    {
      "id": "bip34",
      "version": 2,
      "enforce": {
        "status": true,
        "found": 4000,
        "required": 750,
        "window": 4000
      },
      "reject": {
        "status": true,
        "found": 4000,
        "required": 950,
        "window": 4000
      }
    },
    {
      "id": "bip66",
      "version": 3,
      "enforce": {
        "status": true,
        "found": 4000,
        "required": 750,
        "window": 4000
      },
      "reject": {
        "status": true,
        "found": 4000,
        "required": 950,
        "window": 4000
      }
    },
    {
      "id": "bip65",
      "version": 4,
      "enforce": {
        "status": true,
        "found": 4000,
        "required": 750,
        "window": 4000
      },
      "reject": {
        "status": true,
        "found": 4000,
        "required": 950,
        "window": 4000
      }
    }
  ],
  "upgrades": {
    "5ba81b19": {
      "name": "Overwinter",
      "activationheight": 347500,
      "status": "active",
      "info": "See https://z.cash/upgrade/overwinter/ for details."
    },
    "76b809bb": {
      "name": "Sapling",
      "activationheight": 419200,
      "status": "active",
      "info": "See https://z.cash/upgrade/sapling/ for details."
    },
    "2bb40e60": {
      "name": "Blossom",
      "activationheight": 653600,
      "status": "pending",
      "info": "See https://z.cash/upgrade/blossom/ for details."
    },
    "f5b9230b": {
      "name": "Heartwood",
      "activationheight": 903000,
      "status": "pending",
      "info": "See https://z.cash/upgrade/heartwood/ for details."
    },
    "e9ff75a6": {
      "name": "Canopy",
      "activationheight": 1046400,
      "status": "pending",
      "info": "See https://z.cash/upgrade/canopy/ for details."
    },
    "c2d6d0b4": {
      "name": "NU5",
      "activationheight": 1687104,
      "status": "pending",
      "info": "See https://z.cash/upgrade/nu5/ for details."
    }
  },
  "consensus": {
    "chaintip": "76b809bb",
    "nextblock": "76b809bb"
  }
}

I have a service file for lightwalletd whose ExecStart is:

/usr/local/lightwallet/lightwalletd --no-tls-very-insecure \
                                    --zcash-conf-path /usr/local/lightwallet/.zcash/zcash.conf \
                                    --log-file /usr/local/lightwallet/server.log

The service is showing as running. A launch of the zecwallet-lite GUI gives me

image

[A previous launch asked for the server; I chose http://127.0.0.1:9067...] Unfortunately, it just stops at that screen there and never launches into the wallet GUI. Ideas? If you need more info, just ask what you want...

LarryRuane commented 4 months ago

The getblockchaininfo output indicates that zcashd is still syncing and has quite a ways to go; could that be related to this problem? Does this problem occur after zcashd is fully synced with the network?

Maybe you can help me reproduce the problem. I maintain lightwalletd for ECC, but I've never used zecwallet-lite. I downloaded the desktop app on my Linux Ubuntu (24.04) desktop from here: https://zecwallet.co/index.html and then ran:

$ sudo dpkg -i ~/Downloads/Zecwallet_Lite_1.8.8_amd64.deb
(Reading database ... 244340 files and directories currently installed.)
Preparing to unpack .../Zecwallet_Lite_1.8.8_amd64.deb ...
Unpacking zecwallet-lite (1.8.8) ...
Setting up zecwallet-lite (1.8.8) ...
Processing triggers for gnome-menus (3.36.0-1.1ubuntu3) ...
Processing triggers for desktop-file-utils (0.27-2build1) ...
Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
$

(Successful.) but when I try to run it, after first starting local instances of zcashd and lightwalletd, and it (zecwallet-lite) fails immediately, and no GUI appears at all:

$ zecwallet-lite 
Trace/breakpoint trap (core dumped)

Is it an operating system mismatch problem?

LarryRuane commented 4 months ago

Also, is this a regression? Did this used to work, and if so, did a new lightwalletd version make it stop working?

sourcesolver commented 4 months ago

I am running debian bookworm 12.6. I installed that same zecwallet-lite package without incident.

I am going to attempt to get zcash synced up before launching the zecwallet-lite.

This used to work. I am trying to re-access the zec in my zecwallet-light-wallet.dat

LarryRuane commented 4 months ago

Okay, thanks for the update. Let me know. It will probably take several days at least for zcashd to finish syncing. I do have a full zcash data directory with lightwalletd enabled, so if the sync is taking too long, maybe sending my copy to you might help (obviously that does require you to have some trust in me, so that's the downside, but I've worked at ECC full-time from 2018 until 2022, and have been an ECC contractor since then).

If, after the zcashd sync finishes, it still doesn't work, I can try to figure out why my zecwallet-lite install isn't working and see if I can reproduce the problem.

This reminds me, we should have a debug option when starting lightwalletd (or maybe it could be enabled at runtime) that would log the gRPCs that it receives (and whether the gRPC succeeds, and maybe some other useful information), that would let us isolate any problem to the lightwalletd side versus the client side when it's unclear where the problem is (as it is in this case). Okay, I just created a new issue, #492. We could actually add this logging and have you run lightwalletd with it enabled immediately (before zcashd finishes syncing), and see if zecwallet is submitting any gRPC calls. I could work on this logging this week, and push a branch and you could run that branch (if that's not too inconvenient for you).

sourcesolver commented 4 months ago

I changed the log-level to 7 on the lightwallet. Will report back.

LarryRuane commented 4 months ago

I changed the log-level to 7 on the lightwallet. Will report back.

That won't do anything. But I'm working on a PR that will make that work, will log gRPC calls. I'll be done soon.

How is the zcashd sync going?

LarryRuane commented 3 months ago

I created PR #494 to help figure out this problem -- can you run that branch (start lightwalletd with the option --log-level 6) and send me the logging messages when lightwalletd is running and the problem is happening? I'd like to know which gRPCs are being run.

If you can't run from a branch, I'll merge that PR and make a new release, but that will take a little longer.

LarryRuane commented 3 hours ago

Hi @sourcesolver, are you still having this problem? If so, have you had a chance to run that branch?