Adjusted docs and small tweaks

This commit is contained in:
kexkey
2018-10-12 13:21:25 -04:00
parent e1ee367430
commit 9babb26d5f
6 changed files with 13 additions and 35 deletions

View File

@@ -31,14 +31,11 @@ docker network create --driver=overlay --attachable --opt encrypted cyphernodene
git clone https://github.com/SatoshiPortal/cyphernode.git
cd cyphernode/
vi proxy_docker/env.properties
vi proxy_docker/app/config/config.properties
```
*Make sure user have same rpcuser and rpcpassword values as in bitcoin node's bitcoin.conf file (see below)*
```shell
vi proxy_docker/app/config/watcher_btcnode_curlcfg.properties
vi proxy_docker/app/config/spender_btcnode_curlcfg.properties
vi cron_docker/env.properties
vi pycoin_docker/env.properties
```

View File

@@ -49,9 +49,6 @@ debian@dev:~/dev/Cyphernode$ docker network connect cyphernodenet yourappcontain
```shell
debian@dev:~/dev/Cyphernode$ vi proxy_docker/env.properties
debian@dev:~/dev/Cyphernode$ vi proxy_docker/app/config/config.properties
debian@dev:~/dev/Cyphernode$ vi proxy_docker/app/config/watcher_btcnode_curlcfg.properties
debian@dev:~/dev/Cyphernode$ vi proxy_docker/app/config/spender_btcnode_curlcfg.properties
debian@dev:~/dev/Cyphernode$ vi cron_docker/env.properties
debian@dev:~/dev/Cyphernode$ vi pycoin_docker/env.properties
```
@@ -100,11 +97,7 @@ pi@SP-BTC01:~ $ docker swarm join --token SWMTKN-1-2pxouynn9g8si42e8g9ujwy0v9po4
[See how to build Bitcoin Node image](https://github.com/SatoshiPortal/dockers/tree/master/rpi/bitcoin-core)
### Run node or connect already-running node
```shell
pi@SP-BTC01:~ $ docker run -d --rm --mount type=bind,source="$HOME/.bitcoin",target="/bitcoinuser/.bitcoin" --name btcnode --network cyphernodenet btcnode
```
### Connect already-running node
```shell
pi@SP-BTC01:~ $ docker network connect cyphernodenet btcnode

View File

@@ -7,7 +7,11 @@ We assume you are the user pi on a Raspberry Pi.
```properties
TRACING=1
WATCHER_BTC_NODE_RPC_URL=btcnode:18332/wallet/watching01.dat
WATCHER_BTC_NODE_RPC_USER=rpc_username:rpc_password
WATCHER_BTC_NODE_RPC_CFG=/proxy/watcher_btcnode_curlcfg.properties
SPENDER_BTC_NODE_RPC_URL=btcnode:18332/wallet/spending01.dat
SPENDER_BTC_NODE_RPC_USER=rpc_username:rpc_password
SPENDER_BTC_NODE_RPC_CFG=/proxy/spender_btcnode_curlcfg.properties
PROXY_LISTENING_PORT=8888
# Variable substitutions don't work
DB_PATH=/proxy/db
@@ -16,26 +20,10 @@ DB_FILE=/proxy/db/proxydb
PYCOIN_CONTAINER=pycoinnode:7777
# OTS container
OTS_CONTAINER=otsnode:6666
```
## Set your Watching Bitcoin node RPC credentials in `app/config/watcher_btcnode_curlcfg.properties`
```properties
user=rpc_username:rpc_password
```
## Set your Spending Bitcoin node RPC credentials in `app/config/spender_btcnode_curlcfg.properties`
```properties
user=rpc_username:rpc_password
```
## Set your address derivation information in `app/config/derivation.properties`
```properties
derivation.xpub=upub5GtUcgGed1aGH4HKQ3vMYrsmLXwmHhS1AeX33ZvDgZiyvkGhNTvGd2TA5Lr4v239Fzjj4ZY48t6wTtXUy2yRgapf37QHgt6KWEZ6bgsCLpb
derivation.path=0/n
watchingnode.pruned=false
DERIVATION_PUB32=upub5GtUcgGed1aGH4HKQ3vMYrsmLXwmHhS1AeX33ZvDgZiyvkGhNTvGd2TA5Lr4v239Fzjj4ZY48t6wTtXUy2yRgapf37QHgt6KWEZ6bgsCLpb
DERIVATION_PATH=0/n
WATCHER_BTC_NODE_PRUNED=false
```
## Building docker image

View File

@@ -31,7 +31,7 @@ createCurlConfig() {
}
if [ ! -e ${DB_FILE} ]; then
echo "DB not found, creating..." > /dev/stderr
echo "DB not found, creating..." 1>&2
cat watching.sql | sqlite3 $DB_FILE
fi

View File

@@ -1,7 +1,7 @@
#!/bin/sh
read line
echo ${line} > /dev/stderr
echo ${line} 1>&2
echo -ne "HTTP/1.1 200 OK\r\n"
echo -e "Content-Type: application/json\r\nContent-Length: 0\r\n\r\n"

View File

@@ -3,13 +3,13 @@
trace()
{
if [ -n "${TRACING}" ]; then
echo "$(date -Is) ${1}" > /dev/stderr
echo "$(date -Is) ${1}" 1>&2
fi
}
trace_rc()
{
if [ -n "${TRACING}" ]; then
echo "$(date -Is) Last return code: ${1}" > /dev/stderr
echo "$(date -Is) Last return code: ${1}" 1>&2
fi
}