:: [Libbitcoin] libbitcoin server prox…
Page principale
Supprimer ce message
Répondre à ce message
Auteur: Police Terror
Date:  
À: libbitcoin
Sujet: [Libbitcoin] libbitcoin server proxy for multiple nodes
Hello,

Sometimes nodes can go down, stop responding or their blockchain doesn't
update. Maybe the VPS is switched off, a firewall blockchain ports or a
Bitcoin network split (on small networks like testnet).

For this I've created this request forwarding proxy:

https://github.com/RojavaCrypto/libitcoin-server-proxy

Here are the config values in main.py:

local_port = 8081
remotes = [
    ("tcp://163.172.84.141:9091", "tcp://163.172.84.141:9092"),
    ("tcp://163.172.84.141:10091", "tcp://163.172.84.141:10092")
]


If I connect to this proxy and make libbitcoin-server requests on port
8081, it will forward the request to one of those nodes, then give me
the response back.

It selects the nodes that sent a heartbeat less than 10 secs ago, and
then chooses the node with the maximum current block height in the list.