Rename bcash backend packages to match coin naming convention

pull/7/head
Martin Boehm 2018-06-07 23:13:17 +02:00
parent ac0dbdca42
commit d18012e913
50 changed files with 144 additions and 136 deletions

View File

@ -129,21 +129,21 @@ The data are separated to different column families:
## Registry of ports
| coin | blockbook http port | blockbook socket.io port | RPC port | zmq port |
|--------------------------|---------------------|--------------------------|----------|----------|
| Bitcoin | 9030 | 9130 | 8030 | 38330 |
| Bcash | 9031 | 9131 | 8031 | 38331 |
| Zcash | 9032 | 9132 | 8032 | 38332 |
| dash | 9033 | 9133 | 8033 | 38333 |
| ltc | 9034 | 9134 | 8034 | 38334 |
| btg | 9035 | 9135 | 8035 | 38335 |
| Ethereum | 9036 | 9136 | 8036 | 38336* |
| etc | 9037 | 9137 | 8037 | |
| xem | 9038 | 9138 | 8038 | 38336 |
| Bitcoin Testnet | 19030 | 19130 | 18030 | 48330 |
| Bcash Testnet | 19031 | 19131 | 18031 | 48331 |
| Zcash Testnet | 19032 | 19132 | 18032 | 48332 |
| Ethereum Testnet Ropsten | 19036 | 19136 | 18036 | 48333* |
| coin | blockbook http port | blockbook socket.io port | backend rpc port | zmq port |
|--------------------------|---------------------|--------------------------|------------------|----------|
| Bitcoin | 9030 | 9130 | 8030 | 38330 |
| Bcash | 9031 | 9131 | 8031 | 38331 |
| Zcash | 9032 | 9132 | 8032 | 38332 |
| dash | 9033 | 9133 | 8033 | 38333 |
| ltc | 9034 | 9134 | 8034 | 38334 |
| btg | 9035 | 9135 | 8035 | 38335 |
| Ethereum | 9036 | 9136 | 8036 | 38336* |
| etc | 9037 | 9137 | 8037 | 38337* |
| xem | 9038 | 9138 | 8038 | 38338 |
| Bitcoin Testnet | 19030 | 19130 | 18030 | 48330 |
| Bcash Testnet | 19031 | 19131 | 18031 | 48331 |
| Zcash Testnet | 19032 | 19132 | 18032 | 48332 |
| Ethereum Testnet Ropsten | 19036 | 19136 | 18036 | 48333* |
\* geth listens on this port, however not as zmq service
## Todo

View File

@ -24,8 +24,8 @@ var blockChainFactories = make(map[string]blockChainFactory)
func init() {
blockChainFactories["Bitcoin"] = btc.NewBitcoinRPC
blockChainFactories["Testnet"] = btc.NewBitcoinRPC
blockChainFactories["zec"] = zec.NewZCashRPC
blockChainFactories["zec-testnet"] = zec.NewZCashRPC
blockChainFactories["Zcash"] = zec.NewZCashRPC
blockChainFactories["Zcash Testnet"] = zec.NewZCashRPC
blockChainFactories["Ethereum"] = eth.NewEthereumRPC
blockChainFactories["Ethereum Testnet Ropsten"] = eth.NewEthereumRPC
blockChainFactories["Bcash"] = bch.NewBCashRPC

View File

@ -0,0 +1 @@
/opt/coins/blockbook/zcash_testnet/config/blockchaincfg.json

View File

@ -0,0 +1,2 @@
#!/bin/sh
/opt/coins/blockbook/zcash_testnet/bin/logrotate.sh

View File

@ -0,0 +1,2 @@
/opt/coins/data/zcash_testnet/blockbook
/opt/coins/blockbook/zcash_testnet/logs

View File

@ -0,0 +1,6 @@
#!/usr/bin/dh-exec --with=install
blockbook /opt/coins/blockbook/zcash_testnet/bin
cert /opt/coins/blockbook/zcash_testnet
static /opt/coins/blockbook/zcash_testnet
configs/zcash_testnet.json => /opt/coins/blockbook/zcash_testnet/config/blockchaincfg.json
logrotate.sh /opt/coins/blockbook/zcash_testnet/bin

View File

@ -0,0 +1,2 @@
/opt/coins/blockbook/zcash_testnet/cert/testcert.crt /opt/coins/blockbook/zcash_testnet/cert/blockbook.crt
/opt/coins/blockbook/zcash_testnet/cert/testcert.key /opt/coins/blockbook/zcash_testnet/cert/blockbook.key

View File

@ -0,0 +1,23 @@
#!/bin/bash
set -e
case "$1" in
configure)
if ! id -u blockbook-zcash &> /dev/null
then
useradd --system -M -U blockbook-zcash -s /bin/false
fi
for dir in /opt/coins/data/zcash_testnet/blockbook /opt/coins/blockbook/zcash_testnet/logs
do
if [ "$(stat -c '%U' $dir)" != "blockbook-zcash" ]
then
chown -R blockbook-zcash:blockbook-zcash $dir
fi
done
;;
esac
#DEBHELPER#

View File

@ -1,20 +1,20 @@
# It is not recommended to modify this file in-place, because it will
# be overwritten during package upgrades. If you want to add further
# options or overwrite existing ones then use
# $ systemctl edit blockbook-zec-testnet.service
# $ systemctl edit blockbook-zcash-testnet.service
# See "man systemd.service" for details.
[Unit]
Description=Blockbook daemon (ZEC testnet)
Description=Blockbook daemon (Zcash Testnet)
After=network.target
Wants=zcash-zec-testnet.service
Wants=zcash-testnet.service
[Service]
ExecStart=/opt/coins/blockbook/zec-testnet/bin/blockbook -coin=zec-testnet -blockchaincfg=/opt/coins/blockbook/zec-testnet/config/blockchaincfg.json -datadir=/opt/coins/data/zec-testnet/blockbook/db -sync -httpserver=:19032 -socketio=:19132 -certfile=/opt/coins/blockbook/zec-testnet/cert/blockbook -explorer=https://zcash.blockexplorer.com/ -log_dir=/opt/coins/blockbook/zec-testnet/logs
User=blockbook-zec
ExecStart=/opt/coins/blockbook/zcash_testnet/bin/blockbook -blockchaincfg=/opt/coins/blockbook/zcash_testnet/config/blockchaincfg.json -datadir=/opt/coins/data/zcash_testnet/blockbook/db -sync -httpserver=:19032 -socketio=:19132 -certfile=/opt/coins/blockbook/zcash_testnet/cert/blockbook -explorer=https://zcash.blockexplorer.com/ -log_dir=/opt/coins/blockbook/zcash_testnet/logs
User=blockbook-zcash
Type=simple
Restart=on-failure
WorkingDirectory=/opt/coins/blockbook/zec-testnet
WorkingDirectory=/opt/coins/blockbook/zcash_testnet
# Resource limits
LimitNOFILE=500000

View File

@ -0,0 +1 @@
/opt/coins/blockbook/zcash/config/blockchaincfg.json

View File

@ -0,0 +1,2 @@
#!/bin/sh
/opt/coins/blockbook/zcash/bin/logrotate.sh

View File

@ -0,0 +1,2 @@
/opt/coins/data/zcash/blockbook
/opt/coins/blockbook/zcash/logs

View File

@ -0,0 +1,6 @@
#!/usr/bin/dh-exec --with=install
blockbook /opt/coins/blockbook/zcash/bin
cert /opt/coins/blockbook/zcash
static /opt/coins/blockbook/zcash
configs/zcash.json => /opt/coins/blockbook/zcash/config/blockchaincfg.json
logrotate.sh /opt/coins/blockbook/zcash/bin

View File

@ -0,0 +1,2 @@
/opt/coins/blockbook/zcash/cert/testcert.crt /opt/coins/blockbook/zcash/cert/blockbook.crt
/opt/coins/blockbook/zcash/cert/testcert.key /opt/coins/blockbook/zcash/cert/blockbook.key

View File

@ -0,0 +1,23 @@
#!/bin/bash
set -e
case "$1" in
configure)
if ! id -u blockbook-zcash &> /dev/null
then
useradd --system -M -U blockbook-zcash -s /bin/false
fi
for dir in /opt/coins/data/zcash/blockbook /opt/coins/blockbook/zcash/logs
do
if [ "$(stat -c '%U' $dir)" != "blockbook-zcash" ]
then
chown -R blockbook-zcash:blockbook-zcash $dir
fi
done
;;
esac
#DEBHELPER#

View File

@ -1,20 +1,20 @@
# It is not recommended to modify this file in-place, because it will
# be overwritten during package upgrades. If you want to add further
# options or overwrite existing ones then use
# $ systemctl edit blockbook-zec.service
# $ systemctl edit blockbook-zcash.service
# See "man systemd.service" for details.
[Unit]
Description=Blockbook daemon (ZEC mainnet)
Description=Blockbook daemon (Zcash mainnet)
After=network.target
Wants=zcash-zec.service
Wants=zcash.service
[Service]
ExecStart=/opt/coins/blockbook/zec/bin/blockbook -coin=zec -blockchaincfg=/opt/coins/blockbook/zec/config/blockchaincfg.json -datadir=/opt/coins/data/zec/blockbook/db -sync -httpserver=:9032 -socketio=:9132 -certfile=/opt/coins/blockbook/zec/cert/blockbook -explorer=https://zcash.blockexplorer.com/ -log_dir=/opt/coins/blockbook/zec/logs
User=blockbook-zec
ExecStart=/opt/coins/blockbook/zcash/bin/blockbook -blockchaincfg=/opt/coins/blockbook/zcash/config/blockchaincfg.json -datadir=/opt/coins/data/zcash/blockbook/db -sync -httpserver=:9032 -socketio=:9132 -certfile=/opt/coins/blockbook/zcash/cert/blockbook -explorer=https://zcash.blockexplorer.com/ -log_dir=/opt/coins/blockbook/zcash/logs
User=blockbook-zcash
Type=simple
Restart=on-failure
WorkingDirectory=/opt/coins/blockbook/zec
WorkingDirectory=/opt/coins/blockbook/zcash
# Resource limits
LimitNOFILE=500000

View File

@ -1 +0,0 @@
/opt/coins/blockbook/zec-testnet/config/blockchaincfg.json

View File

@ -1,2 +0,0 @@
#!/bin/sh
/opt/coins/blockbook/zec-testnet/bin/logrotate.sh

View File

@ -1,2 +0,0 @@
/opt/coins/data/zec-testnet/blockbook
/opt/coins/blockbook/zec-testnet/logs

View File

@ -1,6 +0,0 @@
#!/usr/bin/dh-exec --with=install
blockbook /opt/coins/blockbook/zec-testnet/bin
cert /opt/coins/blockbook/zec-testnet
static /opt/coins/blockbook/zec-testnet
configs/zec-testnet.json => /opt/coins/blockbook/zec-testnet/config/blockchaincfg.json
logrotate.sh /opt/coins/blockbook/zec-testnet/bin

View File

@ -1,2 +0,0 @@
/opt/coins/blockbook/zec-testnet/cert/testcert.crt /opt/coins/blockbook/zec-testnet/cert/blockbook.crt
/opt/coins/blockbook/zec-testnet/cert/testcert.key /opt/coins/blockbook/zec-testnet/cert/blockbook.key

View File

@ -1,23 +0,0 @@
#!/bin/bash
set -e
case "$1" in
configure)
if ! id -u blockbook-zec &> /dev/null
then
useradd --system -M -U blockbook-zec -s /bin/false
fi
for dir in /opt/coins/data/zec-testnet/blockbook /opt/coins/blockbook/zec-testnet/logs
do
if [ "$(stat -c '%U' $dir)" != "blockbook-zec" ]
then
chown -R blockbook-zec:blockbook-zec $dir
fi
done
;;
esac
#DEBHELPER#

View File

@ -1 +0,0 @@
/opt/coins/blockbook/zec/config/blockchaincfg.json

View File

@ -1,2 +0,0 @@
#!/bin/sh
/opt/coins/blockbook/zec/bin/logrotate.sh

View File

@ -1,2 +0,0 @@
/opt/coins/data/zec/blockbook
/opt/coins/blockbook/zec/logs

View File

@ -1,6 +0,0 @@
#!/usr/bin/dh-exec --with=install
blockbook /opt/coins/blockbook/zec/bin
cert /opt/coins/blockbook/zec
static /opt/coins/blockbook/zec
configs/zec.json => /opt/coins/blockbook/zec/config/blockchaincfg.json
logrotate.sh /opt/coins/blockbook/zec/bin

View File

@ -1,2 +0,0 @@
/opt/coins/blockbook/zec/cert/testcert.crt /opt/coins/blockbook/zec/cert/blockbook.crt
/opt/coins/blockbook/zec/cert/testcert.key /opt/coins/blockbook/zec/cert/blockbook.key

View File

@ -1,23 +0,0 @@
#!/bin/bash
set -e
case "$1" in
configure)
if ! id -u blockbook-zec &> /dev/null
then
useradd --system -M -U blockbook-zec -s /bin/false
fi
for dir in /opt/coins/data/zec/blockbook /opt/coins/blockbook/zec/logs
do
if [ "$(stat -c '%U' $dir)" != "blockbook-zec" ]
then
chown -R blockbook-zec:blockbook-zec $dir
fi
done
;;
esac
#DEBHELPER#

View File

@ -20,12 +20,12 @@ Architecture: amd64
Depends: ${shlibs:Depends}, ${misc:Depends}, coreutils, passwd, findutils, psmisc, bitcoin-testnet
Description: Satoshilabs blockbook server (Bitcoin testnet)
Package: blockbook-zec
Package: blockbook-zcash
Architecture: amd64
Depends: ${shlibs:Depends}, ${misc:Depends}, coreutils, passwd, findutils, psmisc, zcash-zec
Depends: ${shlibs:Depends}, ${misc:Depends}, coreutils, passwd, findutils, psmisc, zcash
Description: Satoshilabs blockbook server (ZCash mainnet)
Package: blockbook-zec-testnet
Package: blockbook-zcash-testnet
Architecture: amd64
Depends: ${shlibs:Depends}, ${misc:Depends}, coreutils, passwd, findutils, psmisc, zcash-testnet
Description: Satoshilabs blockbook server (ZCash testnet)

View File

@ -1,4 +1,5 @@
{
"coin_name": "Zcash",
"rpcURL": "http://127.0.0.1:8032",
"rpcUser": "rpc",
"rpcPass": "rpc",
@ -8,4 +9,4 @@
"mempoolWorkers": 4,
"mempoolSubWorkers": 8,
"blockAddressesToKeep": 300
}
}

View File

@ -1,4 +1,5 @@
{
"coin_name": "Zcash Testnet",
"rpcURL": "http://127.0.0.1:18032",
"rpcUser": "rpc",
"rpcPass": "rpc",
@ -8,4 +9,4 @@
"mempoolWorkers": 4,
"mempoolSubWorkers": 8,
"blockAddressesToKeep": 300
}
}

View File

@ -1,3 +1,9 @@
zcash (1.0.15-satoshilabs5) unstable; urgency=medium
* Rename packages and directories
-- Martin Bohm <martin.bohm@satoshilabs.com> Wed, 06 Jun 2018 11:12:13 +0200
zcash (1.0.15-satoshilabs4) unstable; urgency=medium
* Increased limits in backend config

View File

@ -5,7 +5,7 @@ Maintainer: jakub.matys@satoshilabs.com
Build-Depends: debhelper, wget, tar, gzip, make, dh-systemd, dh-exec
Standards-Version: 3.9.5
Package: zcash-zec
Package: zcash
Architecture: amd64
Depends: ${shlibs:Depends}, ${misc:Depends}, logrotate
Description: Satoshilabs packaged zcash server

View File

@ -1 +1 @@
/opt/coins/nodes/zcash/zec-testnet/zec-testnet.conf
/opt/coins/nodes/zcash_testnet/zcash_testnet.conf

View File

@ -1 +1 @@
/opt/coins/data/zec-testnet/zcash
/opt/coins/data/zcash_testnet/backend

View File

@ -1,2 +1,2 @@
zcash/* /opt/coins/nodes/zcash/zec-testnet
zec-testnet.conf /opt/coins/nodes/zcash/zec-testnet
zcash/* /opt/coins/nodes/zcash_testnet
zcash_testnet.conf /opt/coins/nodes/zcash_testnet

View File

@ -1,5 +1,5 @@
/opt/coins/data/zec-testnet/zcash/testnet3/debug.log
/opt/coins/data/zec-testnet/zcash/testnet3/db.log
/opt/coins/data/zcash_testnet/backend/testnet3/debug.log
/opt/coins/data/zcash_testnet/backend/testnet3/db.log
{
rotate 7
daily

View File

@ -9,12 +9,12 @@ case "$1" in
useradd --system -M -U zcash -s /bin/false
fi
if [ "$(stat -c '%U' /opt/coins/data/zec-testnet/zcash)" != "zcash" ]
if [ "$(stat -c '%U' /opt/coins/data/zcash_testnet/backend)" != "zcash" ]
then
chown -R zcash:zcash /opt/coins/data/zec-testnet/zcash
chown -R zcash:zcash /opt/coins/data/zcash_testnet/backend
fi
HOME=/opt/coins/data/zec-testnet/zcash /opt/coins/nodes/zcash/zec-testnet/bin/zcash-fetch-params
HOME=/opt/coins/data/zcash_testnet/backend /opt/coins/nodes/zcash_testnet/bin/zcash-fetch-params
;;
esac

View File

@ -5,20 +5,20 @@
# See "man systemd.service" for details.
# Note that almost all daemon options could be specified in
# /opt/coins/nodes/zcash/zec-testnet/zec-testnet.conf
# /opt/coins/nodes/zcash_testnet/zcash_testnet.conf
[Unit]
Description=ZCash daemon (testnet)
Description=Zcash daemon (testnet)
After=network.target
[Service]
Environment="HOME=/opt/coins/data/zec-testnet/zcash"
ExecStart=/opt/coins/nodes/zcash/zec-testnet/bin/zcashd -datadir=/opt/coins/data/zec-testnet/zcash -conf=/opt/coins/nodes/zcash/zec-testnet/zec-testnet.conf -pid=/run/zcashd/zec-testnet.pid
Environment="HOME=/opt/coins/data/zcash_testnet/backend"
ExecStart=/opt/coins/nodes/zcash_testnet/bin/zcashd -datadir=/opt/coins/data/zcash_testnet/backend -conf=/opt/coins/nodes/zcash_testnet/zcash_testnet.conf -pid=/run/zcashd/zcash_testnet.pid
# Creates /run/zcashd owned by zcash
RuntimeDirectory=zcashd
User=zcash
Type=forking
PIDFile=/run/zcashd/zec-testnet.pid
PIDFile=/run/zcashd/zcash_testnet.pid
Restart=on-failure
# Resource limits

View File

@ -1 +0,0 @@
/opt/coins/nodes/zcash/zec/zec.conf

View File

@ -1 +0,0 @@
/opt/coins/data/zec/zcash

View File

@ -1,2 +0,0 @@
zcash/* /opt/coins/nodes/zcash/zec
zec.conf /opt/coins/nodes/zcash/zec

View File

@ -0,0 +1 @@
/opt/coins/nodes/zcash/zcash.conf

View File

@ -0,0 +1 @@
/opt/coins/data/zcash/backend

View File

@ -0,0 +1,2 @@
zcash/* /opt/coins/nodes/zcash
zcash.conf /opt/coins/nodes/zcash

View File

@ -1,5 +1,5 @@
/opt/coins/data/zec/zcash/debug.log
/opt/coins/data/zec/zcash/db.log
/opt/coins/data/zcash/backend/debug.log
/opt/coins/data/zcash/backend/db.log
{
rotate 7
daily

View File

@ -9,12 +9,12 @@ case "$1" in
useradd --system -M -U zcash -s /bin/false
fi
if [ "$(stat -c '%U' /opt/coins/data/zec/zcash)" != "zcash" ]
if [ "$(stat -c '%U' /opt/coins/data/zcash/backend)" != "zcash" ]
then
chown -R zcash:zcash /opt/coins/data/zec/zcash
chown -R zcash:zcash /opt/coins/data/zcash/backend
fi
HOME=/opt/coins/data/zec/zcash /opt/coins/nodes/zcash/zec/bin/zcash-fetch-params
HOME=/opt/coins/data/zcash/backend /opt/coins/nodes/zcash/bin/zcash-fetch-params
;;
esac

View File

@ -1,24 +1,24 @@
# It is not recommended to modify this file in-place, because it will
# be overwritten during package upgrades. If you want to add further
# options or overwrite existing ones then use
# $ systemctl edit zcash-zec.service
# $ systemctl edit zcash.service
# See "man systemd.service" for details.
# Note that almost all daemon options could be specified in
# /opt/coins/nodes/zcash/zec/zec.conf
# /opt/coins/nodes/zcash/zcash.conf
[Unit]
Description=ZCash daemon (mainnet)
Description=Zcash daemon (mainnet)
After=network.target
[Service]
Environment="HOME=/opt/coins/data/zec/zcash"
ExecStart=/opt/coins/nodes/zcash/zec/bin/zcashd -datadir=/opt/coins/data/zec/zcash -conf=/opt/coins/nodes/zcash/zec/zec.conf -pid=/run/zcashd/zec.pid
Environment="HOME=/opt/coins/data/zcash/backend"
ExecStart=/opt/coins/nodes/zcash/bin/zcashd -datadir=/opt/coins/data/zcash/backend -conf=/opt/coins/nodes/zcash/zcash.conf -pid=/run/zcashd/zcash.pid
# Creates /run/zcashd owned by zcash
RuntimeDirectory=zcashd
User=zcash
Type=forking
PIDFile=/run/zcashd/zec.pid
PIDFile=/run/zcashd/zcash.pid
Restart=on-failure
# Resource limits