Update README
This commit is contained in:
parent
2941299202
commit
02db546516
83
README.md
83
README.md
|
@ -1,87 +1,10 @@
|
||||||
# Overview
|
# Overview
|
||||||
|
|
||||||
Zecwallet lightwalletd is a fork of [lightwalletd](https://github.com/adityapk00/lightwalletd) from the ECC.
|
Zecwallet lightwalletd is an API-compatible fork of [lightwalletd](https://github.com/zcash/lightwalletd) from the ECC. Since the API is compatible Zecwallet Lite will work with any LightwalletD. This fork is maintained by Zecwallet to ease integrations and experiments with the Lightwallet protocol.
|
||||||
|
|
||||||
It is a backend service that provides a bandwidth-efficient interface to the Zcash blockchain for the [Zecwallet light wallet](https://github.com/adityapk00/zecwallet-lite-lib).
|
LightwalletD is a backend service that provides a bandwidth-efficient interface to the Zcash blockchain for the [Zecwallet light wallet](https://github.com/adityapk00/zecwallet-lite-lib).
|
||||||
|
|
||||||
## 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
|
## Running your own zeclite lightwalletd
|
||||||
|
Please see instructions at the [LightwalletD Readme](https://github.com/zcash/lightwalletd/blob/master/README.md)
|
||||||
#### 0. First, install [Go >= 1.11](https://golang.org/dl/#stable).
|
|
||||||
|
|
||||||
#### 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](https://www.nginx.com/blog/using-free-ssltls-certificates-from-lets-encrypt-with-nginx/)
|
|
||||||
|
|
||||||
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
|
|
||||||
```
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
FROM scratch
|
|
||||||
|
|
||||||
COPY main /
|
|
||||||
|
|
||||||
ENTRYPOINT ["/main"]
|
|
|
@ -1,28 +0,0 @@
|
||||||
-----BEGIN PRIVATE KEY-----
|
|
||||||
MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCertVgQ0jHcqW9
|
|
||||||
NvPszU9Mwi5jsin6edmCIBFLEDdOBBCWd9fkDkVHcaLNgq2uf1DYnhaWcSHiUiP2
|
|
||||||
D7sUrtFdR9JZc9REwOwaOInk+ughiGPQ06nnOlhxbHH4TF3hwXLBe1LvEVL7SP3s
|
|
||||||
liBi88oITC1YrTQ2BXi3vKwL7FsTuCLn8+hlw/l5WNt+JZyA9GvXjwLLr8yf3Xi+
|
|
||||||
8HRn3vRyIwy6rxFf2xYmTK0+5pBGBGhkuKuz/V3mJO9hyw8702ccdc7Vi+yETvIr
|
|
||||||
I6BjmQgH8AzM3J2JjZ/4Jbc78WjTqC8/P7ve4YW19rKmJKvqeY73x2CXC80PQZ8J
|
|
||||||
2nVMtlu7AgMBAAECggEAXBGi2jSP4LEjevKMeuPw09+C3PN9qcfTLM4AWqYxAIIZ
|
|
||||||
QcSNLdQd3EMRq93befiC5vxqrKU9fLweA2HDMU/xSAcpBB/RlIa/NsOBNqthzjr9
|
|
||||||
dyeoV/IhaMX8Jo3gluEP/TTZvL43gHcsZX4BkohSu5e/Y8kzFvj7vteol05u1bRB
|
|
||||||
607DW6ONN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3mN
|
|
||||||
f2hkrrLIVqsXP2CSOOTZtONsO3VRPaNjdLzreR5V6Oc9StOD/2CPcvaHcaRMaoDl
|
|
||||||
ylpUUJpnIUaIIRZQvN9GlA==
|
|
||||||
-----END PRIVATE KEY-----
|
|
|
@ -1,21 +0,0 @@
|
||||||
-----BEGIN CERTIFICATE-----
|
|
||||||
MIIDizCCAnOgAwIBAgIUevPATPP74qY3JPE6s3axxnC8rxwwDQYJKoZIhvcNAQEL
|
|
||||||
BQAwVTELMAkGA1UEBhMCVVMxCzAJBgNVBAgMAkNBMRQwEgYDVQQKDAtNeU9yZywg
|
|
||||||
SW5jLjEjMCEGA1UEAwwabGlnaHR3YWxsZXRkLnRlc3RuZXQubG9jYWwwHhcNMTkx
|
|
||||||
MjE4MTQyNDU0WhcNMjkxMjE1MTQyNDU0WjBVMQswCQYDVQQGEwJVUzELMAkGA1UE
|
|
||||||
CAwCQ0ExFDASBgNVBAoMC015T3JnLCBJbmMuMSMwIQYDVQQDDBpsaWdodHdhbGxl
|
|
||||||
dGQudGVzdG5ldC5sb2NhbDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
|
|
||||||
AJ6u1WBDSMdypb028+zNT0zCLmOyKfp52YIgEUsQN04EEJZ31+QORUdxos2Cra5/
|
|
||||||
UNieFpZxIeJSI/YPuxSu0V1H0llz1ETA7Bo4ieT66CGIY9DTqec6WHFscfhMXeHB
|
|
||||||
csF7Uu8RUvtI/eyWIGLzyghMLVitNDYFeLe8rAvsWxO4Iufz6GXD+XlY234lnID0
|
|
||||||
a9ePAsuvzJ/deL7wdGfe9HIjDLqvEV/bFiZMrT7mkEYEaGS4q7P9XeYk72HLDzvT
|
|
||||||
Zxx1ztWL7IRO8isjoGOZCAfwDMzcnYmNn/gltzvxaNOoLz8/u97hhbX2sqYkq+p5
|
|
||||||
jvfHYJcLzQ9BnwnadUy2W7sCAwEAAaNTMFEwHQYDVR0OBBYEFFNfTC+B2/frL5N+
|
|
||||||
h85UjP4Ijq/dMB8GA1UdIwQYMBaAFFNfTC+B2/frL5N+h85UjP4Ijq/dMA8GA1Ud
|
|
||||||
EwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHHE3+/Hn6q5N7P1ImyZwB2s
|
|
||||||
a6y98BPbmgDpb3iWVGhiPRw2vE7/iW8aJwCPQLl9RJZsyGM447CdxsGbw4U5hBkl
|
|
||||||
NlFFRBX4b7YLuDrDeTonaIiceWaDbKYqQHggIMZMoXdRnmQQcvuJUUsDnrk1GhQQ
|
|
||||||
jI58LT4tPl8Xz780NB1+ZjGuVYPnyjk0NRHGSytNEr2KddpCrfJDRoGPRUIMuc7b
|
|
||||||
gRDQCJ5tw0heJ1HYJcyX1LzZP3u2CX3TqCvYvTSHVwbXgJ6LLOJffXR0b3FwldMa
|
|
||||||
YwKriZ9NC6wdEdEGtwN0I0rSMOaHMK0+3jMv2Lg9NCubF0p4l19KF9yANdXc+bs=
|
|
||||||
-----END CERTIFICATE-----
|
|
|
@ -1,6 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
## In debian
|
|
||||||
# apt-get update && apt-get install -y openssl
|
|
||||||
|
|
||||||
openssl req -x509 -nodes -newkey rsa:2048 -keyout ./cert.key -out ./cert.pem -days 3650 -subj "/C=US/ST=CA/O=MyOrg, Inc./CN=lightwalletd.testnet.local" -reqexts SAN -config <(cat /etc/ssl/openssl.cnf <(printf "\n[SAN]\nsubjectAltName=DNS:lightwalletd.testnet.local,DNS:127.0.0.1,DNS:localhost"))
|
|
|
@ -1,11 +0,0 @@
|
||||||
apiVersion: 1
|
|
||||||
datasources:
|
|
||||||
- name: Loki
|
|
||||||
type: loki
|
|
||||||
access: proxy
|
|
||||||
orgId: 1
|
|
||||||
url: http://loki:3100
|
|
||||||
version: 1
|
|
||||||
editable: false
|
|
||||||
jsonData:
|
|
||||||
maxLines: 1000
|
|
|
@ -1,9 +0,0 @@
|
||||||
apiVersion: 1
|
|
||||||
datasources:
|
|
||||||
- name: Prometheus
|
|
||||||
type: prometheus
|
|
||||||
access: proxy
|
|
||||||
orgId: 1
|
|
||||||
url: http://prometheus:9090
|
|
||||||
version: 1
|
|
||||||
editable: false
|
|
|
@ -1,27 +0,0 @@
|
||||||
# my global config
|
|
||||||
global:
|
|
||||||
scrape_interval: 15s # Set the scrape interval to every 15 seconds. Default is every 1 minute.
|
|
||||||
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
|
|
||||||
# scrape_timeout is set to the global default (10s).
|
|
||||||
|
|
||||||
# Alertmanager configuration
|
|
||||||
alerting:
|
|
||||||
alertmanagers:
|
|
||||||
- static_configs:
|
|
||||||
- targets:
|
|
||||||
# - alertmanager:9093
|
|
||||||
|
|
||||||
# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
|
|
||||||
rule_files:
|
|
||||||
# - "first_rules.yml"
|
|
||||||
# - "second_rules.yml"
|
|
||||||
|
|
||||||
# A scrape configuration containing exactly one endpoint to scrape:
|
|
||||||
# Here it's Prometheus itself.
|
|
||||||
scrape_configs:
|
|
||||||
- job_name: 'zcashd_exporter'
|
|
||||||
static_configs:
|
|
||||||
- targets: ['zcashd_exporter:9100']
|
|
||||||
- job_name: 'lightwalletd'
|
|
||||||
static_configs:
|
|
||||||
- targets: ['lightwalletd:9068']
|
|
|
@ -1,4 +0,0 @@
|
||||||
rpcuser=zcashrpc
|
|
||||||
rpcpassword=notsecure
|
|
||||||
rpcbind=zcashd
|
|
||||||
rpcport=3434
|
|
Loading…
Reference in New Issue