Hi, Wonder why the lightningd and bitcoind has to be on the same machine? It doesn't talk to bitcoind over ipc or anything right? Shouldn't it be just able to call bitcoin RPC with right user/pass then where do I configure them?
We currently use the bitcoin-cli binary to issue all of the RPC calls. A trivial fix could be to use -rpcconnect to have bitcoin-cli connect to a remote bitcoind. Eventually we'd like to remove the requirement for a bitcoind running for c-lightning to work, but that's still quite far in the future.
well, my situation is I already have a full bitcoin node running on separate windows machine and setting up another node just for LN isnt feasible at this moment. I was trying to understand the bridge between lightningd and bitcoind. Not sure how bitcoin-cli would help in this case? Are you saying as long as btc-cli from local machine is connected to remote bitcoind, lightningd won't complain and just work fine?
solutionjet notifications@github.com writes:
well, my situation is I already have a full bitcoin node running on separate windows machine and setting up another node just for LN isnt feasible at this moment. I was trying to understand the bridge between lightningd and bitcoind. Not sure how bitcoin-cli would help in this case? Are you saying as long as btc-cli from local machine is connected to remote bitcoind, lightningd won't complain and just work fine?
Yes, bitcoin-cli can be made to work remotely I believe.
Cheers,
Rusty.
Maybe you could add rpcconnect=<ip> to your bitcoin.conf on the machine that lightningd is running on, where <ip> is the address of the node running bitcoind. This'll instruct bitcoin-cli to connect to that IP instead of assuming 127.0.0.1.
@rustyrussell: should we add some more bitcoin-related command line flags (rpcuser, rpcpassword, rpcport and rpcconnect) to lightningd so we can skip using bitcoin.conf at all?
that'd be little better with less coupling and ability to connect to any bitcoin node both local and remote
Well all you really need is an empty directory with the bitcoin.conf file in there and then point --bitcoin-datadir to it. You don't actually have to use a real .bitcoin directory :-)
But yeah, not relying on a bitcoin.conf file might be a nice addition.
Christian Decker notifications@github.com writes:
Maybe you could add
rpcconnect=<ip>to yourbitcoin.confon the machine thatlightningdis running on, where<ip>is the address of the node runningbitcoind. This'll instructbitcoin-clito connect to that IP instead of assuming127.0.0.1.@rustyrussell: should we add some more bitcoin-related command line flags (
rpcuser,rpcpassword,rpcportandrpcconnect) tolightningdso we can skip usingbitcoin.confat all?
Yes.
I was thinking we could add --bitcoin-option=*, and pass them through,
but if we ever wean off bitcoin-cli, that would mean we'd have to parse
them ourselves to find those options.
FWIW, I'm happy having all the TLS crap in a separate binary, but it
does mean we need bitcoin-cli installed.
Does #849 cover this issue in practice?
FWIW, I'm happy having all the TLS crap in a separate binary, but it does mean we need bitcoin-cli installed.
FYI there is no TLS crap in bitcoin-cli, neither the RPC server nor client has supported SSL for a long time.
Edit: Bitcoin Core 0.12.0 dropped RPC SSL support.
Closing since #849 should address this. Please feel free to reopen otherwise.
Hi,
Excuse me, Could we send RPC commands to other ips using rpcconnect? I mean without knowing their rpcpassword? because I get answer when I assign an up IP to rpcconnect in bitcoin.conf.
Can I do that for all up nodes in bitcoin?
Thanks
Most helpful comment
We currently use the
bitcoin-clibinary to issue all of the RPC calls. A trivial fix could be to use-rpcconnectto havebitcoin-cliconnect to a remotebitcoind. Eventually we'd like to remove the requirement for abitcoindrunning for c-lightning to work, but that's still quite far in the future.