trezor / blockbook

:blue_book: Trezor address/account balance backend
https://trezor.io
GNU Affero General Public License v3.0
640 stars 635 forks source link

Is it possible to connect the backend to an external node? #1067

Open mduque1 opened 3 months ago

mduque1 commented 3 months ago

Running the installation guide for BTC, a full BTC node is synchronized, the question here is: if it is possible to save this step and connect to an external node that is already up, using some conf file, such as those created in the /opt/coins/nodes (or other) directory. And thus launch the BTC backend service connected in turn to the BTC full node on another machine. Greetings

vdovhanych commented 3 months ago

If you mean connecting the bloockbook service to some external backend(node) its possible by just changing the IP for the rpc connection to that node. fe. The configuration for the Bitcoin Blockbook is at /opt/coins/blockbook/bitcoin/config/blockchaincfg.json where you need to change the RPC IP connection. Keep in mind that it has to be accessible from where the blockbook is running.

mduque1 commented 3 months ago

Sorry, in the /opt/coins path I don't have any "blockchaincfg.json" file. I'll try to improve my explanation: According to the documentation, to install the Blockbook backend you have to run "make all-bitcoin" in the repository, followed by "apt install ./backend-bitcoin_0.16.1-...", and finally start the "systemctl start backend" service -bitcoin.service". Well, here it begins to synchronize all the btc blocks. And this is just what I want to avoid. I want to implement the blockbook backend without synchronizing the btc node, just connect the backend to an existing external btc node. I would like to know the steps, modifications and instructions that must be carried out for this task. Thank you!

vdovhanych commented 3 months ago

Ah, I see. Well, in that case, it's still relevant. If you run make all-bitcoin, it will build two packages: one is the bitcoin backend with some configuration (bitcoind) and another package, blockbook, which is blockchain explorer. That is the config path I sent you earlier. That is where you can specify your bitcoind RPC connection to use that backend instead of the one that comes with blockbook.