From 3bb4ac4c3d5d6d67f578f0daf195eaa2660e1c52 Mon Sep 17 00:00:00 2001 From: kn0wmad Date: Thu, 2 Jun 2022 17:00:58 -0600 Subject: [PATCH 1/9] update migration for lt_22 --- migrations/lt_22_0_0.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migrations/lt_22_0_0.sh b/migrations/lt_22_0_0.sh index ec315e0..3668172 100644 --- a/migrations/lt_22_0_0.sh +++ b/migrations/lt_22_0_0.sh @@ -5,7 +5,7 @@ set -ea if [ $1 = "from" ]; then yq -i '.advanced.peers.addnode |= map(select(.hostname != ~ or . == "*"))' /root/.bitcoin/start9/config.yaml yq -i '.advanced.peers.addnode.[] |= {"hostname":., "port":~}' /root/.bitcoin/start9/config.yaml - yq -i '(.advanced.blockfilters.blockfilterindex, .advanced.blockfilters.peerblockfilters) = false' /root/.bitcoin/start9/config.yaml + yq -i '(.advanced.blockfilters.blockfilterindex, .advanced.blockfilters.peerblockfilters, .advanced.bloomfilters.peerbloomfilters) = false' /root/.bitcoin/start9/config.yaml echo '{"configured": true }' exit 0 elif [ $1 = "to" ]; then From 55d489f07060c991887a9f67655b845c8003a34e Mon Sep 17 00:00:00 2001 From: kn0wmad Date: Tue, 7 Jun 2022 11:20:44 -0600 Subject: [PATCH 2/9] Migrations --- assets/compat/config_spec.yaml | 2 +- manifest.yaml | 20 ++++++++++++++++++++ migrations/eq_22_0_0.sh | 12 ++++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/assets/compat/config_spec.yaml b/assets/compat/config_spec.yaml index ed964e1..2815da1 100644 --- a/assets/compat/config_spec.yaml +++ b/assets/compat/config_spec.yaml @@ -87,7 +87,7 @@ rpc: type: number nullable: false default: 4 - range: "[1,4]" + range: "[1,64]" integral: true units: ~ workqueue: diff --git a/manifest.yaml b/manifest.yaml index 78bb99e..5b7507f 100644 --- a/manifest.yaml +++ b/manifest.yaml @@ -200,6 +200,16 @@ migrations: mounts: main: /root/.bitcoin inject: false + "=22.0.1": + type: docker + image: main + system: false + entrypoint: /usr/local/bin/migrations/eq_22_0_0.sh + args: ["from"] + io-format: json + mounts: + main: /root/.bitcoin + inject: false to: "<22.0.0": type: docker @@ -221,3 +231,13 @@ migrations: mounts: main: /root/.bitcoin inject: false + "=22.0.1": + type: docker + image: main + system: false + entrypoint: /usr/local/bin/migrations/eq_22_0_0.sh + args: ["to"] + io-format: json + mounts: + main: /root/.bitcoin + inject: false diff --git a/migrations/eq_22_0_0.sh b/migrations/eq_22_0_0.sh index 9c44e80..2107f8d 100644 --- a/migrations/eq_22_0_0.sh +++ b/migrations/eq_22_0_0.sh @@ -4,12 +4,24 @@ set -ea if [ $1 = "from" ]; then yq -i '.advanced.peers.addnode |= map(select(.hostname != ~))' /root/.bitcoin/start9/config.yaml + yq -i '.advanced.bloomfilters.peerbloomfilters = false' /root/.bitcoin/start9/config.yaml echo '{"configured": true }' exit 0 elif [ $1 = "to" ]; then + yq -i 'del(.advanced.bloomfilters)' /root/.bitcoin/start9/config.yaml + yq -i '.rpc.advanced.threads |= 4' /root/.bitcoin/start9/config.yaml + yq -i '.rpc.advanced.workqueue |= 32' /root/.bitcoin/start9/config.yaml echo '{"configured": true }' exit 0 else echo "FATAL: Invalid argument: {from, to}. Migration failed." >&2 exit 1 fi + + + +# if threads > 4 +# set to 4 + +# if workqueue > 32 +# set to 32 \ No newline at end of file From 1239d1b528d3b65b74134877bf55323e63259876 Mon Sep 17 00:00:00 2001 From: kn0wmad Date: Fri, 10 Jun 2022 09:35:15 -0600 Subject: [PATCH 3/9] Ready for beta testing --- manifest.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/manifest.yaml b/manifest.yaml index 5b7507f..e729e60 100644 --- a/manifest.yaml +++ b/manifest.yaml @@ -3,8 +3,9 @@ title: "Bitcoin Core" version: 23.0.0 release-notes: | * Latest release from Core - see full release notes at https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-23.0.md - * Embassy change - Add support for Bloom Filters, as required for Bisq integration - * It is HIGHLY RECOMMENDED TO NOT USE THIS for anything except Bisq integration + * Embassy changes + * Add support for Bloom Filters, as required for Bisq integration + * It is HIGHLY RECOMMENDED TO NOT USE THIS for anything except Bisq integration license: mit wrapper-repo: https://github.com/Start9Labs/bitcoind-wrapper upstream-repo: https://github.com/bitcoin/bitcoin From 2b23af11c72897a7ecce0ce21090421a0a5c03d3 Mon Sep 17 00:00:00 2001 From: kn0wmad Date: Mon, 13 Jun 2022 09:35:38 -0600 Subject: [PATCH 4/9] Fix migration filenames, organization --- manifest.yaml | 8 ++++---- migrations/eq_22_0_0.sh | 8 -------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/manifest.yaml b/manifest.yaml index e729e60..0e7b69f 100644 --- a/manifest.yaml +++ b/manifest.yaml @@ -201,11 +201,11 @@ migrations: mounts: main: /root/.bitcoin inject: false - "=22.0.1": + "<23.0.0": type: docker image: main system: false - entrypoint: /usr/local/bin/migrations/eq_22_0_0.sh + entrypoint: /usr/local/bin/migrations/lt_23_0_0.sh args: ["from"] io-format: json mounts: @@ -232,11 +232,11 @@ migrations: mounts: main: /root/.bitcoin inject: false - "=22.0.1": + "<23.0.0": type: docker image: main system: false - entrypoint: /usr/local/bin/migrations/eq_22_0_0.sh + entrypoint: /usr/local/bin/migrations/lt_23_0_0.sh args: ["to"] io-format: json mounts: diff --git a/migrations/eq_22_0_0.sh b/migrations/eq_22_0_0.sh index 2107f8d..4d5d116 100644 --- a/migrations/eq_22_0_0.sh +++ b/migrations/eq_22_0_0.sh @@ -17,11 +17,3 @@ else echo "FATAL: Invalid argument: {from, to}. Migration failed." >&2 exit 1 fi - - - -# if threads > 4 -# set to 4 - -# if workqueue > 32 -# set to 32 \ No newline at end of file From ad9b250daeac55799fb0c5413203e5d04307902f Mon Sep 17 00:00:00 2001 From: kn0wmad Date: Mon, 13 Jun 2022 10:46:51 -0600 Subject: [PATCH 5/9] Fix migration filenames, organization --- migrations/lt_23_0_0.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 migrations/lt_23_0_0.sh diff --git a/migrations/lt_23_0_0.sh b/migrations/lt_23_0_0.sh new file mode 100644 index 0000000..3668172 --- /dev/null +++ b/migrations/lt_23_0_0.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +set -ea + +if [ $1 = "from" ]; then + yq -i '.advanced.peers.addnode |= map(select(.hostname != ~ or . == "*"))' /root/.bitcoin/start9/config.yaml + yq -i '.advanced.peers.addnode.[] |= {"hostname":., "port":~}' /root/.bitcoin/start9/config.yaml + yq -i '(.advanced.blockfilters.blockfilterindex, .advanced.blockfilters.peerblockfilters, .advanced.bloomfilters.peerbloomfilters) = false' /root/.bitcoin/start9/config.yaml + echo '{"configured": true }' + exit 0 +elif [ $1 = "to" ]; then + yq -i '.advanced.peers.addnode |= map_values(.hostname)' /root/.bitcoin/start9/config.yaml + yq -i 'del(.advanced.blockfilters)' /root/.bitcoin/start9/config.yaml + echo '{"configured": true }' + exit 0 +else + echo "FATAL: Invalid argument: {from, to}. Migration failed." >&2 + exit 1 +fi +`` \ No newline at end of file From 60cd243072e719a1055bbf1cc05a6bd537ded72f Mon Sep 17 00:00:00 2001 From: kn0wmad Date: Mon, 13 Jun 2022 15:20:06 -0600 Subject: [PATCH 6/9] Add warning when using Bloom Filters, minor migrations bugfixes --- assets/compat/config_spec.yaml | 3 ++- manifest.yaml | 4 ++-- migrations/lt_22_0_0.sh | 2 ++ migrations/lt_23_0_0.sh | 2 ++ 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/assets/compat/config_spec.yaml b/assets/compat/config_spec.yaml index 2815da1..b2fe391 100644 --- a/assets/compat/config_spec.yaml +++ b/assets/compat/config_spec.yaml @@ -309,5 +309,6 @@ advanced: Peers have the option of setting filters on each connection they make after the version handshake has completed. Bloom filters are for clients implementing SPV (Simplified Pament Verification) that want to check that block headers connect together correctly, without needing to verify the full blockchain. The client must trust that the transactions - in the chain are in fact valid. It is HIGHLY RECOMMENDED TO NOT USE THIS for anything except Bisq integration. + in the chain are in fact valid. It is highly recommended AGAINST using for anything except Bisq integration. + warning: "This is ONLY for use with Bisq integration, please use Block Filters for all other applications." default: false \ No newline at end of file diff --git a/manifest.yaml b/manifest.yaml index 0e7b69f..ecc2a80 100644 --- a/manifest.yaml +++ b/manifest.yaml @@ -4,8 +4,8 @@ version: 23.0.0 release-notes: | * Latest release from Core - see full release notes at https://github.com/bitcoin/bitcoin/blob/master/doc/release-notes/release-notes-23.0.md * Embassy changes - * Add support for Bloom Filters, as required for Bisq integration - * It is HIGHLY RECOMMENDED TO NOT USE THIS for anything except Bisq integration + * Add support for Bloom Filters (BIP37), as required for Bisq integration + * It is highly recommended AGAINST using Bloom Filters for anything except Bisq integration. license: mit wrapper-repo: https://github.com/Start9Labs/bitcoind-wrapper upstream-repo: https://github.com/bitcoin/bitcoin diff --git a/migrations/lt_22_0_0.sh b/migrations/lt_22_0_0.sh index 3668172..9268b48 100644 --- a/migrations/lt_22_0_0.sh +++ b/migrations/lt_22_0_0.sh @@ -11,6 +11,8 @@ if [ $1 = "from" ]; then elif [ $1 = "to" ]; then yq -i '.advanced.peers.addnode |= map_values(.hostname)' /root/.bitcoin/start9/config.yaml yq -i 'del(.advanced.blockfilters)' /root/.bitcoin/start9/config.yaml + yq -i '.rpc.advanced.threads |= 4' /root/.bitcoin/start9/config.yaml + yq -i '.rpc.advanced.workqueue |= 32' /root/.bitcoin/start9/config.yaml echo '{"configured": true }' exit 0 else diff --git a/migrations/lt_23_0_0.sh b/migrations/lt_23_0_0.sh index 3668172..9268b48 100644 --- a/migrations/lt_23_0_0.sh +++ b/migrations/lt_23_0_0.sh @@ -11,6 +11,8 @@ if [ $1 = "from" ]; then elif [ $1 = "to" ]; then yq -i '.advanced.peers.addnode |= map_values(.hostname)' /root/.bitcoin/start9/config.yaml yq -i 'del(.advanced.blockfilters)' /root/.bitcoin/start9/config.yaml + yq -i '.rpc.advanced.threads |= 4' /root/.bitcoin/start9/config.yaml + yq -i '.rpc.advanced.workqueue |= 32' /root/.bitcoin/start9/config.yaml echo '{"configured": true }' exit 0 else From e66ba37fa3eb6a8aaed9590b771558b3f9799638 Mon Sep 17 00:00:00 2001 From: kn0wmad Date: Mon, 13 Jun 2022 16:32:07 -0600 Subject: [PATCH 7/9] More migrations bugfixes --- migrations/lt_23_0_0.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migrations/lt_23_0_0.sh b/migrations/lt_23_0_0.sh index 9268b48..d55c3c7 100644 --- a/migrations/lt_23_0_0.sh +++ b/migrations/lt_23_0_0.sh @@ -10,7 +10,7 @@ if [ $1 = "from" ]; then exit 0 elif [ $1 = "to" ]; then yq -i '.advanced.peers.addnode |= map_values(.hostname)' /root/.bitcoin/start9/config.yaml - yq -i 'del(.advanced.blockfilters)' /root/.bitcoin/start9/config.yaml + yq -i 'del(.advanced.bloomfilters)' /root/.bitcoin/start9/config.yaml yq -i '.rpc.advanced.threads |= 4' /root/.bitcoin/start9/config.yaml yq -i '.rpc.advanced.workqueue |= 32' /root/.bitcoin/start9/config.yaml echo '{"configured": true }' From 59c81c58dcce92810071b066bf56a6de50490d67 Mon Sep 17 00:00:00 2001 From: kn0wmad Date: Mon, 13 Jun 2022 17:30:17 -0600 Subject: [PATCH 8/9] More more migrations bugfixes --- manifest.yaml | 8 ++++---- migrations/{lt_23_0_0.sh => gt_22_0_0_lt_23_0_0.sh} | 0 migrations/lt_22_0_0.sh | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) rename migrations/{lt_23_0_0.sh => gt_22_0_0_lt_23_0_0.sh} (100%) diff --git a/manifest.yaml b/manifest.yaml index ecc2a80..1088fab 100644 --- a/manifest.yaml +++ b/manifest.yaml @@ -201,11 +201,11 @@ migrations: mounts: main: /root/.bitcoin inject: false - "<23.0.0": + ">22.0.0 <23.0.0": type: docker image: main system: false - entrypoint: /usr/local/bin/migrations/lt_23_0_0.sh + entrypoint: /usr/local/bin/migrations/gt_22_0_0_lt_23_0_0.sh args: ["from"] io-format: json mounts: @@ -232,11 +232,11 @@ migrations: mounts: main: /root/.bitcoin inject: false - "<23.0.0": + ">22.0.0 <23.0.0": type: docker image: main system: false - entrypoint: /usr/local/bin/migrations/lt_23_0_0.sh + entrypoint: /usr/local/bin/migrations/gt_22_0_0_lt_23_0_0.sh args: ["to"] io-format: json mounts: diff --git a/migrations/lt_23_0_0.sh b/migrations/gt_22_0_0_lt_23_0_0.sh similarity index 100% rename from migrations/lt_23_0_0.sh rename to migrations/gt_22_0_0_lt_23_0_0.sh diff --git a/migrations/lt_22_0_0.sh b/migrations/lt_22_0_0.sh index 9268b48..85a9e8f 100644 --- a/migrations/lt_22_0_0.sh +++ b/migrations/lt_22_0_0.sh @@ -11,6 +11,7 @@ if [ $1 = "from" ]; then elif [ $1 = "to" ]; then yq -i '.advanced.peers.addnode |= map_values(.hostname)' /root/.bitcoin/start9/config.yaml yq -i 'del(.advanced.blockfilters)' /root/.bitcoin/start9/config.yaml + yq -i 'del(.advanced.bloomfilters)' /root/.bitcoin/start9/config.yaml yq -i '.rpc.advanced.threads |= 4' /root/.bitcoin/start9/config.yaml yq -i '.rpc.advanced.workqueue |= 32' /root/.bitcoin/start9/config.yaml echo '{"configured": true }' From 5a22f8aa58584b57abb0d61e98c861c62b65735c Mon Sep 17 00:00:00 2001 From: kn0wmad Date: Tue, 14 Jun 2022 11:56:29 -0600 Subject: [PATCH 9/9] More more more migrations bugfixes --- migrations/eq_22_0_0.sh | 4 +--- migrations/gt_22_0_0_lt_23_0_0.sh | 4 +--- migrations/lt_22_0_0.sh | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/migrations/eq_22_0_0.sh b/migrations/eq_22_0_0.sh index 4d5d116..7e63920 100644 --- a/migrations/eq_22_0_0.sh +++ b/migrations/eq_22_0_0.sh @@ -9,9 +9,7 @@ if [ $1 = "from" ]; then exit 0 elif [ $1 = "to" ]; then yq -i 'del(.advanced.bloomfilters)' /root/.bitcoin/start9/config.yaml - yq -i '.rpc.advanced.threads |= 4' /root/.bitcoin/start9/config.yaml - yq -i '.rpc.advanced.workqueue |= 32' /root/.bitcoin/start9/config.yaml - echo '{"configured": true }' + echo '{"configured": false }' exit 0 else echo "FATAL: Invalid argument: {from, to}. Migration failed." >&2 diff --git a/migrations/gt_22_0_0_lt_23_0_0.sh b/migrations/gt_22_0_0_lt_23_0_0.sh index d55c3c7..bfa749d 100644 --- a/migrations/gt_22_0_0_lt_23_0_0.sh +++ b/migrations/gt_22_0_0_lt_23_0_0.sh @@ -11,9 +11,7 @@ if [ $1 = "from" ]; then elif [ $1 = "to" ]; then yq -i '.advanced.peers.addnode |= map_values(.hostname)' /root/.bitcoin/start9/config.yaml yq -i 'del(.advanced.bloomfilters)' /root/.bitcoin/start9/config.yaml - yq -i '.rpc.advanced.threads |= 4' /root/.bitcoin/start9/config.yaml - yq -i '.rpc.advanced.workqueue |= 32' /root/.bitcoin/start9/config.yaml - echo '{"configured": true }' + echo '{"configured": false }' exit 0 else echo "FATAL: Invalid argument: {from, to}. Migration failed." >&2 diff --git a/migrations/lt_22_0_0.sh b/migrations/lt_22_0_0.sh index 85a9e8f..a415c29 100644 --- a/migrations/lt_22_0_0.sh +++ b/migrations/lt_22_0_0.sh @@ -12,9 +12,7 @@ elif [ $1 = "to" ]; then yq -i '.advanced.peers.addnode |= map_values(.hostname)' /root/.bitcoin/start9/config.yaml yq -i 'del(.advanced.blockfilters)' /root/.bitcoin/start9/config.yaml yq -i 'del(.advanced.bloomfilters)' /root/.bitcoin/start9/config.yaml - yq -i '.rpc.advanced.threads |= 4' /root/.bitcoin/start9/config.yaml - yq -i '.rpc.advanced.workqueue |= 32' /root/.bitcoin/start9/config.yaml - echo '{"configured": true }' + echo '{"configured": false }' exit 0 else echo "FATAL: Invalid argument: {from, to}. Migration failed." >&2