In this topic I’ll post about various “unofficial” ways Counterparty Federated Node can be tweaked, initially with focus on data management because dealing multiple copies of large data is both expensive and time-consuming.
##Example 1: Bitcoin Core with addrindex on different host
When you install Federated Node it will install and start all services. If you already have Bitcoin Core addrindex somewhere (maybe on the host, or on LAN), you may want to change your Federated Node’s Bitcoin configuration.
To do that, you want to stop Bitcoin (fednode stop bitcoin
, on mainnet) and then change the configuration of your services that use Bitcoin Core addrindex. That depends on what you installed. The counterblock configuration includes counterparty and counterblock server, so I modify these two:
-
backend-connect
in config/counterblock/server.testnet.conf and config/counterparty/server.testnet.conf (testnet example). Point it to your Bitcoin Core addrindex server’s IP and make sure the RPC port on that IP is accessible. -
backend-user
andbackend-password
: change these to reflect configuration of your existing node
Now you can start these services and use fednode tail <SERVICENAME>
to see whether they’re working as expected.
With Counterwallet you’d have to change its configuration file as well.
##Example 2: MongoDB on different host
Similarly to Bitcoin Core, MongoDB can take up precious space and if you have an instance on your LAN or host, you can use that.
In counterblock.server.conf simply change mongodb-connect=<LAN-IP>
and restart your counterblock service.
Note that if multiple Fed Node instances use the same back end Mongo database server at the same time, it may create unpredictable results.
##Example 3: counterparty server on another host
This is possible as well and the procedure is similar to the other two above.
Counterparty doesn’t take up a lot of space (0.5 - 1.5 GB, testnet and mainnet) but it takes time to reparse and catch up, so it’s still good to be able to reuse existing server and data.
Counterwallet and Counterblock both use Counterparty API so their configuration files would have to be changed.