Author

Topic: How to reserve connection slot for mobile SPV wallet (Bread) on Bitcoin Core (Read 495 times)

sr. member
Activity: 302
Merit: 250
So there is no way to ensure my spv wallet can connect? Seems kinda sub-optimal from a privacy perspective
You can either increase your connection limit so that you have more available connections than people are likely to connect to you, or you can use an external firewall software to manage this for you.

If you use an external firewall, you could have it set so that you allow 21 connections (30 connections total - 8 outgoing connections - 1 for your wallet) on the default port from external sources, and then have another firewall rule on a different port which forwards traffic to the Bitcoin node port (8333) internally (so as to bypass the earlier firewall rule). You then connect to that other port with your SPV wallet.

Nice idea! Am def. going to try that and will report back. Hopefully Unifi USG router will support number of concurrent connections by port as I don't recall having seen that as an option in the GUI...
staff
Activity: 3458
Merit: 6793
Just writing some code
So there is no way to ensure my spv wallet can connect? Seems kinda sub-optimal from a privacy perspective
You can either increase your connection limit so that you have more available connections than people are likely to connect to you, or you can use an external firewall software to manage this for you.

If you use an external firewall, you could have it set so that you allow 21 connections (30 connections total - 8 outgoing connections - 1 for your wallet) on the default port from external sources, and then have another firewall rule on a different port which forwards traffic to the Bitcoin node port (8333) internally (so as to bypass the earlier firewall rule). You then connect to that other port with your SPV wallet.
sr. member
Activity: 302
Merit: 250
So there is no way to ensure my spv wallet can connect? Seems kinda sub-optimal from a privacy perspective
sr. member
Activity: 490
Merit: 389
Do not trust the government
Maybe you can run two instances of Bitcoin Core with different configurations, but same data directory.
You cannot have two instances of Bitcoin Core share the same data directory. It won't work, and it is not supposed to work.

Too bad, soft links to blocks should work then just fine. So OP could just copy the chainstate folder and link most of the old block files to that old data directory.
staff
Activity: 3458
Merit: 6793
Just writing some code
Maybe you can run two instances of Bitcoin Core with different configurations, but same data directory.
You cannot have two instances of Bitcoin Core share the same data directory. It won't work, and it is not supposed to work.
sr. member
Activity: 490
Merit: 389
Do not trust the government
Maybe you can run two instances of Bitcoin Core with different configurations, but same data directory. If this could work you would only use up more RAM and CPU, which are often negligible, while being able to specify different binding addresses and be able to open a permanent connection to that node.

For example, create a new configuration file witch binds Core to different port (not 8333), but only to localhost, so they can both work at the same time and only connections from the same PC can work on it. Also make a limit of only two connection to that node. Then start that node and go to your old node and add it as a peer. Create a Tor hidden service that forwards to that new node port, but don't change your configuration and add it as an external ip as you usually would. This should make that hidden service unknown for the Bitcoin Core network, as long as your light wallet doesn't tell anyone.

This is just an idea, it is very possible that it might never work. Especially with the same data directory, but you might be able to make soft links to the blocks or even hard links.
staff
Activity: 3458
Merit: 6793
Just writing some code
You can't reserve a connection for a specific peer or reserve ports for specific peers to connect to. The connection limit is global and not just for one network interface.
sr. member
Activity: 302
Merit: 250
I have a Bitcoin Core node running on a server at home which I have limited to 30 connections as this suits my current internet connection. I am now trying to use the 'advanced' feature of Bread (wallet) for iOS which allows connection to a manually-configured node however this only results in a successful connection 10% of the time -- when I have a free slot which may or may not be the case at any given moment.

I am aware that you can configure this for a local or remote node with a fixed ip address using the "addnode" command line argument, but is there a way to make this work for remote nodes without a fixed ip address? I think that "whitebind":
Code:
-whitebind= Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6
...might provide this functionality but not sure how you would configure it for this use case...

Perhaps there is a way to specify a second port which would reserve a few connections for people connecting via it? Is this what I can do with whitebind?

I think the ideal situation would be to connect to my home node over Tor, but not sure I can do this with Bread (wallet).
Jump to: