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

Add Bloom Filters #68

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion 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_S9 := "22.0.2"
MANAGER_SRC := $(shell find ./manager -name '*.rs') manager/Cargo.toml manager/Cargo.lock

.DELETE_ON_ERROR:
Expand Down
9 changes: 7 additions & 2 deletions assets/compat/bitcoin.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,15 @@ zmqpubrawtx=tcp://0.0.0.0:28333
txindex=1
}}

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

## BIP157
{{#IF advanced.blockfilters.blockfilterindex
{{#IF advanced.filters.blockfilterindex
blockfilterindex=basic
}}
{{#IF advanced.blockfilters.peerblockfilters
{{#IF advanced.filters.peerblockfilters
peerblockfilters=1
}}
21 changes: 15 additions & 6 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 @@ -275,12 +275,21 @@ advanced:
integral: true
units: MiB
default: disabled
blockfilters:
filters:
type: object
nullable: false
name: "Block Filters"
description: "Settings for storing and serving compact block filters"
name: "Filters"
description: "Settings for storing and serving compact block filters or bloom filters"
spec:
peerbloomfilters:
type: boolean
name: "Serve Bloom Filters to Peers (BIP37)"
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.
default: false
blockfilterindex:
type: boolean
name: "Compute Compact Block Filters (BIP158)"
Expand Down
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)
4 changes: 2 additions & 2 deletions manifest.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
id: bitcoind
title: "Bitcoin Core"
version: 22.0.1
version: 22.0.2
release-notes: |
* Fix migration bug in 22.0.0
* Add support for Bloom Filters, as required for Bisq integration
license: mit
wrapper-repo: https://github.com/Start9Labs/bitcoind-wrapper
upstream-repo: https://github.com/bitcoin/bitcoin
Expand Down
4 changes: 2 additions & 2 deletions migrations/lt_22_0_0.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ 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.filters.blockfilterindex, .advanced.filters.peerblockfilters, .advanced.filters.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
yq -i 'del(.advanced.filters)' /root/.bitcoin/start9/config.yaml
echo '{"configured": true }'
exit 0
else
Expand Down