From f0c16ba145c0da524b8f163ceaf157544d4f6c62 Mon Sep 17 00:00:00 2001 From: Aditya Kulkarni Date: Fri, 8 Jul 2022 12:07:20 -0500 Subject: [PATCH] 1.8.0 --- README.md | 28 ++++++++++++++++++++-------- bin/printversion.ps1 | 2 +- bin/printversion.sh | 2 +- package.json | 2 +- src/components/LoadingScreen.tsx | 23 ++++++++++++++++++----- src/components/Sidebar.tsx | 2 +- src/rpc.ts | 18 ++++++++++++++++-- 7 files changed, 58 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 16856e1c..b80fbbb6 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ ZecWallet Fullnode is a z-Addr first, Sapling compatible wallet and full node fo # Installation -**Note**: Zecwallet Fullnode will download the **entire blockchain (about 26GB)**, and requires some familiarity with the command line. If you don't want to download the blockchain but prefer a Lite wallet, please check out [Zecwallet Lite](https://www.zecwallet.co). +**Note**: Zecwallet Fullnode will download the **entire blockchain (about 36GB)**, and requires some familiarity with the command line. If you don't want to download the blockchain but prefer a Lite wallet, please check out [Zecwallet Lite](https://www.zecwallet.co). Head over to the releases page and grab the latest installers or binary. https://www.zecwallet.co @@ -14,13 +14,13 @@ Head over to the releases page and grab the latest installers or binary. https:/ If you are on Debian/Ubuntu, please download the '.AppImage' package and just run it. ``` -./Zecwallet.Fullnode-1.8.0-beta2.AppImage +./Zecwallet.Fullnode-1.8.0.AppImage ``` If you prefer to install a `.deb` package, that is also available. ``` -sudo apt install -f ./zecwallet_1.8.0-beta2_amd64.deb +sudo apt install -f ./zecwallet_1.8.0_amd64.deb ``` ### Windows @@ -31,23 +31,35 @@ Download and run the `.msi` installer and follow the prompts. Alternately, you c Double-click on the `.dmg` file to open it, and drag `Zecwallet Fullnode` on to the Applications link to install. -## zcashd +## Running zcashd ZecWallet needs a Zcash node running zcashd. If you already have a zcashd node running, ZecWallet will connect to it. -If you don't have one, ZecWallet will start its embedded zcashd node. +You need to manually start the zcashd node so that Zecwallet can connect to it. The first time you run zcashd, you need to: -Additionally, if this is the first time you're running ZecWallet or a zcashd daemon, ZecWallet will download the Zcash params (~777 MB) and configure `zcash.conf` for you. +1. Create a zcash.conf file with at least: + +``` +server=1 +rpcuser= +rpcpassword= +``` + +2. Run `./fetch-params.sh` to get the Zcash params + +3. Run `./zcashd-wallet-tool` to configure your seed phrase and set up your Orchard accounts. + +All binaries needed are included in the distribution. ## Compiling from source -ZecWallet is written in Electron/Javascript and can be build from source. Note that if you are compiling from source, you won't get the embedded zcashd by default. You can either run an external zcashd, or compile zcashd as well. +ZecWallet is written in Electron/Typescript and can be build from source. Note that if you are compiling from source, you won't get the embedded zcashd by default. You can either run an external zcashd, or compile zcashd as well. #### Pre-Requisits You need to have the following software installed before you can build Zecwallet Fullnode -- Nodejs v12.16.1 or higher - https://nodejs.org +- Nodejs v14 or higher - https://nodejs.org - Yarn - https://yarnpkg.com ``` diff --git a/bin/printversion.ps1 b/bin/printversion.ps1 index 9ccc53f9..0879a7f3 100644 --- a/bin/printversion.ps1 +++ b/bin/printversion.ps1 @@ -1 +1 @@ -echo "VERSION=1.8.0-beta2" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append +echo "VERSION=1.8.0" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append diff --git a/bin/printversion.sh b/bin/printversion.sh index 8610dd36..e3ea8269 100755 --- a/bin/printversion.sh +++ b/bin/printversion.sh @@ -1,3 +1,3 @@ #!/bin/bash -VERSION="1.8.0-beta2" +VERSION="1.8.0" echo "VERSION=$VERSION" >> $GITHUB_ENV diff --git a/package.json b/package.json index d00babf9..31637331 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "zecwallet", "productName": "Zecwallet Fullnode", - "version": "1.8.0-beta2", + "version": "1.8.0", "description": "Zecwallet Fullnode (Electron version)", "private": true, "main": "./public/electron.js", diff --git a/src/components/LoadingScreen.tsx b/src/components/LoadingScreen.tsx index b1c67a4f..7cf76d2e 100644 --- a/src/components/LoadingScreen.tsx +++ b/src/components/LoadingScreen.tsx @@ -104,8 +104,6 @@ class LoadingScreen extends Component { } catch (err) { // Not yet finished loading. So update the state, and setup the next refresh const errString: string = (err as any).toString(); - this.setState({ currentStatus: errString }); - const noConnection = errString.indexOf("NO_CONNECTION") > 0; if (noConnection) { @@ -113,14 +111,29 @@ class LoadingScreen extends Component { // this.startZcashd(); // this.setupNextGetInfo(); console.log("Cannot start zcashd because it is not supported yet"); - this.setState({currentStatus:
{errString}
Please make sure zcashd is running.
}); + this.setState({ + currentStatus: ( +
+ {errString} +
+ Please make sure zcashd is running. +
+ ), + }); } - if (noConnection && zcashdSpawned && getinfoRetryCount < 10) { + if (errString.indexOf('"code":-28') > 0) { this.setState({ currentStatus: "Waiting for zcashd to start..." }); const inc = getinfoRetryCount + 1; this.setState({ getinfoRetryCount: inc }); - this.setupNextGetInfo(); + } else if (errString.indexOf('"code":-8') > 0) { + this.setState({ + currentStatus: + "No accounts. Please run 'zcashd-wallet-tool' to create your wallet first...", + }); + } else { + // Generic error. + this.setState({ currentStatus: errString }); } if (noConnection && zcashdSpawned && getinfoRetryCount >= 10) { diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx index 0b44b3e2..e0569888 100644 --- a/src/components/Sidebar.tsx +++ b/src/components/Sidebar.tsx @@ -276,7 +276,7 @@ class Sidebar extends PureComponent { "Zecwallet Fullnode",
- Zecwallet Fullnode v1.8.0-beta2 + Zecwallet Fullnode v1.8.0
Built with Electron. Copyright (c) 2018-2021, Aditya Kulkarni. diff --git a/src/rpc.ts b/src/rpc.ts index 8e83872f..22c8057b 100644 --- a/src/rpc.ts +++ b/src/rpc.ts @@ -119,7 +119,14 @@ export default class RPC { latestBlockHeight = await this.fetchInfo(); } catch (err) { // If we caught an error, there's something wrong with the connection. - this.fnSetDisconnected(`${err}`); + const errString = `${err}`; + if (errString.indexOf('"code":-8') > 0) { + this.fnSetDisconnected( + "No accounts. Please run 'zcashd-wallet-tool' to create your wallet first..." + ); + } else { + this.fnSetDisconnected(errString); + } return; } @@ -174,7 +181,14 @@ export default class RPC { console.log(`Finished full refresh at ${latestBlockHeight}`); } catch (err) { // If we caught an error, there's something wrong with the connection. - this.fnSetDisconnected(`${err}`); + const errString = `${err}`; + if (errString.indexOf('"code":-8') > 0) { + this.fnSetDisconnected( + "No accounts. Please run 'zcashd-wallet-tool' to create your wallet first..." + ); + } else { + this.fnSetDisconnected(errString); + } return; } } else {