Pages:
Author

Topic: Electrum server on Windows: Fulcrum - page 3. (Read 1073 times)

legendary
Activity: 3668
Merit: 6382
Looking for campaign manager? Contact icopress!
April 28, 2023, 09:03:24 AM
#8
Hello! I just started syncing the data. I am just wondering, what am I syncing actually? What does my electrum server need to download?

Bitcoin Core downloads/synchronizes the blockchain. You'll need half a terra for that nowadays, btw.
The Electrum Server will get Bitcoin Core's data and creates a database on top of that for easy retrieval of various things your wallet or a block explorer (!) would need.
Depending on how it uses the data, I guess that an Electrum server can also survive without txindex (just the sync could be slower), depending on what data it gets from Bitcoin Core and what it stores.

ok, so I guess that's why I need txindex=1 in bitcoin core conf file

Well, Fulcrum specifically asks for txindex to be 1.
hero member
Activity: 560
Merit: 1060
April 26, 2023, 06:23:19 AM
#7
Hello! I just started syncing the data. I am just wondering, what am I syncing actually?

I don't read Fulcrum source code, but syncing (on Electrum server) usually involve obtaining blockchain data and create database which contain various index to speed up many things (such as retrieve TX from specific Bitcoin address).

What does my electrum server need to download?

Whole Bitcoin blockchain and node mempool (to show unconfirmed transaction to Electrum wallet).

ok, so I guess that's why I need txindex=1 in bitcoin core conf file
hero member
Activity: 560
Merit: 1060
April 26, 2023, 02:21:27 AM
#6
Hello! I just started syncing the data. I am just wondering, what am I syncing actually? What does my electrum server need to download?
legendary
Activity: 1232
Merit: 1080
February 28, 2023, 04:35:09 PM
#5
Syncing will always use more disk usage and ram and I think that is good performance for a program on Windows. It would be nice to compare it with Electrum running on the Linux sub system and see if it uses more or less. I think it could be more efficient because it does not have the Linux sub system running in the background too.
legendary
Activity: 3668
Merit: 6382
Looking for campaign manager? Contact icopress!
February 28, 2023, 02:29:18 PM
#4
Thanks for the guide (even though i rarely use Windows). Did you check how much does Fulctrum use? Fulctrum GitHub page said it has minimum 1GB RAM, so i wonder if it actually use 1GB or less.

Thank you for the kind words.
I've fired it up and I have the numbers while syncing (blocks from about half a day) - first image and from when it was quiet - second image.
The data is from both Task Manager and Process Explorer.





As you see while syncing it goes up to 1GB, but when it's cool it's much lower.
Also I'd add that I have in config

Code:
db_max_open_files = 80

which is higher than the default and may have as result some more memory allocated, but honestly I didn't read much into the docs and I may be wrong with the implications.
However, at some point at startup it was showing:

Code:
DB memory: 512.00 MiB
legendary
Activity: 3668
Merit: 6382
Looking for campaign manager? Contact icopress!
February 28, 2023, 05:35:53 AM
#3
I recommend including the asc text in the OP because if github has been compromised and the asc has been changed for the latest release people can verify with this guide whether it has been changed or not. I think it is just a extra step in security and it might be a pain for you to keep updating it with every new release but it will add another layer of trust.

I am not the developer of Fulcrum, I'm just an user. I would get the same asc file as you'd do. And if I'd put the content of the asc file into OP I'd have to update it with each new update of Fulcrum, which is not something I would want to do.
So, as I said in OP, the user will look for the asc with the same name as the zip he's about to download/use. For Fulcrum-1.9.0-win64.zip it would be Fulcrum-1.9.0-win64.zip.asc.
sr. member
Activity: 467
Merit: 578
February 27, 2023, 07:19:23 PM
#2
I recommend including the asc text in the OP because if github has been compromised and the asc has been changed for the latest release people can verify with this guide whether it has been changed or not. I think it is just a extra step in security and it might be a pain for you to keep updating it with every new release but it will add another layer of trust.
legendary
Activity: 3668
Merit: 6382
Looking for campaign manager? Contact icopress!
February 27, 2023, 03:29:36 PM
#1
If one wants to have an Electrum server, one of the options is Fulcrum.

I already have an Electrum server (Electrs), which I use and for which I've made a more complete tutorial in the past, but at some point I've made tests with Fulcrum too and it would be a shame to remove it without providing a tutorial for the others who want it.

So... one major advantage of Fulcrum comes on Windows: the user can just get compiled binaries for Bitcoin Core, Fulcrum and Electrum, configure and run them all, without the need of stepping into Windows Subsystem for Linux (WSL). Another good thing is it's performance: it's processing the requests significantly faster than Electrs. Just in my experience (HDD, infrequent use for rather short tasks) Fulcrum gets in the state I can access it significantly slower than Electrs.

But, tbh, I don't like Fulcrum as much as the other option I have (Electrs)
* Fulcrum is made by somebody with BCH ties and it may be much better optimized for BCH (to say the least)
* As I said, Fulcrum starts/syncs slower than Electrs and that's not OK for my use case

Something more about this tutorial. This is made for a Fulcrum as I use it: me, for myself. No discussions with other servers, not announcing my server, also no SSL. I've kept it simple. If one wants to expand the tutorial with that, be my guest.

Since an Electrum server works on top of a Bitcoin Core node, I'll handle Bitcoin Core first, but shortly.

Bitcoin Core is with pretty much the same as in my other tutorial, but with some tiny bit of change in config:
* already in that topic, later on, I've switched for use with rpc user and password instead of cookie. If you want to keep using cookie, that's fine too, just pay attention to the config files (both of them)
* Bitcoin core's config needs one more line: zmqpubhashblock=tcp://127.0.0.1:8433

So, I will not insist with Bitcoin Core, it's in the other tutorial, I'll just put here my config:
Code: (bitcoin.conf)
txindex=1
server=1
rpcbind=127.0.0.1
rpcallow=127.0.0.1
rpcallowip=127.0.0.1
rpcuser=UsErNaMe
rpcpassword=PaSsWoRd
zmqpubhashblock=tcp://127.0.0.1:8433

Fulcrum (https://github.com/cculianu/Fulcrum)

You download Fulcrum from https://github.com/cculianu/Fulcrum/releases ; you will get something like Fulcrum-1.9.0-win64.zip
It would be nice to verify your download, which is done with the correcponding *.asc file, like for Electrum.

Unpack the zip into a new folder, maybe FulcrumBinaries. We won't touch that folder from now on.
Now we create a file called Fulcrum.conf with the content:
Code: (Fulcrum.conf)
datadir = x:\FulcrumData_MainNet
bitcoind = 127.0.0.1:8332
rpcuser = UsErNaMe
rpcpassword = PaSsWoRd
tcp = 127.0.0.1:50001
peering = false
announce = false
public_tcp_port = 50001
admin = 8000
stats = 8080
db_max_open_files = 80
fast-sync = 8000

Some details:
* The username and password has to match with the one from Bitcoin
* x:\FulcrumData_MainNet is a folder you create, preferably somewhere fast (SSD), since this is where Fulcrum will keep its data; mine has now ~113 GB, but it may be safe to have some more space there, especially at start
* that fast-sync line should be commented (put a # in front of it) after the initial sync finishes
* the server is set to not discuss with other servers, not announce itself for other clients and so on; also no SSL

I've made a batch file for start and one for stop, but this stop works only after the sync is done. Else you better press the good old CRTL-C.
The content of the batch file is not very useful as it is, maybe as example, because it contains the path to the exe and, as parameter, the path to the config.
In my case it's:
Code: (start.bat)
"x:\Fulcrum\FulcrumBinaries\Fulcrum.exe" x:\Fulcrum\Fulcrum.conf

Same goes for the stop.
Code: (stop.bat)
"x:\Fulcrum\FulcrumBinaries\FulcrumAdmin" -p 8000 stop

After starting Fulcrum (start.bat) it might take an awful lot of time until everything is sync-ed. You may want to look for lines like:
Code:
[2023-02-27 21:42:48.964] Starting listener service for TcpSrv 127.0.0.1:50001 ...
[2023-02-27 21:42:48.965] Service started, listening for connections on 127.0.0.1:50001

or

Code:
[2023-02-27 22:03:32.758]  Block height 778553, up-to-date

Then you can start Electrum. As I wrote in the other tutorial I'm lazy and I'm using the portable Electrum. For me the command line is:
Code:
electrum-4.3.4-portable.exe --oneserver --server 127.0.0.1:50001:t
Pages:
Jump to: