Pages:
Author

Topic: Electrum server discussion thread - page 3. (Read 61423 times)

newbie
Activity: 21
Merit: 0
July 07, 2017, 07:22:11 PM
I set /etc/hosts and the  DNS A record to the remote IP.  From there, I port forwarded to the server's internal IP which works. Still, SSL remains improperly configured.  I followed the directions on https://freedomnode.com/blog/69/how-to-install-an-electrum-server-using-full-bitcoin-node-and-electrumx

Is SSL worth setting up?
newbie
Activity: 21
Merit: 0
June 28, 2017, 07:31:11 PM
Now, electrum connects to electrumX when I set my A record in the DNS to the internal IP 10.0.0.2 => icarus.tetradrachm.net.  If I change the A record to my home router's external IP, electrum shows my electrum server as offline. I assume that the home router is firewalling electrumX, or electrumX needs a global IP (that is port forwarding will not suffice).
legendary
Activity: 1666
Merit: 1000
June 26, 2017, 09:16:36 AM
You need to use your LAN IP for the HOST (e.g. 192.168.1.xxx) and then the FQDN for the REPORT_HOST on E-X.
newbie
Activity: 21
Merit: 0
June 23, 2017, 07:30:27 PM
Could someone explain the last mile of setting up an electrum-server or electrumX server on a home network? My FQDN resolves, but it does not appear to be pointing to my desktop running electrumX. Perhaps the FQDN points to my router? I registered a domain name, but do I need a subdomain as well?
legendary
Activity: 3920
Merit: 2348
Eadem mutata resurgo
June 17, 2017, 11:54:09 PM
No to the first question.

ThomasV has stopped development of electrum-server and is encouraging all to use ElectrumX.  The main advantages of ElectrumX are the smaller DB and mainly the much faster sync time if building the db from genesis block.  It is literally 100+X faster.

This is interesting. Can ElectrumX be used on top of a current local blockchain (Core)? Or roughly how long will it take to sync entire blockchain up from scratch on ElectrumX (e.g relative to core)?

You must connect it to a Core node over RPC, so it doesn't sync independently. If the Core node is already synced and local, it'll take at least a few days to get ElectrumX synced. I started syncing mine on a slower computer (but with an SSD), and it's taken mine about a week.

thnx, exactly the info I was after.
legendary
Activity: 1762
Merit: 1010
June 15, 2017, 02:54:05 PM
Finally finished syncing mine. It looks like the ElectrumX database is currently around 22 GB.
legendary
Activity: 1762
Merit: 1010
June 12, 2017, 07:41:58 AM
No to the first question.

ThomasV has stopped development of electrum-server and is encouraging all to use ElectrumX.  The main advantages of ElectrumX are the smaller DB and mainly the much faster sync time if building the db from genesis block.  It is literally 100+X faster.

This is interesting. Can ElectrumX be used on top of a current local blockchain (Core)? Or roughly how long will it take to sync entire blockchain up from scratch on ElectrumX (e.g relative to core)?

You must connect it to a Core node over RPC, so it doesn't sync independently. If the Core node is already synced and local, it'll take at least a few days to get ElectrumX synced. I started syncing mine on a slower computer (but with an SSD), and it's taken mine about a week.
legendary
Activity: 3920
Merit: 2348
Eadem mutata resurgo
June 11, 2017, 09:25:36 PM
No to the first question.

ThomasV has stopped development of electrum-server and is encouraging all to use ElectrumX.  The main advantages of ElectrumX are the smaller DB and mainly the much faster sync time if building the db from genesis block.  It is literally 100+X faster.

This is interesting. Can ElectrumX be used on top of a current local blockchain (Core)? Or roughly how long will it take to sync entire blockchain up from scratch on ElectrumX (e.g relative to core)?
legendary
Activity: 1762
Merit: 1010
June 11, 2017, 03:24:01 PM
It looks like there are some further memory management issues that simply lowering CACHE_MB doesn't solve.

 I'll have to post this issue to the Github:

Code:
INFO:BlockProcessor:our height: 362,156 daemon: 470,268 UTXOs 492MB hist 78MB
INFO:BlockProcessor:our height: 362,190 daemon: 470,268 UTXOs 496MB hist 92MB
INFO:BlockProcessor:our height: 362,235 daemon: 470,269 UTXOs 499MB hist 105MB
INFO:BlockProcessor:flushed to FS in 0.1s
INFO:BlockProcessor:flushed history in 7.2s for 514,119 addrs
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
Aborted (core dumped)



Code:
INFO:BlockProcessor:our height: 444,430 daemon: 470,829 UTXOs 477MB hist 96MB
INFO:BlockProcessor:our height: 444,441 daemon: 470,829 UTXOs 482MB hist 107MB
INFO:BlockProcessor:our height: 444,451 daemon: 470,829 UTXOs 486MB hist 116MB
INFO:BlockProcessor:flushed to FS in 0.1s
INFO:BlockProcessor:flushed history in 7.3s for 578,675 addrs
terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
Aborted (core dumped)
legendary
Activity: 1762
Merit: 1010
June 07, 2017, 03:34:35 PM
Here are the steps I took to get a bare bones instance of ElectrumX up and running on Windows 10 with the Windows Subsystem for Linux:

First, some backstory. For some reason, I couldn't get rid of an underlying instance of python3.5 on (at least my copy of) the Windows Subsystem for Linux. I *also* couldn't get python3-pip to install without it also wanting to pull python3.5 dependencies. Because of this, I had to make sure to always explicitly call python3.6 when running everything. Also, for whatever reason, the installation required using sudo in places where you normally wouldn't.

So, assuming you already have the Windows Subsystem for Linux up and running, and you have a Bitcoin node running with txindex=1 and rpc configured and ready to connect to, here are the commands I ran to get a very bare bones copy of ElectrumX up and running:

sudo apt-get install python3.6 python3.6-dev
sudo apt install python3-pip
sudo python3.6 -m pip install --upgrade pip setuptools wheel
sudo apt-get install libleveldb-dev
sudo python3.6 -m pip install aiohttp pylru leveldb plyvel
mkdir ~/source
cd ~/source
git clone https://github.com/kyuupichan/electrumx.git
cd electrumx
sudo python3.6 -m pip install jaraco.collections

sudo python3.6 setup.py install
(keep repeating this install command until *all* packages actually download and install without errors)

mkdir ~/.electrumx
cd ~/.electrumx

(for more on configuring the following ssl certificate stuff, see the following tutorial, midway down the page: https://freedomnode.com/blog/69/how-to-install-an-electrum-server-using-full-bitcoin-node-and-electrumx )
openssl genrsa -des3 -passout pass:x -out server.pass.key 2048
openssl rsa -passin pass:x -in server.pass.key -out server.key
rm server.pass.key
openssl req -new -key server.key -out server.csr

(make sure to customize the following to point to your own user directory to point to the above .electrum path, and using your, preferably random, Bitcoin node rpc username and password)
export DAEMON_URL=http://rpc_username:rpc_password@localhost:8332/
export DB_DIRECTORY=/home/mmortal03/.electrumx/
export SSL_CERTFILE=/home/mmortal03/.electrumx/server.crt
export SSL_KEYFILE=/home/mmortal03/.electrumx/server.key
export CACHE_MB=600
python3.6 ~/source/electrumx/electrumx_server.py
legendary
Activity: 1762
Merit: 1010
June 07, 2017, 09:00:17 AM
I guess I should try lowering CACHE_MB and see what happens.
legendary
Activity: 1762
Merit: 1010
June 07, 2017, 02:37:43 AM
Also, it looks like I'm running into a memory leak (I've been having to close it and open it back up to try to avoid this):

Code:
INFO:BlockProcessor:our height: 304,501 daemon: 470,107 UTXOs 854MB hist 228MB
INFO:BlockProcessor:our height: 304,569 daemon: 470,107 UTXOs 854MB hist 240MB
INFO:BlockProcessor:flushed to FS in 0.2s
INFO:BlockProcessor:flushed history in 14.0s for 1,159,443 addrs
INFO:BlockProcessor:flush #45 took 14.9s.  Height 304,569 txs: 40,250,489
INFO:BlockProcessor:tx/sec since genesis: 971, since last flush: 841
INFO:BlockProcessor:sync time: 11h 30m 18s  ETA: 3d 15h 33m
INFO:BlockProcessor:our height: 304,672 daemon: 470,107 UTXOs 858MB hist 19MB
INFO:BlockProcessor:our height: 304,781 daemon: 470,107 UTXOs 863MB hist 35MB
INFO:BlockProcessor:our height: 304,848 daemon: 470,107 UTXOs 872MB hist 52MB
INFO:BlockProcessor:our height: 304,935 daemon: 470,107 UTXOs 874MB hist 64MB
INFO:BlockProcessor:our height: 304,988 daemon: 470,107 UTXOs 874MB hist 76MB
ERROR:Controller:Traceback (most recent call last):
  File "/home/mmortal03/source/electrumx/server/controller.py", line 157, in on_future_done
    future.result()
  File "/home/mmortal03/source/electrumx/server/block_processor.py", line 201, in main_loop
    await task()
  File "/home/mmortal03/source/electrumx/server/block_processor.py", line 243, in check_and_advance_blocks
    await self.controller.run_in_executor(self.advance_blocks, blocks)
  File "/home/mmortal03/source/electrumx/server/controller.py", line 137, in run_in_executor
    return await self.loop.run_in_executor(None, func, *args)
  File "/usr/lib/python3.6/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/mmortal03/source/electrumx/server/block_processor.py", line 493, in advance_blocks
    undo_info = self.advance_txs(block.transactions)
  File "/home/mmortal03/source/electrumx/server/block_processor.py", line 546, in advance_txs
    hashX + tx_numb + s_pack('MemoryError
legendary
Activity: 1762
Merit: 1010
June 06, 2017, 08:40:40 AM
JWU42, It looks like I've gotten ElectrumX to work on the Windows Subsystem for Linux. I'll post directions in a little while. I have a quick question, though: How large is the ElectrumX database directory once it's synced currently?
legendary
Activity: 1762
Merit: 1010
June 02, 2017, 07:04:32 PM
No to the first question.

As soon as I get my txindex resynced, I'll give it a shot.
legendary
Activity: 1666
Merit: 1000
June 02, 2017, 07:12:13 AM
No to the first question.

ThomasV has stopped development of electrum-server and is encouraging all to use ElectrumX.  The main advantages of ElectrumX are the smaller DB and mainly the much faster sync time if building the db from genesis block.  It is literally 100+X faster.
legendary
Activity: 1762
Merit: 1010
June 02, 2017, 04:23:18 AM
I wonder if it's possible to run the ElectrumX server on the Windows Subsystem for Linux (Bash on Ubuntu on Windows). Has anyone tried this?

Also, what's the difference between Electrum server and ElectrumX server?
member
Activity: 83
Merit: 13
Bitcoin = Freedom
February 14, 2017, 10:07:59 AM
The developer of ElectrumX had been doing testing on a Mac.  I suspect you need a bit of technical chops to get it working...
Thanks, I'll give it a try! I'm a tech guy so I think I'll be able to figure it out.
legendary
Activity: 1666
Merit: 1000
February 13, 2017, 07:25:13 AM
Possible - yes though I have no idea how it is done.

The developer of ElectrumX had been doing testing on a Mac.  I suspect you need a bit of technical chops to get it working...
member
Activity: 83
Merit: 13
Bitcoin = Freedom
February 13, 2017, 02:41:08 AM
I have some spare macbook pro late 2011 and I'm thinking of either selling it for peanuts or running electrum server on it (and possibly have more security for my secondary funds held in Electrum). Is it's still impossible to run the code on anything other than linux?
donator
Activity: 668
Merit: 500
January 03, 2017, 02:16:25 AM
Trying to get an electrum server up and running but get following error in logs

INFO:root:ElectrumX server starting
INFO:BlockProcessor:switching current directory to /home/kipper01/.electrumx/db
INFO:BlockProcessor:reorg limit is 200 blocks
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/electrumx-0.9.19-py3.5.egg/EGG-INFO/scripts/electrumx_server.py", line 68, in main
  File "/usr/local/lib/python3.5/dist-packages/electrumx-0.9.19-py3.5.egg/EGG-INFO/scripts/electrumx_server.py", line 49, in main_loop
  File "/usr/local/lib/python3.5/dist-packages/electrumx-0.9.19-py3.5.egg/server/protocol.py", line 58, in __init__
    self.bp = BlockProcessor(env)
  File "/usr/local/lib/python3.5/dist-packages/electrumx-0.9.19-py3.5.egg/server/block_processor.py", line 161, in __init__
    super().__init__(env)
  File "/usr/local/lib/python3.5/dist-packages/electrumx-0.9.19-py3.5.egg/server/db.py", line 54, in __init__
    self.reopen_db(True)
  File "/usr/local/lib/python3.5/dist-packages/electrumx-0.9.19-py3.5.egg/server/db.py", line 86, in reopen_db
    self.db = open_db(db_name, self.env.db_engine, max_open_files)
  File "/usr/local/lib/python3.5/dist-packages/electrumx-0.9.19-py3.5.egg/server/storage.py", line 24, in open_db
    return db_class(name, for_sync)
  File "/usr/local/lib/python3.5/dist-packages/electrumx-0.9.19-py3.5.egg/server/storage.py", line 34, in __init__
    self.open(name, create=self.is_new, for_sync=for_sync)
  File "/usr/local/lib/python3.5/dist-packages/electrumx-0.9.19-py3.5.egg/server/storage.py", line 85, in open
    max_open_files=mof, compression=None)
  File "_plyvel.pyx", line 236, in plyvel._plyvel.DB.__init__ (plyvel/_plyvel.cpp:3129)
  File "_plyvel.pyx", line 80, in plyvel._plyvel.raise_for_status (plyvel/_plyvel.cpp:1698)
plyvel._plyvel.IOError: b'IO error: lock Bitcoin-mainnet/LOCK: Resource temporarily unavailable'
CRITICAL:root:ElectrumX server terminated abnormally

Please visit #electrum for help, I don't read this site.

The above just means you had the DB open already elsewhere, perhaps you were running 2 sessions.
Pages:
Jump to: