Question... will electrs download/build its own DB now? I guess yes, but will that be about 20-30% of the bitcoin DB?
Yes, it builds it's own database... my "electrs" dbDir is currently ~56gigs. Note that this in addition to the Bitcoin Core DB (which is currently ~324gigs)... you still need the Bitcoin Core DBs as well!
![Wink](https://bitcointalk.org/Smileys/default/wink.gif)
Also, how about WLS moving it to another PC? is this possible?
Apparently you can... the WSL command (included when you setup WSL within Windows) has an
--export command which will export a specified distro to a "tar" file and an
--import argument that will allow you to then import that distro to another PC...
Arguments to manage Windows Subsystem for Linux:
--export <DistributionName> <FileName>
Exports the distribution to a tar file.
The filename can be - for standard output.
--import <DistributionName> <InstallLocation> <FileName>
Imports the specified tar file as a new distribution.
The filename can be - for standard input.
--list, -l [Options]
Lists distributions.
Options:
--all
List all distributions, including distributions that are currently
being installed or uninstalled.
--running
List only distributions that are currently running.
NOTE: I have not used this, so I've not experience with actually using it. I'd suggest trying Google for more info.
Hi HCP and thank you for the WSL and electrs DB info,
I tried it your way and while everything was going great up to the point I installed all the prerequisites, I hit a wall:
1. I installed WSL, and in it, all that is required by electrs to run using the information here:https://github.com/romanz/electrs/blob/master/doc/usage.md
2. When I issue the line cargo run --release -- -vvv --timestamp --db-dir ./db --electrum-rpc-addr="127.0.0.1:50001" --daemon-dir /mnt/c/Bitcoin while in electrs directory, I get the following output:
chameleon@DESKTOP-GALLM9T:~/electrs$ cargo run --release -- -vvv --timestamp --db-dir ./db --electrum-rpc-addr="127.0.0.1:50001" --daemon-dir /mnt/c/Bitcoin
Finished release [optimized] target(s) in 0.43s
Running `target/release/electrs -vvv --timestamp --db-dir ./db '--electrum-rpc-addr=127.0.0.1:50001' --daemon-dir /mnt/c/Bitcoin`
Config { log: StdErrLog { verbosity: Debug, quiet: false, timestamp: Millisecond, modules: [], writer: "stderr", color_choice: Auto }, network_type: bitcoin, db_path: "./db/mainnet", daemon_dir: "/mnt/c/Bitcoin", daemon_rpc_addr: V4(127.0.0.1:8332), electrum_rpc_addr: V4(127.0.0.1:50001), monitoring_addr: V4(127.0.0.1:4224), jsonrpc_import: false, index_batch_size: 100, bulk_index_threads: 12, tx_cache_size: 10485760, txid_limit: 100, server_banner: "Welcome to electrs 0.8.2 (Electrum Rust Server)!", blocktxids_cache_size: 10485760 }
2020-01-07T23:07:20.650+02:00 - DEBUG - Server listening on 127.0.0.1:4224
2020-01-07T23:07:20.651+02:00 - DEBUG - Running accept thread
2020-01-07T23:07:20.652+02:00 - WARN - failed to connect daemon at 127.0.0.1:8332: Connection refused (os error 111)
2020-01-07T23:07:23.654+02:00 - WARN - failed to connect daemon at 127.0.0.1:8332: Connection refused (os error 111)
3. I tried running my Windows bitcoind with rpcuser & rpcpassword, and also without them in the bitcoin.conf file. What is the line you use to run electrs in your WSL? It feels like it has to do with user & password but I can't get where to change what.
---------- UPDATE ------------
I used --> bitcoind -server=1 -rpcport=8332 when running bitcoind on Windows 10 and now I am getting the following in my WSL :
2020-01-07T23:35:08.723+02:00 - DEBUG - Server listening on 127.0.0.1:4224
2020-01-07T23:35:08.724+02:00 - DEBUG - Running accept thread
2020-01-07T23:35:08.726+02:00 - INFO - NetworkInfo { version: 190001, subversion: "/Satoshi:0.19.0.1/" }
2020-01-07T23:35:08.727+02:00 - INFO - BlockchainInfo { chain: "main", blocks: 611791, headers: 611791, bestblockhash: "00000000000000000003404e2461a0d394d207cf74739519907d6d623bb6e5ad", pruned: false, initialblockdownload: false }
2020-01-07T23:35:08.729+02:00 - DEBUG - opening DB at "./db/mainnet"
2020-01-07T23:35:08.763+02:00 - INFO - listing block files at "/mnt/c/Bitcoin/blocks/blk*.dat"
2020-01-07T23:35:08.782+02:00 - INFO - indexing 1923 blk*.dat files
2020-01-07T23:35:08.782+02:00 - DEBUG - found 0 indexed blocks
2020-01-07T23:35:45.821+02:00 - DEBUG - applying 611792 new headers from height 0
I guess this is what should happen? I will give it time to see how it goes and report back.