Pages:
Author

Topic: Running bitcoin node with LN hub on a Raspberry Pi 3 - page 2. (Read 825 times)

hero member
Activity: 1442
Merit: 629
Vires in Numeris
...
Now I'm having issues with starting the LND, if I manage to start it (asking for wallet password), I'll post it here.
Code:
2018-03-30 22:16:18.654 [INF] LTND: Waiting for wallet encryption password. Use `lncli create` to create wallet, or `lncli unlock` to unlock already created wallet.

did you run lncli create/unlock without errors?
No, it gave me some error, but I've managed to skip this with using the --noencryptwallet flag when starting lnd. It opens the wallet and lnd continues to start. (This leaves the wallet.dat unencrypted, but for testing purposes for the first start it's fine for me.)
Now I'm waiting for lnd to find some proper nodes, but it's struggling to find any. Maybe it's because of the beta upgrade, nodes needs to upgrade before they will be able to serve neutrino type nodes, so I'm trying to start it periodically, and also checking github, e.g.:
https://github.com/lightninglabs/lightning-app/issues/26
full member
Activity: 270
Merit: 101
Because of the new beta version of LND, I've deleted the previously installed LND and BTCD from the PI and started from scratch. I would like to start a neutrino version of the LND, so according to my current understanding, BTCD is not necessary at all, but I'm not 100% sure yet. This can change in the future as I move forward with testing this thing.

Hint: if you want to start to risk your coins on the main net, you should modify the config.go file in the src directory:
Code:
if cfg.Bitcoin.Node == "neutrino" && cfg.Bitcoin.MainNet {
str := "%s: neutrino isn't yet supported for " +
"bitcoin's mainnet"
err := fmt.Errorf(str, funcName)
return nil, err
}
If you comment these lines out (you put // at the beginning of the line) you won't have an error message  (and won't stop you) when you want to start your lnd client in neutrino mode on the mainnet.

After saving the config.go file, I have installed the new LND again (the process is the same as above, it just installs the new version).

Now I'm having issues with starting the LND, if I manage to start it (asking for wallet password), I'll post it here.
Code:
2018-03-30 22:16:18.654 [INF] LTND: Waiting for wallet encryption password. Use `lncli create` to create wallet, or `lncli unlock` to unlock already created wallet.

did you run lncli create/unlock without errors?
hero member
Activity: 1442
Merit: 629
Vires in Numeris
Because of the new beta version of LND, I've deleted the previously installed LND and BTCD from the PI and started from scratch. I would like to start a neutrino version of the LND, so according to my current understanding, BTCD is not necessary at all, but I'm not 100% sure yet. This can change in the future as I move forward with testing this thing.

Hint: if you want to start to risk your coins on the main net, you should modify the config.go file in the src directory:
Code:
if cfg.Bitcoin.Node == "neutrino" && cfg.Bitcoin.MainNet {
str := "%s: neutrino isn't yet supported for " +
"bitcoin's mainnet"
err := fmt.Errorf(str, funcName)
return nil, err
}
If you comment these lines out (you put // at the beginning of the line) you won't have an error message  (and won't stop you) when you want to start your lnd client in neutrino mode on the mainnet.

After saving the config.go file, I have installed the new LND again (the process is the same as above, it just installs the new version).

Now I'm having issues with starting the LND, if I manage to start it (asking for wallet password), I'll post it here.
Code:
2018-03-30 22:16:18.654 [INF] LTND: Waiting for wallet encryption password. Use `lncli create` to create wallet, or `lncli unlock` to unlock already created wallet.
full member
Activity: 270
Merit: 101
I'm running lightningd instead of lnd but my configuration is very similar: rasperry pi 3 + external HDD for full blockchain. Everything works fine so far.

Could you tell me what is the CPU and RAM usage when everything you need to run a full node is turned on? Can you still use the device for browsing the Internet while everything is running in the background? I was thinking of buying the latest Raspberry Pi 3B+ but I would to know more before doing so. I don't really need a full node since I use a hardware wallet but I would like to support Bitcoin network and try running a Lightning Network node on the mainnet.



I'm running my raspberry in CLI mode and using it only as btc/ln node so I didn't try to browse the internet.
legendary
Activity: 1876
Merit: 3132
I'm running lightningd instead of lnd but my configuration is very similar: rasperry pi 3 + external HDD for full blockchain. Everything works fine so far.

Could you tell me what is the CPU and RAM usage when everything you need to run a full node is turned on? Can you still use the device for browsing the Internet while everything is running in the background? I was thinking of buying the latest Raspberry Pi 3B+ but I would to know more before doing so. I don't really need a full node since I use a hardware wallet but I would like to support Bitcoin network and try running a Lightning Network node on the mainnet.
full member
Activity: 270
Merit: 101
Does it have to be a full node?
No, my idea is to have a so called neutrino version of the lnd. This means that it only takes 200-300 MegaBytes, because it's a kind of pruned node, so it doesn't download and keep the whole blockchain on site (and does not use 200-400 GigaBytes like a full node) but it connects to some full nodes on the network.
For testing purposes, it's fine for me, if I'll take it more seriously in the future, I just attach a USB external drive with a 500Gb HDD and it can act as a full node with the full blockchain on the HDD.


I'm running lightningd instead of lnd but my configuration is very similar: rasperry pi 3 + external HDD for full blockchain. Everything works fine so far.
hero member
Activity: 1442
Merit: 629
Vires in Numeris
Does it have to be a full node?
No, my idea is to have a so called neutrino version of the lnd. This means that it only takes 200-300 MegaBytes, because it's a kind of pruned node, so it doesn't download and keep the whole blockchain on site (and does not use 200-400 GigaBytes like a full node) but it connects to some full nodes on the network.
For testing purposes, it's fine for me, if I'll take it more seriously in the future, I just attach a USB external drive with a 500Gb HDD and it can act as a full node with the full blockchain on the HDD.
full member
Activity: 347
Merit: 109
Does it have to be a full node?
hero member
Activity: 1442
Merit: 629
Vires in Numeris
The Lightning network has moved to beta, so now it's possible to officially do testing on the mainnet. Until now, most of the mainnet testing was done without support from the developers, I hope that from now on the support will help the testers.
In connection with the thread, we need to upgrade the lnd because the changes compared to the previous version are not backward compatible because of the new beta version.
hero member
Activity: 1442
Merit: 629
Vires in Numeris
Briefing the last steps I've just managed to take:
using this website:
http://dev.lightning.community/guides/installation/
I've managed to install lnd and btcd (roasbeef's edition)
Installing lnd:
Using the few commands on the website, the lnd installation was successfull (be aware that the testing of the installation took ~30 minutes, just take this into consideration if you're in a hurry while installing)
Installing btcd
It was also really simple, using the command on the above mentioned websites.

Next steps:
Starting the installed things, especially figuring out how to create a wallet on the PI, stay tuned Smiley
hero member
Activity: 1442
Merit: 629
Vires in Numeris
Thanks bob123, the direct download worked at the end:

So I've just managed to install the necessary GO languange on the Raspberry PI, using these guides (had to combine them to get it to work, but at last it works...)
https://tecadmin.net/install-go-on-debian/#
https://stackoverflow.com/questions/48348262/install-go-golang-on-raspbian

To make it easier for you, here are the steps:
1)
Code:
sudo apt-get update
sudo apt-get -y upgrade
2)
Code:
wget https://dl.google.com/go/go1.10.linux-armv6l.tar.gz

make sure you download the arm version for the Raspberry

3)
install an old version of GO

Code:
sudo apt-get install golang

this will install the 1.7 version, which is not good for us yet

4)
Uncompress the previously downloaded 1.10 version into your (pi) home directory

Code:
sudo tar -C /home/pi -xzf go1.10.linux-armv6l.tar.gz

5)
remove the old golang installation

Code:
sudo apt remove golang

remove the other unnecessary stuff after removing the old golang

Code:
sudo apt-get autoremove

6)
edit your .profile
insert these lines to let the system found your go language installation

Code:
export GOROOT=/home/pi/go
export GOPATH=$HOME/projects
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH

7)
log out and log in again
check the version and the environment of your installed GO, should look like this:

Code:
go version
go version go1.10 linux/arm

Code:
go env
GOARCH="arm"
GOBIN=""
GOCACHE="/home/pi/.cache/go-build"
GOEXE=""
GOHOSTARCH="arm"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/pi/projects"
GORACE=""
GOROOT="/home/pi/go"
GOTMPDIR=""
GOTOOLDIR="/home/pi/go/pkg/tool/linux_arm"
GCCGO="gccgo"
GOARM="6"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -marm -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-b                                                                                                 uild470418061=/tmp/go-build -gno-record-gcc-switches"

That's all Smiley

Now moving towards to lnd installation...

Just another tip:
If you're on a fresh installation of Raspbian, you won't have the 'git' to use the golang's built-in downloader part, to be able to install Glide, which is also necessary.
So to get this command working:

Code:
go get -u github.com/Masterminds/glide

you will need this:

Code:
sudo apt-get install git

After this, you can start downloading Glide with the above mentioned command
When it's done, you'll find Glide in the GOPATH/bin
legendary
Activity: 1624
Merit: 2481
Code:
sudo apt-get install golang-1.10-go
I had an error message:
Code:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package golang-1.10-go
E: Couldn't find any package by glob 'golang-1.10-go'
E: Couldn't find any package by regex 'golang-1.10-go'
So I read a bit, and found that for the raspberry linux, we only have go 1.8 available, which is OK for lnd, because 1.8 is the minimal required version of GO.
So I was about to install the 1.8 GO but no success:
Code:
sudo apt-get install golang-1.8-go
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package golang-1.8-go is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'golang-1.8-go' has no installation candidate


You might try to add this repository and install 1.8 or 1.9:

Code:
$ sudo add-apt-repository ppa:gophers/archive
$ sudo apt-get update
$ sudo apt-get install golang-1.9-go

If apt-get won't find your desired version you might consider downloading it directly from https://golang.org/dl/
hero member
Activity: 1442
Merit: 629
Vires in Numeris
Next status update:
I've just managed to set up the Raspberry PI 3 with a working minimal OS, but nothing installed which is connected with bitcoin.
Now I've decided to run a neutrino lightweight node to let the lnd connect to it because it doesn't require a full node running locally.
So I was about to install the lnd on the raspberry but failed with the GO language, which is a must to have lnd installed.
I was following this guide:
https://github.com/lightningnetwork/lnd/blob/master/docs/INSTALL.md
When I started to intall GO:
Code:
sudo apt-get install golang-1.10-go
I had an error message:
Code:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package golang-1.10-go
E: Couldn't find any package by glob 'golang-1.10-go'
E: Couldn't find any package by regex 'golang-1.10-go'
So I read a bit, and found that for the raspberry linux, we only have go 1.8 available, which is OK for lnd, because 1.8 is the minimal required version of GO.
So I was about to install the 1.8 GO but no success:
Code:
sudo apt-get install golang-1.8-go
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package golang-1.8-go is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'golang-1.8-go' has no installation candidate
So now I'm searching for a workaround to be able to install GO on the raspberry to be able to continue the installation of lnd...

hero member
Activity: 1442
Merit: 629
Vires in Numeris
Status update:
I've received the Raspberry PI, I've managed to set it up, so it's working, but there's nothing installed yet in connection with bitcoin. I've used this install guide, it was really straightforward and was easy to follow.
https://medium.com/@stadicus/noobs-guide-to-️-lightning️-on-a-raspberry-pi-f0ab7525586e
What I'm reading now is a so called neutrino light client which is not a full node but something like a pruned one without the full blockchain, it connects to other nodes to gather the necessary information about blockchain. If I use this, the 16Gb SD card in the Raspberry PI will be enough to run a bitcoin node with LN hub installed. (I understand that running a full node will be necessary in the future, but now I would like to test only, so it's enough for that purpose.)
hero member
Activity: 1442
Merit: 629
Vires in Numeris
Thanks, I haven't found this one yet.
I have read it thru quickly, it uses the eclair version of lightning hub, the one I put it into the OP was referring to lnd which is a different build, according to my understanding, they are totally different.
I'll search for the differences, surely there's somewhere a comparison about the different LN nodes (there's 3 kind of LN nodes as I saw somewhere).
hero member
Activity: 1442
Merit: 629
Vires in Numeris
Hi experts,
I don't know if this is the right place to ask, but I'd like to start to play with Lightning network, but want to start small.
I've found this https://github.com/lightningnetwork/lnd/blob/master/docs/INSTALL.md on github, and I've made my first step, I've ordered the Raspberry Pi 3B.
I've found some threads about Raspberry Pi but it's usually about running some nodes (bitcoin, other alts) on PI but not about LN.
Do you have any experience with the LN node on the PI?
I'm not afraid of linux or anything, just wanted to ask in advance before the PI arrives, what to download, where to search for some info (I can use google, but this is something specific.)
Thanks in advance!
Pages:
Jump to: