Go to file
adityapk00 0605b33e39 Merge 2021-04-19 13:38:25 -07:00
.github Merge branch 'master' into lindanlee-templates-2 2020-06-01 15:04:56 -05:00
cmd allow Ping testing grpc only if explicitly enabled 2021-03-08 12:25:02 -07:00
common Merge 2021-04-19 13:38:25 -07:00
docker Merge 2021-04-19 13:38:25 -07:00
docs Fix typos 2020-12-21 13:03:41 -07:00
frontend Merge 2021-04-19 13:38:25 -07:00
kubernetes/tekton Added serviceaccount for tekton 2020-08-31 09:55:32 -04:00
parser Merge 2021-04-19 13:38:25 -07:00
tekton Added tekton for Docker image build 2020-03-23 15:01:04 -04:00
testclient add a gRPC test client for performance measurement and stress testing 2020-03-19 21:10:47 -06:00
testdata add zcashd versioning to GetLightdInfo result 2020-12-03 22:55:08 -07:00
testtools eliminate genblocks compile warning 2021-04-07 10:45:46 -06:00
utils fix pullblocks.sh for macOS 2020-11-04 08:25:14 -07:00
vendor generalize GetAddressUtxos to accept taddr list 2021-04-08 11:22:12 -06:00
walletrpc Merge 2021-04-19 13:38:25 -07:00
.codecov.yml Update .codecov.yml 2019-10-29 16:21:39 -07:00
.env.template Moved HTTP endpoint startup to a fucntion 2020-04-09 10:27:08 -06:00
.gitignore increase the 252 per-block transaction limit (#273) 2020-06-03 18:58:26 -06:00
.gitlab-ci.yml Updated Makefile for new build options 2020-03-18 08:56:29 -06:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2019-09-19 19:26:16 -07:00
CONTRIBUTING.md Fix typos 2020-12-21 13:03:41 -07:00
COPYING add COPYING and copyright lines 2020-03-12 12:02:55 -06:00
Dockerfile Fix typos 2020-12-21 13:03:41 -07:00
LICENSE Create LICENSE 2019-09-19 19:21:48 -07:00
Makefile Update protoc grpc toolchain to latest 2021-01-05 18:20:10 -07:00
README.md Merge 2021-04-19 13:38:25 -07:00
build.sh Build into dockerfile 2020-06-25 21:31:33 -07:00
buildenv.sh Added per-instance password by moving to an environment build script. 2019-12-20 14:15:45 -08:00
docgen.sh add documentation for lightwalletd APIs and data types 2020-03-02 17:21:41 -07:00
docker-compose.yml Revert "Update compose for new LWD config params" 2020-06-08 13:27:16 -04:00
go.mod Merge 2021-04-19 13:38:25 -07:00
go.sum Merge 2021-04-19 13:38:25 -07:00
lightwalletd-example.yml Example usage of cobra and viper for configuration 2020-03-18 08:56:29 -06:00
main.go rebase PR 175 - Use cobra and viper for configuration 2020-03-18 12:13:30 -06:00

README.md

Overview

Zecwallet lightwalletd is a fork of lightwalletd from the ECC.

It is a backend service that provides a bandwidth-efficient interface to the Zcash blockchain for the Zecwallet light wallet.

Changes from upstream lightwalletd

This version of Zecwallet lightwalletd extends lightwalletd and:

  • Adds support for transparent addresses
  • Adds several new RPC calls for lightclients
  • Lots of perf improvements
    • Replaces SQLite with in-memory cache for Compact Blocks
    • Replace local Txstore, delegating Tx lookups to Zcashd
    • Remove the need for a separate ingestor

Running your own zeclite lightwalletd

0. First, install Go >= 1.11.

1. Run a zcash node.

Start a zcashd with the following options:

server=1
rpcuser=user
rpcpassword=password
rpcbind=127.0.0.1
rpcport=8232
experimentalfeatures=1
txindex=1
insightexplorer=1

You might need to run with -reindex the first time if you are enabling the txindex or insightexplorer options for the first time. The reindex might take a while. If you are using it on testnet, please also include testnet=1

2. Get a TLS certificate

a. "Let's Encrypt" certificate using NGINX as a reverse proxy

If you running a public-facing server, the easiest way to obtain a certificate is to use a NGINX reverse proxy and get a Let's Encrypt certificate. Instructions are here

Create a new section for the NGINX reverse proxy:

server {
    listen 443 ssl http2;
 
 
    ssl_certificate     ssl/cert.pem; # From certbot
    ssl_certificate_key ssl/key.pem;  # From certbot
    
    location / {
        # Replace localhost:9067 with the address and port of your gRPC server if using a custom port
        grpc_pass grpc://localhost:9067;
    }
}
b. Use without TLS certificate

You can run lightwalletd without TLS and server traffic over http. This is recommended only for local testing

3. Run the frontend:

You can run the gRPC server with or without TLS, depending on how you configured step 2. If you are using NGINX as a reverse proxy and are letting NGINX handle the TLS authentication, then run the frontend with -no-tls

go run cmd/server/main.go -bind-addr 127.0.0.1:9067 -conf-file ~/.zcash/zcash.conf -no-tls

Type ./lightwalletd help to see the full list of options and arguments.

Production Usage

If you have a certificate that you want to use (either self signed, or from a certificate authority), pass the certificate to the frontend:

go run cmd/server/main.go -bind-addr 127.0.0.1:443 -conf-file ~/.zcash/zcash.conf  -tls-cert cert.pem -tls-key key.pem

You should start seeing the frontend ingest and cache the zcash blocks after ~15 seconds.

4. Point the zecwallet-cli to this server

Connect to your server!

./zecwallet-cli -server https://mylightwalletd.server.com:443

If you are using your own server running without TLS, you can also connect over http

./zecwallet-cli --server http://127.0.0.1:9067