Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: Peloponnesian on April 24, 2019, 05:11:46 AM



Title: Lightning Node Help
Post by: Peloponnesian on April 24, 2019, 05:11:46 AM
Hello,

I am trying to sync up a lightning node (as per https://medium.com/lightning-power-users/windows-macos-lightning-network-284bd5034340 (https://medium.com/lightning-power-users/windows-macos-lightning-network-284bd5034340)) but not sure I have the hardware that will allow it to work.

I found this computer in a dumpster, rebuilt it, and added a few parts. It's running an old xeon processor (2.67 GHz), 12 GB of DDR3 RAM, an 80GB SSD, 500GB HDD (64MB Cache). My internet is 100 up/down.

I've been syncing for about 24 hours at this point and the ETA shows 12 hours remaining, with 77.48% done. It seems to have slowed down significantly in the past few hours. I just replaced the HDD last night (realized during previous sync attempt it was done for).

Has anyone gone through this process before with a similar (garbage) PC? Also trying to get Lightning Labs new desktop wallet up and running on my laptop. Very into this stuff. Any insight is appreciated.

Thanks.


Title: Re: Lightning Node Help
Post by: Pmalek on April 24, 2019, 08:18:42 AM
I do remember reading somewhere that a dual core processor (or better) is recommended - no idea where I read it though. You need a minimum of 2GB of RAM and probably around 300 GB of free disk space for all the downloads.


Title: Re: Lightning Node Help
Post by: Rath_ on April 24, 2019, 08:28:14 AM
It seems to have slowed down significantly in the past few hours. I just replaced the HDD last night (realized during previous sync attempt it was done for).

There is nothing to worry about. The synchronization always slows down when it gets closer to 100%. In my case, it took 3 days even though my CPU is not bad and I have a decent Internet connection (250mbp/s).

Has anyone gone through this process before with a similar (garbage) PC?

I helped @Zand_ with setting up his Bitcoin and Lightning Network nodes on a Raspberry Pi which is inferior to your PC. If you need any help with LND, feel free to post your questions in this section. I will try to answer them.


Title: Re: Lightning Node Help
Post by: lijian2019 on April 24, 2019, 10:01:53 AM
Trying lightning contacts I think ordinary computers will meet the update synchronization conditions. I found some old hardware to assemble a CPU (Intel) Intel (R) Core (TM) i5-3470 CPU @ 3.20 GHz.

CPU core number 4, CPU default frequency 3200 Mhz, ASUS B75M-A motherboard, memory 8GB, 500G SSD solid-state SSD hard disk, Internet 100 or so, SSD hard disk solid-state like this thing. I appreciate the pressure-free speed of reading and writing.


Title: Re: Lightning Node Help
Post by: Carlton Banks on April 24, 2019, 12:25:54 PM
1. set dbcache to 6 or 8 GB (assuming you're running your OS directly, not in a VM. reduce that if you're using a VM)
2. set blocksdir to a directory on your HDD
3. set datadir to a directory on your SDD

put a text file bitcoin.conf in datadir, put those settings as lines in bitcoin.conf (default datadir is different depending on OS)

that will speed up the syncing


Title: Re: Lightning Node Help
Post by: Peloponnesian on April 24, 2019, 01:56:07 PM
1. set dbcache to 6 or 8 GB (assuming you're running your OS directly, not in a VM. reduce that if you're using a VM)
2. set blocksdir to a directory on your HDD
3. set datadir to a directory on your SDD

put a text file bitcoin.conf in datadir, put those settings as lines in bitcoin.conf (default datadir is different depending on OS)

that will speed up the syncing


Thanks guys. ^ Do I do this through the Bitcoin Console? apologies... very new to this.


Title: Re: Lightning Node Help
Post by: Rath_ on April 24, 2019, 04:00:22 PM
Thanks guys. ^ Do I do this through the Bitcoin Console? apologies... very new to this.

If you are running a Linux based OS then it will be fairly easily. Add the following lines to the command which launches Bitcoin Core.

-datadir=<SSD> -dbcache=<megabytes>

Changing blocks directory is a little bit more tricky. Keep chainstate folder on the HDD and move the other data folders to your SSD. While being in the data directory on the SSD, run ln -s /path/to/chainstate


Title: Re: Lightning Node Help
Post by: Peloponnesian on April 24, 2019, 04:03:12 PM
And if running Windows?


Title: Re: Lightning Node Help
Post by: Rath_ on April 24, 2019, 04:19:12 PM
And if running Windows?

Right-click your Bitcoin Core shortcut and select Properties. Add the lines which I wrote in my previous post after bitcoin-qt.exe. Make sure that there is space between .exe and dash. I have no idea how to link chainstate, though. I am not sure if a normal folder shortcut will do the trick.


Title: Re: Lightning Node Help
Post by: ABCbits on April 24, 2019, 05:27:23 PM
I have no idea how to link chainstate, though. I am not sure if a normal folder shortcut will do the trick.

On windows, you can use mklink command. Example

Code:
mklink /D <source> <destination>
Code:
mklink /D d:\current\bitcoin\directory\chainstate c:\path\to\chainstate

There's extensive guide to split Bitcoin Core file at https://en.bitcoin.it/wiki/Splitting_the_data_directory (https://en.bitcoin.it/wiki/Splitting_the_data_directory)


Title: Re: Lightning Node Help
Post by: Peloponnesian on April 25, 2019, 05:52:05 AM
Thanks for the help guys. At 97.45% - hopefully it finishes tonight.

Look forward to learning lots on this forum!


Title: Re: Lightning Node Help
Post by: Carlton Banks on April 25, 2019, 07:30:48 AM
-datadir=<SSD> -dbcache=<megabytes>

Changing blocks directory is a little bit more tricky. Keep chainstate folder on the HDD and move the other data folders to your SSD. While being in the data directory on the SSD, run ln -s /path/to/chainstate

no no no

the other way round!

chainstate (i.e. datadir) goes on your small + fast disk (SSD)
blocks goes on your large + slow disk (mechanical HDD)


chainstate is the UTXO set, which is changing very rapidly during sync. An SSD does that job much better than a mechanical disk


Title: Re: Lightning Node Help
Post by: Peloponnesian on April 25, 2019, 08:34:43 PM
So, woke up this morning to 100% synced, but the little dot on the BTC symbol was still red. The console said “out of memory”.  I closed the program and re-opened, and it has been re-syncing ever since. Now back to 90% or so with 5 hrs left :(

What is supposed to happen when it’s done? I thought that the little dot should have turned green? Once that happened I was going to install the Jewel chrome plugin and continue the instructions from the medium post.

Any thoughts/help appreciated.


Title: Re: Lightning Node Help
Post by: Peloponnesian on April 26, 2019, 03:39:36 PM
SUCCESS! Thanks everyone here for your help. If I need to close this thread or mark it in some way let me know. Here’s what I did if anyone else runs into this problem:

1.) Closed Node Launcher (was showing 100% synced but didn’t have little green dot beside BTC in tray)
2.) Installed BItcoin core and let it sync overnight (was done the next morning)
3.) Closed Bitcoin core and opened the Node Launcher
4.) Synced in about half hour, and got little green dot next to BTC in tray

Now in the process of setting up the node and opening some channels. Woo!


Title: Re: Lightning Node Help
Post by: Carlton Banks on April 27, 2019, 08:40:17 AM
1.) Closed Node Launcher (was showing 100% synced but didn’t have little green dot beside BTC in tray)
...
3.) Closed Bitcoin core and opened the Node Launcher

what's node launcher ? ???


Title: Re: Lightning Node Help
Post by: Peloponnesian on April 27, 2019, 06:42:51 PM
https://github.com/lightning-power-users/node-launcher/releases (https://github.com/lightning-power-users/node-launcher/releases)

Not sure what i'm supposed to be calling it haha. I guess really it's just bitcoin core that i'm opening? with an attachment of some sort for lightning?


Title: Re: Lightning Node Help
Post by: Rath_ on April 27, 2019, 07:04:46 PM
Not sure what i'm supposed to be calling it haha. I guess really it's just bitcoin core that i'm opening? with an attachment of some sort for lightning?

Yeah. This app is said to make it easier to deploy Bitcoin Core and LND (Lightning Network node software). I would prefer do it on my own rather than use such software (even if it's open-source).