Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: d4n13 on June 19, 2015, 05:10:56 AM



Title: How to run a partial node connected to full node?
Post by: d4n13 on June 19, 2015, 05:10:56 AM
I have a full node running on my LAN, and would like to utilize it's work on other clients.

How to I get bitcoin core to run a partial node trusting my dedicated full node for blockchain queries (or has that not been invented yet)?

Thx


Title: Re: How to run a partial node connected to full node?
Post by: d4n13 on June 19, 2015, 06:53:01 AM
OK... looks like bitcoinj may be what I'm after.  The WalletTemplate class looks perfectly sufficient.

There is some APIs that control the peer list, and looks to be a sample of building this list manually, which is what I'm after.

I'll keep digging, but this is pretty "close-enough" for my windows and linux machines.

Anyone else have a simpler answer, aka "bitcoin-qt.exe -partial -connect=10.10.10.50"?

Thx


Title: Re: How to run a partial node connected to full node?
Post by: achow101 on June 19, 2015, 03:20:19 PM
Bitcoin Core be default is a full node. You cannot change it to be a partial node without changing the code. In order to have a partial node, you need other software, such as something built on BitcoinJ (e.g. MultiBit) and you can specifically have it only connect to your Bitcoin Core full node.


Title: Re: How to run a partial node connected to full node?
Post by: d4n13 on June 19, 2015, 04:00:41 PM
Any suggestions on how to make a bitcoinJ client (aka MultiBit) be specific on its node selection?

Multibit.exe -connect=10.10.10.5 ?


Title: Re: How to run a partial node connected to full node?
Post by: achow101 on June 19, 2015, 04:14:58 PM
open the file multibit.properties in %appdata%/Multibit
Add the line
Code:
peers=<peers to connect to>
where <peers to connect to> is a comma separated list of ip addresses of the nodes you want it to connect to.


Title: Re: How to run a partial node connected to full node?
Post by: d4n13 on June 19, 2015, 04:25:05 PM
Shazam!!!

many many thanks.

Didn't see the specification to the properties file, but I only just found the multibit github repo.

You have a link to the full property specification?


Title: Re: How to run a partial node connected to full node?
Post by: achow101 on June 19, 2015, 04:53:01 PM
here is what I found for the properties file: https://github.com/jim618/multibit/blob/master/configuration.md
It doesn't have everything about the properties file, but it does have the thing about peers.


Title: Re: How to run a partial node connected to full node?
Post by: d4n13 on June 19, 2015, 06:50:20 PM
Thanks... to add to your research, that was for an older version of MultiBit.

New MultiBitHD uses "mbhd.yaml", but I think the process is similar.  Still trying to document mbhd.yaml


Title: Re: How to run a partial node connected to full node?
Post by: tl121 on June 20, 2015, 06:49:26 PM
I have run bitcoin core on a number of computers on my LAN that are configured (via the config file) to only talk to one front-facing bitcoind on a dedicated computer.   I mostly did this for test purposes.  The problem is that every time you turn on a a bitcoin node it has to catch up its copy of the block chain.  This takes a while even going directly over a gigabit/second LAN connection.  About the only benefit of running this way is that it eliminates extra traffic on my (slow) Internet connection.

Presently, I run an Electrum server on my dedicated bitcoin node.  I run Electrum clients on several of my other computers and these access the dedicated node on demand.  Electrum clients support Trezor, making providing convenient access to bitcoins secured by a hardware wallet.



Title: Re: How to run a partial node connected to full node?
Post by: coinpr0n on June 21, 2015, 02:07:16 PM
Full node bitcoin.conf example:
Code:
...
rpcuser=Ulysseys
rpcpassword=random_authvalue_DO_NOT_USE_THIS_STRING_OR_YOU_WILL_GET_ROBBED
rpcallowip=192.168.1.0/255.255.255.0
...

Partial node bitcoin.conf example:
Code:
...
rpcuser=Ulysseys
rpcpassword=random_authvalue_DO_NOT_USE_THIS_STRING_OR_YOU_WILL_GET_ROBBED
rpcconnect=192.168.1.42
...