Skip to content

Commit

Permalink
1.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
adityapk00 committed Jul 10, 2022
1 parent e919172 commit f0c16ba
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 19 deletions.
28 changes: 20 additions & 8 deletions README.md
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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=<someusername>
rpcpassword=<somepassword>
```

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

```
Expand Down
2 changes: 1 addition & 1 deletion 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
2 changes: 1 addition & 1 deletion bin/printversion.sh
@@ -1,3 +1,3 @@
#!/bin/bash
VERSION="1.8.0-beta2"
VERSION="1.8.0"
echo "VERSION=$VERSION" >> $GITHUB_ENV
2 changes: 1 addition & 1 deletion 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",
Expand Down
23 changes: 18 additions & 5 deletions src/components/LoadingScreen.tsx
Expand Up @@ -104,23 +104,36 @@ class LoadingScreen extends Component<Props, LoadingScreenState> {
} 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) {
// Try to start zcashd
// this.startZcashd();
// this.setupNextGetInfo();
console.log("Cannot start zcashd because it is not supported yet");
this.setState({currentStatus: <div>{errString}<br/>Please make sure zcashd is running.</div>});
this.setState({
currentStatus: (
<div>
{errString}
<br />
Please make sure zcashd is running.
</div>
),
});
}

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) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Sidebar.tsx
Expand Up @@ -276,7 +276,7 @@ class Sidebar extends PureComponent<Props, State> {
"Zecwallet Fullnode",
<div className={cstyles.verticalflex}>
<div className={cstyles.margintoplarge}>
Zecwallet Fullnode v1.8.0-beta2
Zecwallet Fullnode v1.8.0
</div>
<div className={cstyles.margintoplarge}>
Built with Electron. Copyright (c) 2018-2021, Aditya Kulkarni.
Expand Down
18 changes: 16 additions & 2 deletions src/rpc.ts
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit f0c16ba

Please sign in to comment.