diff --git a/assets/compat/config_spec.yaml b/assets/compat/config_spec.yaml index ed964e1..b2fe391 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: @@ -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 78bb99e..1088fab 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 (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 @@ -200,6 +201,16 @@ migrations: mounts: main: /root/.bitcoin inject: false + ">22.0.0 <23.0.0": + type: docker + image: main + system: false + entrypoint: /usr/local/bin/migrations/gt_22_0_0_lt_23_0_0.sh + args: ["from"] + io-format: json + mounts: + main: /root/.bitcoin + inject: false to: "<22.0.0": type: docker @@ -221,3 +232,13 @@ migrations: mounts: main: /root/.bitcoin inject: false + ">22.0.0 <23.0.0": + type: docker + image: main + system: false + entrypoint: /usr/local/bin/migrations/gt_22_0_0_lt_23_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..7e63920 100644 --- a/migrations/eq_22_0_0.sh +++ b/migrations/eq_22_0_0.sh @@ -4,10 +4,12 @@ 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 - echo '{"configured": true }' + yq -i 'del(.advanced.bloomfilters)' /root/.bitcoin/start9/config.yaml + 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 new file mode 100644 index 0000000..bfa749d --- /dev/null +++ b/migrations/gt_22_0_0_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.bloomfilters)' /root/.bitcoin/start9/config.yaml + echo '{"configured": false }' + exit 0 +else + echo "FATAL: Invalid argument: {from, to}. Migration failed." >&2 + exit 1 +fi +`` \ No newline at end of file diff --git a/migrations/lt_22_0_0.sh b/migrations/lt_22_0_0.sh index ec315e0..a415c29 100644 --- a/migrations/lt_22_0_0.sh +++ b/migrations/lt_22_0_0.sh @@ -5,13 +5,14 @@ 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 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 }' + yq -i 'del(.advanced.bloomfilters)' /root/.bitcoin/start9/config.yaml + echo '{"configured": false }' exit 0 else echo "FATAL: Invalid argument: {from, to}. Migration failed." >&2