Bitcoin Forum
April 26, 2024, 11:53:36 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 [20] 21 22 »  All
  Print  
Author Topic: Electrum server discussion thread  (Read 61410 times)
mmortal03
Legendary
*
Offline Offline

Activity: 1762
Merit: 1010


View Profile
June 07, 2017, 07:34:35 PM
 #381

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
1714175616
Hero Member
*
Offline Offline

Posts: 1714175616

View Profile Personal Message (Offline)

Ignore
1714175616
Reply with quote  #2

1714175616
Report to moderator
1714175616
Hero Member
*
Offline Offline

Posts: 1714175616

View Profile Personal Message (Offline)

Ignore
1714175616
Reply with quote  #2

1714175616
Report to moderator
1714175616
Hero Member
*
Offline Offline

Posts: 1714175616

View Profile Personal Message (Offline)

Ignore
1714175616
Reply with quote  #2

1714175616
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714175616
Hero Member
*
Offline Offline

Posts: 1714175616

View Profile Personal Message (Offline)

Ignore
1714175616
Reply with quote  #2

1714175616
Report to moderator
mmortal03
Legendary
*
Offline Offline

Activity: 1762
Merit: 1010


View Profile
June 11, 2017, 07:24:01 PM
 #382

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)
marcus_of_augustus
Legendary
*
Offline Offline

Activity: 3920
Merit: 2348


Eadem mutata resurgo


View Profile
June 12, 2017, 01:25:36 AM
 #383

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)?

mmortal03
Legendary
*
Offline Offline

Activity: 1762
Merit: 1010


View Profile
June 12, 2017, 11:41:58 AM
 #384

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.
mmortal03
Legendary
*
Offline Offline

Activity: 1762
Merit: 1010


View Profile
June 15, 2017, 06:54:05 PM
 #385

Finally finished syncing mine. It looks like the ElectrumX database is currently around 22 GB.
marcus_of_augustus
Legendary
*
Offline Offline

Activity: 3920
Merit: 2348


Eadem mutata resurgo


View Profile
June 18, 2017, 03:54:09 AM
 #386

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.

aetherist
Newbie
*
Offline Offline

Activity: 21
Merit: 0


View Profile
June 23, 2017, 11:30:27 PM
 #387

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?
JWU42
Legendary
*
Offline Offline

Activity: 1666
Merit: 1000


View Profile
June 26, 2017, 01:16:36 PM
 #388

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.

aetherist
Newbie
*
Offline Offline

Activity: 21
Merit: 0


View Profile
June 28, 2017, 11:31:11 PM
 #389

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).
aetherist
Newbie
*
Offline Offline

Activity: 21
Merit: 0


View Profile
July 07, 2017, 11:22:11 PM
 #390

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?
takinbo
Newbie
*
Offline Offline

Activity: 18
Merit: 0


View Profile
July 08, 2017, 01:09:26 AM
 #391

It is worth setting up if your host is going to be publicly accessible. With regards to setting up SSL, what you might need to understand is that clients usually cache the certificates of the hosts after connecting for the first time and if the certificate changes, they would flag the connection as possibly being MITM'ed.

Can you state exactly what you are experiencing with setting up SSL?
aetherist
Newbie
*
Offline Offline

Activity: 21
Merit: 0


View Profile
July 10, 2017, 09:12:07 AM
 #392

I am hosting publicly: icarus.tetradrachm.net.   When I followed the directions on the aforementioned guide, I did not get any errors.  However, when I attempt to connect my electrum light wallet to my full node electrumX server I get a green light when I choose 50001 and uncheck SSL and a red light when I choose SSL 50002.  Typing "journalctl | grep electrum" in the terminal prints, "electrumx_server.py[1069]: INFO:ElectrumX:[1919] SSL 70.181.17.94:33670, 89 total" among other TCP and SSL connections which confuses me. Perhaps my SSL is misconfigured on my light wallet end?

I know that web servers tend to have their signed certificates hosted by a 3rd party CA.  Does this apply to electrumX/electrum-server? I have not paid to register a CSR with a CA.
takinbo
Newbie
*
Offline Offline

Activity: 18
Merit: 0


View Profile
July 10, 2017, 10:21:20 AM
 #393

Electrum clients don't have a problem with self-signed certificates so no need to get a CA-signed one.

I attempted to connect to your node to debug the SSL problem and I think everything is okay except that you did not specify a Common Name for the certificate when you were creating it. You want to at least use icarus.tetradrachm.net as your common name (wildcards "*" will work just fine too) and create a new certificate. If you have the private key of the current certificate, you can attempt to create a new self-signed certificate using the same key but this time remembering to add a common name.

HTH
aetherist
Newbie
*
Offline Offline

Activity: 21
Merit: 0


View Profile
July 12, 2017, 11:32:52 PM
 #394

I have the verbose output from electrum (not the server).

[Network] connecting to icarus.tetradrachm.net:50002:s as new interface
[icarus.tetradrachm.net] SSL error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)
[icarus.tetradrachm.net] wrong certificate
[Network] connecting to icarus.tetradrachm.net:50002:s as new interface
takinbo
Newbie
*
Offline Offline

Activity: 18
Merit: 0


View Profile
July 13, 2017, 12:31:14 AM
 #395

As I mentioned in my previous post. You have to recreate the certificate with a specified common name for it to work.
aetherist
Newbie
*
Offline Offline

Activity: 21
Merit: 0


View Profile
July 16, 2017, 10:14:17 PM
Last edit: July 17, 2017, 09:54:16 AM by aetherist
 #396

I signed a new certificate which listed the FQDN.  However, I still had the same error. After reading this, https://github.com/spesmilo/electrum/issues/1782, I realized that my laptop and phone thin wallets had connected to my server when I had my original SSL certificate in which I had filled out all the fields.  I had deleted this one when I got too much spam from bots scraping my e-mail off the certificate.  Since the original certificate was in my thin clients ~/.electrum/certs as trusted, my server was either flagged as MITM'd or my thin client tried to use the incorrect certificate, so my server refused the connection.  After deleting the trusted certificates, I have connected via SSL on both thin clients now.

On another topic, with regards to bootstrapping speed, my online instructor stated that VFS is much faster than ext4.  So, I am considering reformatting my 4TB bitcoind HDD and 0.5TB  electrumX SSD, and lowering bitcoind's dbcache from the current setting of 3GB.  Bitcoind uses 10% of my 20GB of RAM after bootstrapping.  I welcome any resource allocation suggestions.
quicktolegit96
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
July 17, 2017, 03:05:27 AM
 #397

can someone tell me if i can switch from standard wallet to 2FA (authenticator) or hardware device and how do i do this?

Lionel
Sr. Member
****
Offline Offline

Activity: 613
Merit: 305


View Profile
August 03, 2017, 08:14:06 PM
 #398

Hi,

i have an Electrum wallet running on Windows but i don't see a way to neither open the Python console nor to make the daemon listen on localhost:7777 so that i can send him commands from my script.

How can i achieve that?
takinbo
Newbie
*
Offline Offline

Activity: 18
Merit: 0


View Profile
August 03, 2017, 08:25:51 PM
 #399

Click on the View menu option and select "Show Console"
Lionel
Sr. Member
****
Offline Offline

Activity: 613
Merit: 305


View Profile
August 03, 2017, 08:55:35 PM
 #400

Click on the View menu option and select "Show Console"

Thanks ; )

How can i run it in daemon mode on port 7777 on Windows?

Maybe i need to use the Python version of Electrum ?

 Is this the right one: https://launchpad.net/ubuntu/trusty/+package/python-electrum
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 [20] 21 22 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!