From 4078ff6351bc3727a315c5854b316f5cf7dd21cb Mon Sep 17 00:00:00 2001 From: kexkey Date: Thu, 18 Mar 2021 17:00:26 -0400 Subject: [PATCH 1/4] v0.7.0-rc.1 --- build.sh | 18 +++++++++--------- cyphernodeconf_docker/build.sh | 2 +- cyphernodeconf_docker/run.sh | 20 ++++++++++---------- dist/setup.sh | 22 +++++++++++----------- docker-build.sh | 6 +++--- 5 files changed, 34 insertions(+), 34 deletions(-) diff --git a/build.sh b/build.sh index 8948a7500..7516f02b2 100755 --- a/build.sh +++ b/build.sh @@ -2,15 +2,15 @@ TRACING=1 -# CYPHERNODE VERSION "v0.6.0-dev", dev over v0.6.0 -CONF_VERSION="v0.6.0-dev-local" -GATEKEEPER_VERSION="v0.6.0-dev-local" -TOR_VERSION="v0.6.0-dev-local" -PROXY_VERSION="v0.6.0-dev-local" -NOTIFIER_VERSION="v0.6.0-dev-local" -PROXYCRON_VERSION="v0.6.0-dev-local" -OTSCLIENT_VERSION="v0.6.0-dev-local" -PYCOIN_VERSION="v0.6.0-dev-local" +# CYPHERNODE VERSION "v0.7.0-rc.1-dev", dev over v0.7.0-rc.1 +CONF_VERSION="v0.7.0-rc.1-dev-local" +GATEKEEPER_VERSION="v0.7.0-rc.1-dev-local" +TOR_VERSION="v0.7.0-rc.1-dev-local" +PROXY_VERSION="v0.7.0-rc.1-dev-local" +NOTIFIER_VERSION="v0.7.0-rc.1-dev-local" +PROXYCRON_VERSION="v0.7.0-rc.1-dev-local" +OTSCLIENT_VERSION="v0.7.0-rc.1-dev-local" +PYCOIN_VERSION="v0.7.0-rc.1-dev-local" trace() { diff --git a/cyphernodeconf_docker/build.sh b/cyphernodeconf_docker/build.sh index e933af0d4..1299b6d7e 100755 --- a/cyphernodeconf_docker/build.sh +++ b/cyphernodeconf_docker/build.sh @@ -1,5 +1,5 @@ #!/bin/sh -VERSION=v0.6.0-dev +VERSION=v0.7.0-rc.1 docker build . -t cyphernode/cyphernodeconf:${VERSION} diff --git a/cyphernodeconf_docker/run.sh b/cyphernodeconf_docker/run.sh index fa843189a..663d702e0 100755 --- a/cyphernodeconf_docker/run.sh +++ b/cyphernodeconf_docker/run.sh @@ -3,17 +3,17 @@ export SETUP_DIR=$(pwd)/../dist export DEFAULT_USER=$USER export DEFAULT_CERT_HOSTNAME=disk0book.local -export PROXYCRON_VERSION=v0.6.0-dev -export PYCOIN_VERSION=v0.6.0-dev -export SETUP_VERSION=v0.6.0-dev -export BITCOIN_VERSION=v0.21.0 -export LIGHTNING_VERSION=v0.9.1 +export PROXYCRON_VERSION=v0.7.0-rc.1 +export PYCOIN_VERSION=v0.7.0-rc.1 +export SETUP_VERSION=v0.7.0-rc.1 +export BITCOIN_VERSION=v0.21.1 +export LIGHTNING_VERSION=v0.10.0 export DEFAULT_DATADIR_BASE=$HOME -export GATEKEEPER_VERSION=v0.6.0-dev -export TOR_VERSION=v0.6.0-dev -export PROXY_VERSION=v0.6.0-dev -export OTSCLIENT_VERSION=v0.6.0-dev -export NOTIFIER_VERSION=v0.6.0-dev +export GATEKEEPER_VERSION=v0.7.0-rc.1 +export TOR_VERSION=v0.7.0-rc.1 +export PROXY_VERSION=v0.7.0-rc.1 +export OTSCLIENT_VERSION=v0.7.0-rc.1 +export NOTIFIER_VERSION=v0.7.0-rc.1 export EDITOR=/usr/bin/nano export TRAEFIK_VERSION="v1.7.9-alpine" export MOSQUITTO_VERSION="1.6" diff --git a/dist/setup.sh b/dist/setup.sh index c457a0797..2224ede67 100755 --- a/dist/setup.sh +++ b/dist/setup.sh @@ -849,17 +849,17 @@ ALWAYSYES=0 SUDO_REQUIRED=0 AUTOSTART=0 -# CYPHERNODE VERSION "v0.6.0-dev", dev over v0.6.0 -SETUP_VERSION="v0.6.0-dev" -CONF_VERSION="v0.6.0-dev" -GATEKEEPER_VERSION="v0.6.0-dev" -TOR_VERSION="v0.6.0-dev" -PROXY_VERSION="v0.6.0-dev" -NOTIFIER_VERSION="v0.6.0-dev" -PROXYCRON_VERSION="v0.6.0-dev" -OTSCLIENT_VERSION="v0.6.0-dev" -PYCOIN_VERSION="v0.6.0-dev" -CYPHERAPPS_VERSION="dev" +# CYPHERNODE VERSION "v0.7.0-rc.1" +SETUP_VERSION="v0.7.0-rc.1" +CONF_VERSION="v0.7.0-rc.1" +GATEKEEPER_VERSION="v0.7.0-rc.1" +TOR_VERSION="v0.7.0-rc.1" +PROXY_VERSION="v0.7.0-rc.1" +NOTIFIER_VERSION="v0.7.0-rc.1" +PROXYCRON_VERSION="v0.7.0-rc.1" +OTSCLIENT_VERSION="v0.7.0-rc.1" +PYCOIN_VERSION="v0.7.0-rc.1" +CYPHERAPPS_VERSION="releases/v0.7.0" BITCOIN_VERSION="v0.21.1" LIGHTNING_VERSION="v0.10.0" TRAEFIK_VERSION="v1.7.9-alpine" diff --git a/docker-build.sh b/docker-build.sh index 181f0e8c0..9edea27cd 100755 --- a/docker-build.sh +++ b/docker-build.sh @@ -65,9 +65,9 @@ aarch64_docker="arm64" #arch_docker=${aarch64_docker} arch_docker=${x86_docker} -v1="v0" -v2="v0.6" -v3="v0.6.0" +v1="v0-rc.1" +v2="v0.7-rc.1" +v3="v0.7.0-rc.1" echo "\nBuilding Cyphernode Core containers\n" echo "arch_docker=$arch_docker\n" From 5275b6c86085a8fee929466422a3c541decc7fda Mon Sep 17 00:00:00 2001 From: kexkey Date: Thu, 18 Mar 2021 22:05:11 -0400 Subject: [PATCH 2/4] Image tags were wrong if locally built --- build.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/build.sh b/build.sh index 7516f02b2..f8b4a4b4f 100755 --- a/build.sh +++ b/build.sh @@ -2,15 +2,15 @@ TRACING=1 -# CYPHERNODE VERSION "v0.7.0-rc.1-dev", dev over v0.7.0-rc.1 -CONF_VERSION="v0.7.0-rc.1-dev-local" -GATEKEEPER_VERSION="v0.7.0-rc.1-dev-local" -TOR_VERSION="v0.7.0-rc.1-dev-local" -PROXY_VERSION="v0.7.0-rc.1-dev-local" -NOTIFIER_VERSION="v0.7.0-rc.1-dev-local" -PROXYCRON_VERSION="v0.7.0-rc.1-dev-local" -OTSCLIENT_VERSION="v0.7.0-rc.1-dev-local" -PYCOIN_VERSION="v0.7.0-rc.1-dev-local" +# CYPHERNODE VERSION "v0.7.0-rc.1" +CONF_VERSION="v0.7.0-rc.1-local" +GATEKEEPER_VERSION="v0.7.0-rc.1-local" +TOR_VERSION="v0.7.0-rc.1-local" +PROXY_VERSION="v0.7.0-rc.1-local" +NOTIFIER_VERSION="v0.7.0-rc.1-local" +PROXYCRON_VERSION="v0.7.0-rc.1-local" +OTSCLIENT_VERSION="v0.7.0-rc.1-local" +PYCOIN_VERSION="v0.7.0-rc.1-local" trace() { From 17a953c944b211a975e20e2cd48b6aaaf5d1bb8f Mon Sep 17 00:00:00 2001 From: kexkey Date: Mon, 22 Mar 2021 10:34:39 -0400 Subject: [PATCH 3/4] Small fixes in removefrombatch and watchtxid --- proxy_docker/app/script/batching.sh | 3 ++- proxy_docker/app/script/watchrequest.sh | 14 +++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/proxy_docker/app/script/batching.sh b/proxy_docker/app/script/batching.sh index fa06d90a3..79f9242c8 100644 --- a/proxy_docker/app/script/batching.sh +++ b/proxy_docker/app/script/batching.sh @@ -264,7 +264,8 @@ removefrombatch() { trace "[removefrombatch] id missing" response='{"result":null,"error":{"code":-32700,"message":"outputId is required","data":'${request}'}}' else - batcher_id=$(sql "SELECT batcher_id FROM recipient WHERE id=${id}") + # We don't want to remove an already spent output + batcher_id=$(sql "SELECT batcher_id FROM recipient WHERE id=${id} AND tx_id IS NULL") returncode=$? trace_rc ${returncode} diff --git a/proxy_docker/app/script/watchrequest.sh b/proxy_docker/app/script/watchrequest.sh index 29cd49d69..e4aee1802 100644 --- a/proxy_docker/app/script/watchrequest.sh +++ b/proxy_docker/app/script/watchrequest.sh @@ -342,6 +342,8 @@ watchtxidrequest() { trace "[watchtxidrequest] cbxconf_url=${cbxconf_url}" local nbxconf=$(echo "${request}" | jq ".nbxconf") trace "[watchtxidrequest] nbxconf=${nbxconf}" + local cb1cond + local cbxcond local inserted local id_inserted local result @@ -353,7 +355,17 @@ watchtxidrequest() { if [ "${returncode}" -eq 0 ]; then inserted=1 - id_inserted=$(sql "SELECT id FROM watching_by_txid WHERE txid=${txid} AND callback1conf=${cb1conf_url} AND callbackxconf=${cbxconf_url}") + if [ "${cb1conf_url}" = "null" ]; then + cb1cond=" IS NULL" + else + cb1cond="=${cb1conf_url}" + fi + if [ "${cbxconf_url}" = "null" ]; then + cbxcond=" IS NULL" + else + cbxcond="=${cbxconf_url}" + fi + id_inserted=$(sql "SELECT id FROM watching_by_txid WHERE txid=${txid} AND callback1conf${cb1cond} AND callbackxconf${cbxcond}") trace "[watchtxidrequest] id_inserted: ${id_inserted}" else inserted=0 From f7a208bdfc785ddd05a92964812000db2d95d740 Mon Sep 17 00:00:00 2001 From: Vishal Menon Date: Fri, 4 Jun 2021 04:41:21 +0530 Subject: [PATCH 4/4] Updated cyphernodeconf to support option to enable peerblockfilters as property bitcoin_cbf --- cyphernodeconf_docker/help.json | 1 + cyphernodeconf_docker/prompters/900_bitcoin.js | 6 ++++++ cyphernodeconf_docker/schema/config-v0.2.5.json | 10 ++++++++++ cyphernodeconf_docker/templates/bitcoin/bitcoin.conf | 5 +++++ 4 files changed, 22 insertions(+) diff --git a/cyphernodeconf_docker/help.json b/cyphernodeconf_docker/help.json index eeb89fe3e..743891f61 100644 --- a/cyphernodeconf_docker/help.json +++ b/cyphernodeconf_docker/help.json @@ -29,6 +29,7 @@ "bitcoin_rpcpassword": "Bitcoin Core's RPC password used by Cyphernode when calling the node.", "bitcoin_prune": "If you don't have at least 350GB of disk space, you should run Bitcoin Core in prune mode. NOTE: when running Bitcoin Core in prune mode, the incoming transactions' fees cannot be computed by Cyphernode and won't be part of the addresses watching's callbacks payload.", "bitcoin_prune_size": "Minimum size is 550. This option specifies the maximum number in MB Bitcoin Core will allocate for raw block & undo data.", + "bitcoin_cbf": "Compact Block Filters serve filtered block data to neutrino clients and have a networking overhead.", "bitcoin_uacomment": "User Agent string used by Bitcoin Core. (Optional)", "bitcoin_datapath": "Path name to where Bitcoin Core's data files (blockchain data, wallets, configs, etc.) are stored. This directory will be mounted into the Bitcoin node's container. If you already have a sync'ed node, you can copy data there to be used by the node, instead of resyncing everything. NOTE: only copy chainstate/ and blocks/ contents. If running on OSX, check mountable directories in Docker's File Sharing configs.", "bitcoin_datapath_custom": " ", diff --git a/cyphernodeconf_docker/prompters/900_bitcoin.js b/cyphernodeconf_docker/prompters/900_bitcoin.js index a6817ea75..074636132 100644 --- a/cyphernodeconf_docker/prompters/900_bitcoin.js +++ b/cyphernodeconf_docker/prompters/900_bitcoin.js @@ -90,6 +90,12 @@ module.exports = { return true; } }, // TODO: ask for size of prune + { + type: 'confirm', + name: 'bitcoin_cbf', + default: utils.getDefault( 'bitcoin_cbf' ), + message: prefix()+'Enable compact block filters?'+utils.getHelp('bitcoin_cbf') + }, { when: bitcoinInternal, type: 'input', diff --git a/cyphernodeconf_docker/schema/config-v0.2.5.json b/cyphernodeconf_docker/schema/config-v0.2.5.json index 4810ac5e4..cca452323 100644 --- a/cyphernodeconf_docker/schema/config-v0.2.5.json +++ b/cyphernodeconf_docker/schema/config-v0.2.5.json @@ -19,6 +19,7 @@ "bitcoin_rpcuser", "bitcoin_rpcpassword", "bitcoin_prune", + "bitcoin_cbf", "bitcoin_datapath", "bitcoin_mode", "bitcoin_expose", @@ -375,6 +376,15 @@ 550 ] }, + "bitcoin_cbf": { + "$id": "#/properties/bitcoin_cbf", + "type": "boolean", + "title": "Bitcoin serve compact block filters", + "default": false, + "examples": [ + "false" + ] + }, "bitcoin_datapath": { "$id": "#/properties/bitcoin_datapath", "type": "string", diff --git a/cyphernodeconf_docker/templates/bitcoin/bitcoin.conf b/cyphernodeconf_docker/templates/bitcoin/bitcoin.conf index b797e922d..87098d280 100644 --- a/cyphernodeconf_docker/templates/bitcoin/bitcoin.conf +++ b/cyphernodeconf_docker/templates/bitcoin/bitcoin.conf @@ -11,7 +11,12 @@ prune=<%= bitcoin_prune_size || 550 %> <% } else { %> txindex=1 blockfilterindex=1 +<% if ( bitcoin_cbf ) { %> +peerblockfilters=1 <% } %> +<% } %> + + zmqpubrawblock=tcp://0.0.0.0:18501 zmqpubrawtx=tcp://0.0.0.0:18502