Bitcoin Forum
April 30, 2024, 06:23:09 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Electrum / Re: An efficient re-implementation of Electrum Server in Rust on: March 04, 2020, 11:01:12 PM
Unable to get Electrum wallet to connect to electrs

Unsure if this is the right thread to ask this, however I couldn't find a thread that related to this issue so here goes -

Have electrs running (confirmed with: sudo systemctl status electrs). Have installed Electrum wallet, & edited the electrum.desktop file as follows to connect to localhost -

Code:
Exec=sh -c "PATH=\"\\$HOME/.local/bin:\\$PATH\"; electrum --oneserver --server localhost:50001:t %u"

Network Server tab in Electrum wallet shows "Server: localhost 50001" & all other servers greyed out, however within Network OverviewStatus: shows "Not connected" & Server: shows "None"

Perhaps there are config edits I need to make elsewhere for Electrum to connect to electrs?

Any suggestions greatly appreciated! Thank you in advance.
2  Bitcoin / Electrum / Re: An efficient re-implementation of Electrum Server in Rust on: March 04, 2020, 09:13:29 PM

Quote
So, try this:
Code:
cargo run --release -- -vvv --timestamp --db-dir ./db --daemon-dir /mnt/HDD/ --electrum-rpc-addr="127.0.0.1:50001" --cookie-file /home/user/.bitcoin/.cookie

It worked! Electrs is up & running, financial self-sovereignty is within very close reach. Yes my apologies, I meant to refer to electrs not Electrum in my previous comment - rookie mistake.

As a non-techie noob I'm blown away by this world of open source development & the remarkable minds working together to make it all happen.

HCP Sir, a MASSIVE thank you for walking me through this. Means a lot. Hope to be able to contribute in some way myself in future.
3  Bitcoin / Electrum / Re: An efficient re-implementation of Electrum Server in Rust on: March 03, 2020, 07:01:33 AM
Ok... so I use a shell script to start it up... it's basically one line:

Code:
cargo run --release -- -vvv --timestamp --db-dir /mnt/e/electrs --daemon-dir /mnt/e/Bitcoin --electrum-rpc-addr="127.0.0.1:50001"

As you can see... I've got --daemon-dir added into the "cargo run" command... and specified the path to my Bitcoin blocks folder... "/mnt/e/Bitcoin" (I've also put the electrs db-dir in a custom location too)


Great, thank you for suggesting! Doesn't seem to do the trick unfortunately. I assume that   --db-dir ./db  within the argument refers to the Electrum database, so I've left this unchanged given I have Electrs located in the default /home/electrs/ location. Thus my code is as follows -

Code:
cargo run --release -- -vvv --timestamp --db-dir ./db --daemon-dir /mnt/HDD/ --electrum-rpc-addr="127.0.0.1:50001"

This returns the following recurring error:

"WARN - reconnecting to bitcoind: failed to read cookie from /mnt/HDD/.cookie"
.
The .cookie file is not produced within the /mnt/HDD/ folder but instead within /Home/User/.bitcoin, together with the bitcoin.conf file, & I have the following argument within the bitcoin.conf file that sets /mnt/HDD/ as the data directory: "datadir=/mnt/HDD"

I have the following argument - "rpccookiefile=/home/user/.bitcoin/.cookie" - within the bitcoin.conf file to create the .cookie file there so that Bitcoind will run from the default /Home/User/.bitcoin directory but use the /mnt/HDD to store the blocks.

I've tried setting /Home/User/.bitcoin as the --daemon-dir in your suggested argument however this returned the original error, where Electrs appears to look for blocks within /Home/User/.bitcoin instead of /mnt/HDD.

Hope this makes sense, very new to Ubuntu/Linux & setting up a node etc. How to proceed from here?

Thank you in advance!


4  Bitcoin / Electrum / Re: An efficient re-implementation of Electrum Server in Rust on: March 02, 2020, 06:01:22 AM
"Before anyone asks... you use --daemon-dir to specify your custom Bitcoin directory location Wink"

Where do you specify this exactly? I'm an Ubuntu / Linux noob trying to set up Electrum Rust using laptop + external HDD, & have run into a problem I can't seem to solve -

Node is synced to the tip & fully indexed, with blocks & data stored on external HDD, while bitcoin.conf & .cookie files appear in .bitcoin folder in Home directory. However in my first Electrum Rust "usage" ie. index sync ($ cargo run --release -- -vvv --timestamp --db-dir ./db --electrum-rpc-addr="127.0.0.1:50001"), as per the "Usage" section (https://github.com/romanz/electrs/blob/master/doc/usage.md) I get the following error -


"2020-03-02T16:09:42.188+10:30 - INFO - indexing 0 blk*.dat files
2020-03-02T16:09:42.189+10:30 - DEBUG - found 0 indexed blocks
2020-03-02T16:10:03.639+10:30 - DEBUG - applying 619796 new headers from height 0

thread 'bulk_writer' panicked at 'no indexed header found', src/libcore/option.rs:1188:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
thread 'main' panicked at 'writer panicked: Any', src/libcore/result.rs:1188:5"

My data directory is on my external HDD, however it appears Electrs is looking for blocks in the default directory?

Any help would be very much appreciated!





Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!