Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: space_head121 on July 03, 2020, 12:10:39 PM



Title: Conneting server to a node.
Post by: space_head121 on July 03, 2020, 12:10:39 PM
Hi i have set up a server (following this guide: https://www.oodlestechnologies.com/blogs/A-Brief-Introduction-of-Litecoin-Server-Setup/). Also i have litecoin node on my network (it's is post rpc, i wrote simple client in python so i can query it, and it returns proper number of blocks). I would like to connect node (node is up set up by someone else) to this server, and than use this server in my electrum-wallet.  However i am facing problems because of lack of knowledge. When i start the litecoind-cli and sent 'getinfo' it returns me '234611' number of blocks which is strange.

My litecoin.conf file:

connect=node_ip:port
server=1
rpcuser=user
rpcpassword=password
txindex=1

i used this docs: https://manpages.debian.org/testing/litecoind/litecoin.conf.5

I searched a lot on web but can't resolve my problems.
Thanks for any help in advance!


Title: Re: Conneting server to a node.
Post by: mocacinno on July 03, 2020, 12:20:25 PM
I have a hard time following which problem you're trying to solve, and which steps you actually took...

You install a server (OS), on this server you install a litecoin node... You use litecoin-cli to query this node.

But in your post, you're talking about setting up a server (while linking to the setup instructions for a full node), then you say that you have a (second?) node on your network aswell? Then you connect your server (which in your case should be a node, since you followed instructions on how to setup a node) to a (second?) node... Why?
Usually, you just setup a node, it'll use a dns seed to find other nodes and it'll do an initial sync from these other nodes... No need to connect to one specific node.

Maybe it's best if you describe your setup in more detail, and maybe look in the debug.log to see if your node is healthy and fully synced...


Title: Re: Conneting server to a node.
Post by: space_head121 on July 03, 2020, 12:32:51 PM
hmm you enlighten me a bit. I mean i don't want to install node on my machine since it's already on network. I would like to install a server and that connect to it my electrum wallet. I want to connect only to this one desired node since.

Thanks for explanation, would this https://github.com/kyuupichan/electrumx be fine for my case?


Title: Re: Conneting server to a node.
Post by: mocacinno on July 03, 2020, 12:38:45 PM
hmm you enlighten me a bit. I mean i don't want to install node on my machine since it's already on network. I would like to install a server and that connect to it my electrum wallet. I want to connect only to this one desired node since.

Thanks for explanation, would this https://github.com/kyuupichan/electrumx be fine for my case?

aaaah... I start to see what you're aiming for here...

So, basically:
  • somebody has a full node running on your network. It does have txindex=1, right? If not, start looking at something like electrs instead of electrumx
  • you want to install an electrum server on your own machine, using this full node as a backend
  • you want your electrum wallet connected to your electrum node

To be honest, i've only installed instances in which the full node and the electrum server were located on the same machine... That being said, your setup should be doable, i have no idear if there will be caveats though...

Electrumx is a decent electrum server, i think it should be able to do what you want to achieve

You'll probably want to point your env var DAEMON_URL to the remote node you're using as a backend...
https://github.com/kyuupichan/electrumx/blob/master/docs/environment.rst


Title: Re: Conneting server to a node.
Post by: space_head121 on July 03, 2020, 12:45:08 PM
Thanks a lot your answers where very helpful!  :D


Title: Re: Conneting server to a node.
Post by: space_head121 on July 06, 2020, 10:08:40 AM
I manage to progress :D i finally decided to try docker installation of electrum  server, because there where some problems with normal installation. When i run it:

docker run \
  -v /home/username/electrumx:/data \
  -e DAEMON_URL=http://user:pass@host:port \
  -e COIN=BitcoinSegwit \
  -p 50002:50002 \
  lukechilds/electrumx

it launches but then i recive several MemoryErrors
ERROR: Prefetching:ignoring unexpected exception

I don't know if i should ignore them or they are crucial for launching properly the server. It's the problem with RAM memory or just  the available free space on disk?