2020-10-29 14:35:17 -04:00
|
|
|
# squeaknode
|
2020-07-02 21:18:10 -07:00
|
|
|
|
2021-09-14 22:56:54 -07:00
|
|
|
Node for [Squeak protocol](https://github.com/yzernik/squeak/blob/master/docs/PROTOCOL.md)
|
2020-07-02 21:18:10 -07:00
|
|
|
|
2020-12-27 23:49:44 -08:00
|
|
|
### Run a node:
|
2020-07-02 21:18:10 -07:00
|
|
|
|
2020-12-27 23:55:28 -08:00
|
|
|
#### Requirements
|
2020-12-27 23:49:44 -08:00
|
|
|
* a bitcoin node
|
|
|
|
|
* an LND node
|
2021-01-08 02:42:32 -08:00
|
|
|
* Python 3.6 or later
|
2020-11-04 23:18:04 -05:00
|
|
|
|
2020-12-27 23:55:28 -08:00
|
|
|
#### Steps
|
2021-09-14 22:53:07 -07:00
|
|
|
- Update the **config.ini** file and fill in the relevant sections to connect to your bitcoin node and lnd node:
|
2020-07-02 21:18:10 -07:00
|
|
|
```
|
2021-09-14 22:53:07 -07:00
|
|
|
[node]
|
|
|
|
|
network=mainnet
|
2020-07-02 21:18:10 -07:00
|
|
|
|
2020-11-06 12:28:34 -05:00
|
|
|
[lnd]
|
2021-09-14 23:32:25 -07:00
|
|
|
host=localhost
|
2020-11-05 16:40:29 -05:00
|
|
|
tls_cert_path=~/.lnd/tls.cert
|
2021-09-14 22:53:07 -07:00
|
|
|
macaroon_path=~/.lnd/data/chain/bitcoin/mainnet/admin.macaroon
|
2020-08-01 21:33:57 -07:00
|
|
|
|
2020-12-27 23:49:44 -08:00
|
|
|
[bitcoin]
|
2021-09-14 23:32:25 -07:00
|
|
|
rpc_host=localhost
|
2021-09-14 22:53:07 -07:00
|
|
|
rpc_port=8332
|
2020-12-27 23:49:44 -08:00
|
|
|
rpc_user=devuser
|
|
|
|
|
rpc_pass=devpass
|
2021-09-15 19:13:34 -07:00
|
|
|
zeromq_hashblock_port=28334
|
2020-12-27 23:49:44 -08:00
|
|
|
|
2020-11-04 23:18:04 -05:00
|
|
|
[webadmin]
|
|
|
|
|
enabled=true
|
|
|
|
|
username=devuser
|
|
|
|
|
password=devpass
|
2020-07-02 21:18:10 -07:00
|
|
|
```
|
2020-10-29 14:35:17 -04:00
|
|
|
- Install squeaknode:
|
2020-07-02 21:18:10 -07:00
|
|
|
```
|
2021-01-08 02:42:32 -08:00
|
|
|
$ pip install -r requirements.txt
|
2020-10-29 14:35:17 -04:00
|
|
|
$ python setup.py install
|
2020-07-02 21:18:10 -07:00
|
|
|
```
|
2020-10-29 14:35:17 -04:00
|
|
|
|
2021-09-15 19:15:54 -07:00
|
|
|
- Start squeaknode:
|
2020-07-02 21:18:10 -07:00
|
|
|
```
|
2021-01-08 14:17:43 -08:00
|
|
|
$ squeaknode --config config.ini
|
2020-07-02 21:18:10 -07:00
|
|
|
```
|
2020-11-05 17:02:58 -05:00
|
|
|
- Go to http://localhost:12994/ and use the username/password in **config.ini** to log in.
|
2020-10-29 14:35:17 -04:00
|
|
|
|
|
|
|
|
## Test
|
|
|
|
|
|
2021-01-08 02:42:32 -08:00
|
|
|
### Unit tests:
|
|
|
|
|
|
|
|
|
|
#### Requirements
|
|
|
|
|
* tox
|
2020-10-29 14:35:17 -04:00
|
|
|
|
|
|
|
|
```
|
|
|
|
|
$ make test
|
|
|
|
|
```
|
|
|
|
|
|
2021-01-08 02:42:32 -08:00
|
|
|
### Integration tests:
|
|
|
|
|
|
|
|
|
|
#### Requirements
|
|
|
|
|
* docker-compose
|
|
|
|
|
* jq
|
2020-10-29 14:35:17 -04:00
|
|
|
|
|
|
|
|
```
|
|
|
|
|
$ make itest
|
|
|
|
|
```
|