added notes on the multiple zcashd.conf files

This commit is contained in:
Sasha 2021-09-28 19:13:35 -05:00 committed by GitHub
parent ca4905a6a2
commit f84af8fe71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 36 additions and 1 deletions

View File

@ -16,8 +16,9 @@ Copy `.env.example` to `.env` and change any required paramaters.
| ------------- |:-------------:|
| `GF_SECURITY_ADMIN_USER` | Grafana admin user name |
| `ZCASHD_RPCUSER` | zcashd rpc user |
| `ZCASHD_RPCPASSWORD` | zcashd rpc password |
| `ZCASHD_RPCPORT` | zcashd rpc port |
|`ZCASHD_ALLOWIP`| zcashd rpc allowed IPs (don't |change unless you know what you're doing)|
|`ZCASHD_ALLOWIP`| zcashd rpc allowed IPs (don't change unless you know what you're doing)|
|`ZCASHD_DATADIR`| local location of zcashd data directory. `uid` 2001 needs write access|
|`ZCASHD_PARMDIR`| local location of zcashd data directory. `uid` 2001 needs read access|
|`ZCASHD_NETWORK`| zcashd network to use, `testnet` or `mainnet`|
@ -32,6 +33,25 @@ Copy `.env.example` to `.env` and change any required paramaters.
./buildenv.sh | tee .env
```
## Edit the two zcash.conf files
There are two zcash.conf files; one read by zcashd, one read by lightwalletd.
### `$ZCASHD_DATADIR/zcash.conf` -- read by zcashd
The zcashd's `zcash.conf` needs to look like:
```
rpcuser=zcashrpc
rpcpassword=Z7V7IoXt6I0OVuKr7TpHjxAnE6NvB/ZBRdM6x9w/OAU=
experimentalfeatures=1
lightwalletd=1
```
`rpcuser` and `rpcpassword` must be set, as lightwalletd doesn't work with RPC cookies (see the [rpcpassword](https://zcash.readthedocs.io/en/latest/rtd_pages/zcash_conf_guide.html) documentation) for authentication.
`rpcuser` and `rpcpassword` in `.env` are only used by zcashd_exporter, but they also must be the same values as in `$ZCASHD_DATADIR/zcash.conf`
### `lightwalletd/docker/zcash.conf` -- read by lightwalletd
The other `zcashd.conf` -- the one read by lightwalletd -- needs to have `rpcbind` (the address of the zcashd it will connect to) set to `zcashd` -- docker-compose networking will make it resolve to the right IP address. Also, it needs to have the same `rpcuser` and `rpcpassword` values that are listed in `$ZCASHD_DATADIR/zcash.conf` to be able to authenticate.
## Build initial local docker image
`docker-compose build`
@ -98,3 +118,18 @@ Loki as a rich query syntax to help with log in many ways, for example combine 2
![grafana-explore4](./images/grafana-explore-4.png)
See more here: https://github.com/grafana/loki/blob/master/docs/logql.md
# Exposing to the network
Edit `docker-compose.yml` to look like
```
ports:
#- "127.0.0.1:$LWD_GRPC_PORT:$LWD_GRPC_PORT"
#- "127.0.0.1:$LWD_HTTP_PORT:$LWD_HTTP_PORT"
- "0.0.0.0:$LWD_GRPC_PORT:$LWD_GRPC_PORT"
- "0.0.0.0:$LWD_HTTP_PORT:$LWD_HTTP_PORT"
```
When you edit these lines in `docker-compose.yml`, stopping/starting the individual `lightwalletd` container doesn't actually make the changes happen -- you have to stop/start the whole `docker-compose` ensemble of containers because the ports/network config stuff lives at that level and doesn't seem to be affected by individual container stop/starts. Also if you want to expose `lightwalletd` to the whole internet, you don't need to specify an IP address, `0.0.0.0` works as it should.