Skip to content

Commit

Permalink
Merge pull request #69 from Start9Labs/update-23
Browse files Browse the repository at this point in the history
Update Bitcoin, Add Bloom Filters
  • Loading branch information
kn0wmad authored May 27, 2022
2 parents b7576ca + 94725dd commit df03462
Show file tree
Hide file tree
Showing 17 changed files with 165 additions and 29 deletions.
83 changes: 66 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ FROM arm64v8/alpine:3.12 as bitcoin-core

COPY --from=berkeleydb /opt /opt

COPY ./SHA256SUMS.asc.patch SHA256SUMS.asc.patch

RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories
RUN apk --no-cache add autoconf
RUN apk --no-cache add automake
Expand All @@ -25,25 +27,71 @@ RUN apk --no-cache add sqlite-dev
RUN apk --no-cache add zeromq-dev
RUN set -ex \
&& for key in \
90C8019E36C2E964 \
E2FFD5B1D88CA97D \
17565732E08E5E41 \
D7CC770B81FD22A8 \
E13FC145CD3F4304 \
ED357015286A333D \
3152347D07DA627C \
2EEB9F5CC09526C1 \
03DB6322267C373B \
410108112E7EA81F \
796C4109063D4EAF \
1E4AED62986CD25D \
0A41BDC3F4FAFF1C \
099BAD163C70FBFA \
9D3CC86A72F8494342EA5FD10A41BDC3F4FAFF1C \
617C90010B3BD370B0AC7D424BB42E31C79111B8 \
E944AE667CF960B1004BC32FCA662BE18B877A60 \
152812300785C96444D3334D17565732E08E5E41 \
590B7292695AFFA5B672CBB2E13FC145CD3F4304 \
0AD83877C1F0CD1EE9BD660AD7CC770B81FD22A8 \
912FD3228387123DC97E0E57D5566241A0295FA9 \
04017A2A6D9A0CCDC81D8EC296AB007F1A7ED999 \
C519EBCF3B926298946783EFF6430754120EC2F4 \
18AE2F798E0D239755DA4FD24B79F986CBDF8736 \
101598DC823C1B5F9A6624ABA5E0907A0380E6C3 \
F20F56EF6A067F70E8A5C99FFF95FAA971697405 \
C060A6635913D98A3587D7DB1C2491FFEB0EF770 \
BF6273FAEF7CC0BA1F562E50989F6B3048A116B5 \
6D3170C1DC2C6FD0AEEBCA6743811D1A26623924 \
948444FCE03B05BA5AB0591EC37B1C1D44C786EE \
1C6621605EC50319C463D56C7F81D87985D61612 \
9A1689B60D1B3CCE9262307A2F40A9BF167FBA47 \
D35176BE9264832E4ACA8986BF0792FBE95DC863 \
6F993B250557E7B016ADE5713BDCDA2D87A881D9 \
01CDF4627A3B88AAE4A571C87588242FBE38D3A8 \
D1DBF2C4B96F2DEBF4C16654410108112E7EA81F \
2688F5A9A4BE0F295E921E8A25F27A38A47AD566 \
D3F22A3A4C366C2DCB66D3722DA9C5A7FA81EA35 \
7480909378D544EA6B6DCEB7535B12980BB8A4D3 \
D3CC177286005BB8FF673294C5242A1AB3936517 \
82921A4B88FD454B7EB8CE3C796C4109063D4EAF \
32EE5C4C3FA15CCADB46ABE529D4BCB6416F53EC \
4B4E840451149DD7FB0D633477DFAB5C3108B9A8 \
C42AFF7C61B3E44A1454CD3557AF762DB3353322 \
70A1D47DD44F59DF8B22244333E472FE870C7E5D \
30DE693AE0DE9E37B3E7EB6BBFF0F67810C1EED1 \
E463A93F5F3117EEDE6C7316BD02942421F4889F \
B8B3F1C0E58C15DB6A81D30C3648A882F4316B9B \
07DF3E57A548CCFB7530709189BBB8663E2E65CE \
CA03882CB1FC067B5D3ACFE4D300116E1C875A3D \
E777299FC265DD04793070EB944D35F9AC3DB76A \
AD5764F4ADCE1B99BDFD179E12335A271D4D62EC \
9692B91BBF0E8D34DFD33B1882C5C009628ECF0C \
C57E4B42223FDE851D4F69DD28DF2724F241D8EE \
F4FC70F07310028424EFC20A8E4256593F177720 \
D62A803E27E7F43486035ADBBCD04D8E9CCCAC2A \
37EC7D7B0A217CDB4B4E007E7FAB114267E4FA04 \
D762373D24904A3E42F33B08B9A408E71DAAC974 \
133EAC179436F14A5CF1B794860FEB804E669320 \
6A8F9C266528E25AEB1D7731C2371D91CB716EA7 \
A8FC55F3B04BA3146F3492E79303B33A305224CB \
ED9BDF7AD6A55E232E84524257FF9BDBCC301009 \
867345026B6763E8B07EE73AB6737117397F5C4F \
9EDAFF80E080659604F4A76B2EBB056FD847F8A7 \
6DEEF79B050C4072509B743F8C275BC595448867 \
AEC1884398647C47413C1C3FB1179EB7347DC10D \
74E2DEF5D77260B98BC19438099BAD163C70FBFA \
79D00BAC68B56D422F945A8F8E3A8F3247DBCBBF \
71A3B16735405025D447E8F274810B012346C9A6 \
287AE4CA1187C68C08B49CB2D11BD4F33F1DB499 \
F9A8737BF4FF5C89C903DF31DD78544CF91B1514 \
# C388F6961FB972A95678E327F62711DBDCA8AE56 \
4DAF18FE948E7A965B30F9457E296D555E7F63A7 \
28E72909F1717FE9607754F8A7BEB2621678D37D \
; do \
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" || \
gpg --batch --keyserver pgp.mit.edu --recv-keys "$key" || \
gpg --batch --keyserver hkps://keyserver.ubuntu.com --recv-keys "$key" || \
gpg --batch --keyserver hkps://pgp.mit.edu --recv-keys "$key" || \
gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || \
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || \
gpg --batch --keyserver hkps://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \
gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \
gpg --batch --keyserver keys.openpgp.org --recv-keys "$key" ; \
done
Expand All @@ -57,6 +105,7 @@ ENV BITCOIN_PREFIX=/opt/bitcoin-${BITCOIN_VERSION}
RUN wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS
RUN wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc
RUN wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}.tar.gz
RUN patch -u SHA256SUMS.asc -i SHA256SUMS.asc.patch
RUN gpg --verify SHA256SUMS.asc
RUN grep " bitcoin-${BITCOIN_VERSION}.tar.gz\$" SHA256SUMS | sha256sum -c -
RUN tar -xzf *.tar.gz
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
VERSION_CORE := "22.0"
VERSION_S9 := "22.0.1"
VERSION_CORE := "23.0"
VERSION_S9 := "23.0.0"
MANAGER_SRC := $(shell find ./manager -name '*.rs') manager/Cargo.toml manager/Cargo.lock

.DELETE_ON_ERROR:
Expand Down
16 changes: 16 additions & 0 deletions SHA256SUMS.asc.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
--- SHA256SUMS.asc 2022-05-26 11:59:08.634101012 -0600
+++ SHA256SUMS.asc.temp 2022-05-26 11:59:39.067651333 -0600
@@ -155,13 +155,6 @@
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNATURE-----

-iI4EABMIADYWIQTDiPaWH7lyqVZ44yf2JxHb3KiuVgUCYmPznBgca3ZhY2lyYWxA
-cHJvdG9ubWFpbC5jb20ACgkQ9icR29yorlZmbgEA1sImuqQigR4WOu6lju3Sy+UW
-N9q0hOyEAFniiOK9ZccBAMYKXcq9JpO2W2P8BUgnEYbNK7XEe53l97tGcZqRImjd
-=LoEA
------END PGP SIGNATURE-----
------BEGIN PGP SIGNATURE-----
-
iQEzBAABCgAdFiEEnerg3HBjJJ+wVHRoHkrtYphs0l0FAmJi1UEACgkQHkrtYphs
0l10/gf+KpVGbw+7oYWsFF8b8DZrNJfnVTwlREncD+Nsw62a3+egzGwB1WVeCOjj
i4lld60YrgLG2EDbYTP0kifaVIqxXPWVzftcLfV2P2rg+hli7+L3LVLlpMsi1lMD
5 changes: 5 additions & 0 deletions assets/compat/bitcoin.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ zmqpubrawtx=tcp://0.0.0.0:28333
txindex=1
}}

## BIP37
{{#IF advanced.bloomfilters.peerbloomfilters
peerbloomfilters=1
}}

## BIP157
{{#IF advanced.blockfilters.blockfilterindex
blockfilterindex=basic
Expand Down
21 changes: 18 additions & 3 deletions assets/compat/config_spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ rpc:
description: Set the number of threads for handling RPC calls. Only needed if you plan to abuse your node.
type: number
nullable: false
default: 1
default: 4
range: "[1,4]"
integral: true
units: ~
Expand All @@ -95,8 +95,8 @@ rpc:
description: Set the depth of the work queue to service RPC calls. Determines how long the backlog of RPC requests can get before it just rejects new ones.
type: number
nullable: false
default: 16
range: "[8,32]"
default: 128
range: "[8,256]"
integral: true
units: requests
zmq-enabled:
Expand Down Expand Up @@ -296,3 +296,18 @@ advanced:
connect an SPV client to your node to make it efficient to scan transactions without having to download all
block data.
default: false
bloomfilters:
type: object
nullable: false
name: "Bloom Filters (BIP37)"
description: "Setting for serving Bloom Filters"
spec:
peerbloomfilters:
type: boolean
name: "Serve Bloom Filters to Peers"
description: >-
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.
default: false
Binary file added docs/integrations/bisq/assets/bisq0.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/integrations/bisq/assets/bisq1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/integrations/bisq/assets/bisq2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/integrations/bisq/assets/bisq3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/integrations/bisq/assets/bisq4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/integrations/bisq/assets/bisq5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/integrations/bisq/assets/bisq6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions docs/integrations/bisq/guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Bisq Setup Guide

1. Open Bisq and select "Settings" from the menu at the top

![Bisq Settings](./assets/bisq0.png "Click Settings from top menu")

1. Click "Network Info" from the secondary menu that appears below the main top menu

![Bisq Settings](./assets/bisq1.png "Click Network Info")

1. Select "Use Custom Bitcoin Core Nodes." Enter your Bitcoin Core **PEER** Tor address (found in your Embassy's Bitcoin service page, under "Interfaces"). Be certain to remove the "http://" prefix; Bisq will complain if you do not.

![Bitcoin Core Node](./assets/bisq2.png "Enter Your Node's Peer Onion Address")

1. Click away from the textbox and Bisq will require you to shutdown in order to make the change. Go ahead and do this, then restart Bisq.

![Shutdown Warning](./assets/bisq3.png "Shut Down Your Bisq Application")

1. When you restart Bisq, you will see your node, but will need to select "Use Custom Bitcoin Core Nodes" a second time, this will show the following warning about ensuring you trust the Bitcoin node:

![Node Warning](./assets/bisq4.png "Your Node is Trustworthy")

Fortunately, you already run a soverign Bitcoin node on your Embassy, so you can proceed confidently. Click "OK"

1. At this point you should see that Bisq is syncing with your Bitcoin node in the very bottom left of the application window. If you do not see this, make sure you have selected "Use Custom Bitcoin Core Node" and restart Bisq again.

![Bitcoin Syncing](./assets/bisq5.png "Bitcoin Syncing")


1. Syncing is normally fairly quick, but can take up to 30minutes. Once synced, you will see the following at the bottom left.

![Bitcoin Synced](./assets/bisq6.png "Bitcoin Synced")

That's it! You're synced and ready to use Bisq with your own Bitcoin node on Embassy!!
23 changes: 18 additions & 5 deletions docs/wallets.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
# Tested Bitcoin Wallets
# Tested Bitcoin Integrations

## Bisq

### Available For
- Linux
- Mac
- Windows

Follow the [guide](./integrations/bisq/guide.md)

## Blockstream Green

Expand All @@ -11,7 +20,7 @@

Can connect using an Electrum Server.

See [electrs integrations](https://github.com/Start9Labs/electrs-wrapper/tree/master/docs/integrations/bluewallet)
See [electrs integrations](https://github.com/Start9Labs/electrs-wrapper/tree/master/docs/integrations/bluewallet/guide.md)

## Fully Noded

Expand Down Expand Up @@ -49,7 +58,7 @@ Follow the [guide](/docs/integrations/sparrow/guide.md)

## Specter

### Available for
### Available For
- Linux
- MacOS
- Windows
Expand All @@ -61,6 +70,10 @@ Follow the [guide](/docs/integrations/specter) for your OS

**NOTE:** Built for use with Trezor hardware devices

**Not possible at this time - Requires Electrum server and support**
### Available For
- Linux
- Mac
- Windows

Track here: https://github.com/trezor/trezor-suite/issues/2737
### Instructions
Requires Electrs, find the guide [here](https://github.com/Start9Labs/electrs-wrapper/tree/master/docs/integrations/trezor/guide.md)
1 change: 1 addition & 0 deletions manager/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ pub struct ChainInfo {
size_on_disk: u64,
#[serde(default)]
pruneheight: usize,
#[serde(default)]
softforks: LinearMap<String, SoftFork>,
}

Expand Down
6 changes: 4 additions & 2 deletions manifest.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
id: bitcoind
title: "Bitcoin Core"
version: 22.0.1
version: 23.0.0
release-notes: |
* Fix migration bug in 22.0.0
* 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
license: mit
wrapper-repo: https://github.com/Start9Labs/bitcoind-wrapper
upstream-repo: https://github.com/bitcoin/bitcoin
Expand Down
1 change: 1 addition & 0 deletions migrations/lt_22_0_0.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ else
echo "FATAL: Invalid argument: {from, to}. Migration failed." >&2
exit 1
fi
``

0 comments on commit df03462

Please sign in to comment.