Skip to content

Commit

Permalink
Merge pull request #72 from Start9Labs/update-23
Browse files Browse the repository at this point in the history
Update 23
  • Loading branch information
kn0wmad authored Jun 15, 2022
2 parents 6e02f54 + 5a22f8a commit 12d7b21
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 7 deletions.
5 changes: 3 additions & 2 deletions assets/compat/config_spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ rpc:
type: number
nullable: false
default: 4
range: "[1,4]"
range: "[1,64]"
integral: true
units: ~
workqueue:
Expand Down Expand Up @@ -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
25 changes: 23 additions & 2 deletions manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
4 changes: 3 additions & 1 deletion migrations/eq_22_0_0.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 20 additions & 0 deletions migrations/gt_22_0_0_lt_23_0_0.sh
Original file line number Diff line number Diff line change
@@ -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
``
5 changes: 3 additions & 2 deletions migrations/lt_22_0_0.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 12d7b21

Please sign in to comment.