Browse Source

Merge pull request 'merging dev into master' (#55) from master into dev

Reviewed-on: #55
pull/56/head
jahway603 11 months ago
parent
commit
82563fd362
  1. 31
      README.md
  2. 32
      doc/man/lightwalletd.1

31
README.md

@ -95,6 +95,7 @@ Then run the lightwalletd frontend with the following:
Note: we use the "--no-tls" option as we are using NGINX as a reverse proxy and letting it handle the TLS authentication for us instead. If you want to do TLS directly with lightwalletd with no reverse proxy, see the next section.
If you encounter an error about the lightwalletd "data directory", then set one on the command line with `--data-dir` (OR) create the `/var/lib/lightwalletd` and `/var/lib/lightwalletd/db` directories & chown that new db directory as the user account running lightwalletd and hushd.
##### Option B: "Let's Encrypt" certificate just using lightwalletd without NGINX
The other option is to configure lightwalletd to handle its own TLS authentication. Once you have a certificate that you want to use (from a certificate authority), pass the certificate to the frontend as follows:
@ -116,6 +117,31 @@ cargo build --release
* If you have trouble compiling silentdragonlite-cli, then [please refer to it's separate documentation here](https://git.hush.is/hush/silentdragonlite-cli) on how to build it and what pre-requisites need to be installed.
You can also do testing with https://github.com/fullstorydev/grpcurl
## Running a server for Hush Smart Chains
This lightwalletd code can be used with any Hush Smart Chain. For example, here is how you would
run the lightwalletd for DragonX :
```
./lightwalletd --grpc-bind-addr localhost:9069 --http-bind-addr localhost:9070 --hush-conf-path ~/.hush/DRAGONX/DRAGONX.conf --no-tls --rpcport=21769
```
For this code, your Nginx config will need to use the same GRPC port, so something like `grpc_pass grpc://localhost:9069;`
The above code should be compatible with running a lightwalletd on the same server that runs one for Hush, which by default uses ports 9067 for grpc
and 9068 for http. If you are only running a single lightwalletd on a server, the following should work for DragonX :
```
./lightwalletd --grpc-bind-addr localhost:9069 --http-bind-addr localhost:9070 --hush-conf-path ~/.hush/DRAGONX/DRAGONX.conf --no-tls --rpcport=21769
```
To run lightwalletd for other HSC's, you must specific the correct RPC port via `--rpcport` , point to it's config file via `--hush-conf-path` and
use use unique ports that nothing else is using for `--grpc-bind-addr` and `--http-bind-addr` . Make sure your nginx config `grpc_pass` port matches
what you give to `--grpc-bin-addr` .
## Lightwalletd Command-line Options
These are some of the most used command line options for lightwalletd:
@ -123,14 +149,17 @@ These are some of the most used command line options for lightwalletd:
| CLI option | Default | What it does |
|------------|:--------------:|------------------------------:|
| --grpc-bind-addr | 127.0.0.1:9067 | address and port to listen on |
| --grpc-bind-addr | 127.0.0.1:9067 | address and port to listen on via GRPC |
| --http-bind-addr | 127.0.0.1:9068 | address and port to listen on vi HTTP |
| --tls-cert | blank | the path to a TLS certificate |
| --tls-key | blank | the path to a TLS key file |
| --no-tls | false | Disable TLS, serve un-encrypted traffic |
| --data-dir | /var/lib/lightwalletd | Sets the lightwalletd data directory |
| --log-file | blank | log file to write to |
| --log-level | logrus.InfoLevel | log level 1 thru 7 (something from logrus)|
| --hush-conf-path | blank | conf file to pull RPC creds from |
| --cache-size| 40000 | number of blocks to hold in the cache |
| --rpcport | 18031 | RPC port |
Run `./lightwalletd --help` to see all options.

32
doc/man/lightwalletd.1

@ -1,6 +1,6 @@
.TH LIGHTWALLET "1" "October 2021" "lightwalletd v0.1.1" "User Commands"
.TH LIGHTWALLET "1" "December 2022" "lightwalletd v0.1.2" "User Commands"
.SH NAME
lightwalletd \- manual page for hush lightwalletd v0.1.1
lightwalletd \- manual page for hush lightwalletd v0.1.2
.SH DESCRIPTION
.B lightwalletd
runs a lightwallet daemon for a Hush Silent Dragon Lite node.
@ -23,35 +23,39 @@ Display version information
.IP
Display command line options
.HP
\fB\-conf-file\fR [conf_file location]
\fB\--hush-conf-path\fR [conf_file location]
.IP
Configures your HUSH3.conf file location [Required to run]. Typically ~/.hush/HUSH3/HUSH3.conf
Configures your HUSH3.conf file location to pull RPC creds from (default "./HUSH3.conf")
.HP
\fB\-bind-addr \fRhost.net:chosen_port
\fB\--data-dir\fR [location]
.IP
Set host.net to either a FQDN or 127.0.0.1 depending on your configuration [Required to run]. Most common port is 9067 unless changed.
Configures your lightwalletd data directory (such as db) (default "/var/lib/lightwalletd")
.HP
\fB\-no-tls
\fB\--grpc-bind-addr \fRlocalhost:chosen_port
.IP
Disable TLS, serve un-encrypted traffic. Toggle depending on your configuration.
The address to listen for grpc on (default "localhost:9067")
.HP
\fB\-cache-size \fRint
\fB\--no-tls
.IP
Run without TLS, only safe if a reverse proxy like nginx does TLS on localhost.
.HP
\fB\--cache-size \fRint
.IP
Set number of blocks to hold in the cache (default 40000)
.HP
\fB\-log-file \fRstring
\fB\--log-file \fRstring
.IP
Set log file to write to
.HP
\fB\-log-level \fRuint
\fB\--log-level \fRuint
.IP
log level (logrus 1-7) (default 4)
.HP
\fB\-tls-cert \fRstring
\fB\--tls-cert \fRstring
.IP
the path to a TLS certificate (optional)
.HP
\fB\-tls-key \fRstring
\fB\--tls-key \fRstring
.IP
the path to a TLS key file (optional)
@ -59,7 +63,7 @@ the path to a TLS key file (optional)
In order to ensure you are adequately protecting your privacy when using Hush,
please see <https://hush.is/security/>.
Copyright (C) 2021 Jahway603 and The Hush Developers
Copyright (C) 2021-2022 Jahway603 and The Hush Developers
This is experimental Free Software! Fuck Yeah!!!!!

Loading…
Cancel
Save