Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 23 #72

Merged
merged 9 commits into from
Jun 15, 2022
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
"<23.0.0":
type: docker
image: main
system: false
entrypoint: /usr/local/bin/migrations/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
"<23.0.0":
type: docker
image: main
system: false
entrypoint: /usr/local/bin/migrations/lt_23_0_0.sh
args: ["to"]
io-format: json
mounts:
main: /root/.bitcoin
inject: false
4 changes: 4 additions & 0 deletions migrations/eq_22_0_0.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ 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
kn0wmad marked this conversation as resolved.
Show resolved Hide resolved
kn0wmad marked this conversation as resolved.
Show resolved Hide resolved
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
Expand Down
4 changes: 3 additions & 1 deletion migrations/lt_22_0_0.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +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
kn0wmad marked this conversation as resolved.
Show resolved Hide resolved
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
yq -i '.rpc.advanced.threads |= 4' /root/.bitcoin/start9/config.yaml
yq -i '.rpc.advanced.workqueue |= 32' /root/.bitcoin/start9/config.yaml
kn0wmad marked this conversation as resolved.
Show resolved Hide resolved
echo '{"configured": true }'
exit 0
else
Expand Down
22 changes: 22 additions & 0 deletions migrations/lt_23_0_0.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/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
yq -i '.rpc.advanced.threads |= 4' /root/.bitcoin/start9/config.yaml
yq -i '.rpc.advanced.workqueue |= 32' /root/.bitcoin/start9/config.yaml
kn0wmad marked this conversation as resolved.
Show resolved Hide resolved
echo '{"configured": true }'
exit 0
else
echo "FATAL: Invalid argument: {from, to}. Migration failed." >&2
exit 1
fi
``