Tips for Verified Raspberry Pi Nodes

The newspaper buys you unique proof of ownership at a certain date (and the latest news :D). Many online marketplaces use this mechanism. It also reduces the chance of fake photos. Anyone can make-up a serial number or smartly edit that into a photo.

And not everyone has their own a IP address (including myself).

Motto sounds good. Or go with the more mysterious Peercoin’s Pi.

Not sure about Muto’s ‘grumbles’. For non-technical people it would be a nice bonus to have e.g. a browser. From a security perspective it might be better to have a very lean version though. Some competing demands here.

[quote=“NewMoneyEra, post:20, topic:2152”]How about a motto: [size=14pt]“Spreading Peercoin on Pi”[/size]

:slight_smile: :slight_smile: :slight_smile:

comments?[/quote]

Please, spread some Peercoin on my pie! ;D

[quote=“Sentinelrv, post:22, topic:2152”][quote=“NewMoneyEra, post:20, topic:2152”]How about a motto: [size=14pt]“Spreading Peercoin on Pi”[/size]

:slight_smile: :slight_smile: :slight_smile:

comments?[/quote]

Please, spread some Peercoin on my pie! ;D

[/quote]

Hahaha!! :slight_smile: YUMMMM!!! :wink:

I’ll run a few when it’s available

Firstly I want to say that I like the idea. I like the combination of Peercoin and RPI :slight_smile:
This is for sure one of the unique features of Peercoin - to be run on a RPI without the need for a veeeery large SD card (and to be run in minting mode on such a low power device, but I’ll get to that later).

Secondly, I think I don’t fully understand the intention.

Is it about running a RPI node with Peercoin to raise the number of running nodes
or is it about running a RPI node with a wallet to raise the number of minting nodes?

[b]If the intention is merely to raise the number of nodes a standard OS image with a Peercoin client seems to be sufficient as I don’t see special security requirements.

If you want to achieve a higher number of conveniently minting nodes, a slim OS running only the absolutely necessary services, being frequently updated etc. is for sure required and which I consider beyond the scope.[/b]

So I doubt that the later can be achieved with this initiative. People who have the skills and the desire to do that (install and run a minting RPI node), will most likely already have such a RPI with a minting wallet. And people who are neither close to linux nor RPI will most likely not be convinced of doing something they do not understand for 10 PPC (and we should imho not try to get them there as well!).

So I guess the direction should be to get more nodes online. That is not as great for the network compared to more minting nodes online. But as the network security due to minting is more relying on the number of Peercoins that are minting than on the number of nodes, I think this is ok.
More RPI nodes online might be a first step. Maybe some people get aware of that idea or are even really interested in it and start going from there on their own! Sometimes it’s enough to get a start :wink:
The installation guide can quite easily be made as it mainly consists of getting an operating system on the RPI (for which are loads of tutorials available) and downloading and compiling the Peercoin client (which depends on the system you installed; at least I’m not aware of trustworthy repositories that contain precompiled installation files - maybe that has changed since I last tried…).
Maybe it is a good idea to provide the people with an example installation (e.g. Raspbian + Peercoin).
I can write such a tutorial next week if that is not too late.

Great idea.

Actually, I have one RPi and one CubieTruck running for Peercoin. I have compiled peercoin V0.3 for RPi from scratch, which is actually very simple. My RPi node has been running several weeks for PoS minting without any interruption. The CubieTruck is a little powerful, and it has 2GB memory, which is used for my Peercoin stake explorer (http://stakexplorer.com) test at home.

Peercoin Minting with Raspberry Pi at home!

Enjoy it.

u/pitanga on reddit wrote the following comments. Thoughts?

Wouldn't it make a lot more sense for people to rent a VPS at Digital Ocean and then run a full node on that? The cost is only $60/year, about the cost of an RPi once you include a case, memory card and power supply. The advantage of using a VPS is that you have a lot more bandwidth and don't have to deal with forwarding ports, which will be an issue for people at home, since most are behind a NAT. See the discussion started by Gavin Andersen's comment here: http://www.reddit.com/r/Bitcoin/comments/1scd4z/im_running_a_full_node_and_so_should_you/cdw3lrh
These are all good points if you are using a RaspberryPi to 'mint' (solve PoS blocks). I don't agree with you if the goal is to get people to improve the overall health of Peercoin's network by them to run full nodes. I assume more full nodes is the goal here since people already get rewards for minting and there is no reason to also tip them.

With that in mind:

“You can do more with a Raspberry Pi. Browse the web, view videos etc.”

The RPi does not have enough memory or processing power to do these things and serve as a node at the same time. In fact, you will want to use raspi-config to reduce the amount of memory reserved by the gpu or the daemon will swap out to disk, greatly reducing the life of your SD card. This has been my personal experience with running ppcoind on RPi.

“It should last longer then a year”

Yes, and it’s fun to play with :slight_smile: I bought the camera module for one of mine and built a motion capture camera. You will probably need to replace the memory card at least once a year, though.

“We have an image running a full node on Raspberry Pi.”

For security reasons, I think it’s better to encourage people to use a stock Raspian image and then build ppcoind from source. This is not a difficult process on the Pi, it’s just issuing 3-4 commands in the terminal.

“It is just more fun to mint at home than on a nameless server somewhere else”

For security reasons I would not encourage anyone to have a hot wallet on a full node.

“And never had a problem with forwarding ports, Peercoin client works out of the box behind NAT.”

I’m just curious, with port 9901 open? and with more than 8 connections? I have to configure my NAT to forward that port. I think many other users will need to do that. Many home users are also on connections with limited bandwidth or bandwidth caps.

The following quote from Gavin Andresen also applies to Peercoin modulo the need to also have people solving PoS blocks.
“Most ordinary folks should NOT be running a full node. We need full nodes that are always on, have more than 8 connections (if you have only 8 then you are part of the problem, not part of the solution), and have a high-bandwidth connection to the Internet.”

I don’t want to discourage people from using an RPi to run a node, it’s good if more people get their hands dirty and play around with the RPi and ppcoind. The point I’m trying to make here is that it is better for the network if people rent a VPS and run ppcoind there instead of on a Pi.

Here’s the link to the discussion: Reddit - Dive into anything

[quote=“Jimmy, post:26, topic:2152”]Great idea.

Actually, I have one RPi and one CubieTruck running for Peercoin. I have compiled peercoin V0.3 for RPi from scratch, which is actually very simple. My RPi node has been running several weeks for PoS minting without any interruption. The CubieTruck is a little powerful, and it has 2GB memory, which is used for my Peercoin stake explorer (http://stakexplorer.com) test at home.

Peercoin Minting with Raspberry Pi at home!

Enjoy it.

[/quote]

Awesome! And the http://stakexplorer.com.

There is already a guide for using Peercoin on a RPI:

And even better, the author announced to update the guide once Peercoin 0.4 is out and change the guide to one with official downloads/sources instead of a self created OS image:

Yes, that is a good starting point. In my opinion we should provide a image for a simple node. Beside that we should provide a guide to self compile a light weight node for POS minting. We have someone for the first part. Who is able to do the second part?

Posted using Tapatalk for Android.

river: my thoughts on running a node on a VPS, sure it works fine, but I wouldn’t trust it with large amounts, say for minting, so as long you’re not minting, VPS is probably better

btw, maybe an idea to check raspberry pie nodes: it is possible to get the addresses from your wallet, scripted/automatically, through commandline, if the tip bot detects it is the same address as you signed up with, it should measure somehow the time that wallet is online, and only pay after it has showed to be enough online , something like that?

[quote=“MUTO, post:30, topic:2152”]Yes, that is a good starting point. In my opinion we should provide a image for a simple node. Beside that we should provide a guide to self compile a light weight node for POS minting. We have someone for the first part. Who is able to do the second part?

Posted using Tapatalk for Android.[/quote]
I’m not sure why anyone should run a simple node (without minting capability) unless you have a passion for Peercoin. There are quiet a few who have that but it is still a minority of users.
Instead I think we need a RPI node with the minting which is an incentive for users to buy Peercoins. A guide to self-compile is great, but most of us won’t go there. We should make this as simple as the installation of the wallet on a PC or even simpler.

I think trusted binaries with full RPI node for minting compiled by trusted members of the community should be made available here on peercointalk or the website (with checksum). Just like the binaries of the wallets. The provided binary can be relatively easy unpacked to the SD card which goes straight into the Raspberry Pi. If that is possible, I think we should do that.

It would address the issue of many people who don’t have a PC anymore, only a mobile or tablet, which can’t be used for minting (at least not today). The Raspberry Pi can be made plug and play for them for under US$100 (depending on box, sd card etc.) and we have another group of happy Peercoiners contributing to the network (and minting). I would be one of them.

Just my thoughts.

[quote=“masterOfDisaster, post:25, topic:2152”]Secondly, I think I don’t fully understand the intention.

Is it about running a RPI node with Peercoin to raise the number of running nodes
or is it about running a RPI node with a wallet to raise the number of minting nodes?[/quote]

I think we need to figure this out now. As I understand it, there are four main options:

  1. Run a node on R-Pi with less than 8 connections: This is the safest option but as it does not contribute to the network, I don’t think it is a worthwhile option to aim for.

  2. Run a node on R-Pi with port forwarding i.e. more than 8 connections: This contributes to the network but poses security risks. As such, it should only be used as a node and not for storing/minting Peercoins.

  3. Mint on R-Pi: This helps secure the network, but should not be done with port forwarding.

  4. Run a node on VPS: This can be done with port forwarding, but should not be trusted with storing/minting Peercoins.

In my opinion, options 2 and 3 should be the scope of this campaign. Running nodes on a VPS would definitely be helpful, but for this thread we should focus on the Raspberry Pi. Further researching VPS could be a good idea, and it might be possible to pool resources/donate to get lots of full nodes online. If people want to look into this, it should be done in a new thread.

So, we can decide to give the 10 PPC tip for either running a node with port forwarding OR minting without port forwarding. We need feedback on how feasible each of these options are, and if both are able to be confidently verified to prevent cheating.

If one option is considerably more appropriate than the other, then the tip should be for that option only. If both options are possible, the tip can be given for either, with each person deciding which option is best for them personally.

I hope this makes sense and is not just gibberish :slight_smile: This really needs to be decided to give this effort some direction.

[quote=“river333, post:33, topic:2152”][…]
3) Mint on R-Pi: This helps secure the network, but should not be done with port forwarding.

  1. Run a node on VPS: This can be done with port forwarding, but should not be trusted with storing/minting Peercoins.
    […][/quote]

According to Gavin Andresen, I’d prefer to go for options 3 and 4 (instead of 2 and 3):

Most ordinary folks should NOT be running a full node. We need full nodes that are always on, have more than 8 connections (if you have only 8 then you are part of the problem, not part of the solution), and have a high-bandwidth connection to the Internet.

So: if you’ve got an extra virtual machine with enough memory in a data center, then yes, please, run a full node.

A VPS can typically have more bandwidth, more uptime and provide the network with more help than a RPI at home. A small VPS can be rented for a few bucks a month. I’m currently playing with one, the number of connections is already beyond 8 and slowly increasing. Installation of ppcoind should be quite easy, as the cheapest VPS come with linux and we have compiled binaries for x86 linux.

The installation on RPI drove me nuts, because it takes for ages to compile it for the ARM processor. The RAM on my RPI is low (256 MB with some MB for VGA) and hence I had to create a bigger SWAP file (the SWAP on a Raspbian is only 100 MB to prevent the SD card from wearing out too fast). Now I have a ppcoind on my RPI that doesn’t even support UPNP, hence no “accidental port frowarding” :wink:
Why am I writing this?
A package to install on a RPI would be great to make it easy minting on a RPI. I’m not that linux savvy to cross-compile for a RPI on another machine. So I compiled it on the RPI and had to wait for ages (way beyond 1 hour).
A trusted image with a complete “RPI minter” would be great, but in case the RPI is meant to be minting with huge stashes, I doubt that will be the preferred option for those that have a feeling for security.
The integrity/security/credibility of a compiled installation file for ppcoind can be verified much easier than for a complete operating system image.
One only needs to compile the RPI (with the same flags/options) and create a checksum that can be verified with the one provided. That is not as easy for a complete OS image, as one needs to know exactly what programs are installed (and in what version!) to be able to reconstruct that checksum.

So I second this approach:

[quote=“Cybnate, post:32, topic:2152”][…]
I think trusted binaries with full RPI node for minting compiled by trusted members of the community should be made available here on peercointalk or the website (with checksum). Just like the binaries of the wallets.
[…][/quote]

And just for the Raspberry fans: http://www.raspberrypi.org/raspberry-pi-compute-module-new-product/

Although this is a bit of highjacking this “Tips for Verified Raspberry Pi Nodes” thread, I wanted to share my experience.
As I recently installed Peercoin 0.4 on two of my VPS, I want to share some commands which might help getting it up.
I’m willing to put it in a separate thread (or ask a mod to do that, if it is considered wrong in this thread). I just thought it might be recognized better if I put it here :wink:

This quick guide shall help to get a Peercoin client on a VPS to support the Peercoin network.

I [size=12pt]don’t[/size] recommend using a VPS for PoS minting!
Although this is convenient, it has serious security drawbacks compared to minting on a device, which you own and control. Remember: the VPS runs on a server using virtualization. You have no control over that. So you shouldn’t trust it :wink:

Minimum requirements:

[ul][li]server with x86 CPU[/li]
[li]linux operating system[/li]
[li]256 MB RAM[/li]
[li]400 MB free disk space (currently needed < 350 MB)[/li]
[li]logged in user is able to “sudo” commands[/li]
[li]broadband internet connection with no restrictions (NAT, firewall)[/li][/ul]

The programs “wget” and “tar” should be available out of the box in almost all linux distributions. If not, install them with the appropriate package manager.
I’m not sure, but I think “~/” will be the home directory for most linux distros as well.

Let’s go:
Log on to a console - in case of VPS this is most likely a connection via SSH.
Copy & paste the complete code section should work as well, but I don’t recommend this no-brainer approach :wink:

cd ~/
wget http://sourceforge.net/projects/ppcoin/files/0.4.0/ppcoin-0.4.0-linux.tar.gz/download -O ppcoin-0.4.0-linux.tar.gz
tar xvf ppcoin-0.4.0-linux.tar.gz 

# if you are not sure wether you have a 32 bit or 86 bit linux, you can find it out this way:
uname -a
# there is either something "i686" (32 bit) or " x86_64" (64 bit) in the output

# use the appropriate version of ppcoind. in case of doubt chose the 32 bit version (memory issues at 32 bit seem to be no problem with Peercoin ;) )
sudo cp ppcoin-0.4.0-linux/bin/64/ppcoind /usr/bin/

# or
sudo cp ppcoin-0.4.0-linux/bin/32/ppcoind /usr/bin/

# create a ppcoin.conf file (owner-readable-only) with rpcuser and rpcpassword (required for ppcoind to be run as daemon)
mkdir ~/.ppcoin/
echo rpcuser=bitcoinrpc >> ~/.ppcoin/ppcoin.conf
echo rpcpassword=764ghKJBJR754fghfjzt67rdJGftd587tgf45edhTGdd >> ~/.ppcoin/ppcoin.conf
sudo chmod 700 ~/.ppcoin/
sudo chmod 400 ~/.ppcoin/ppcoin.conf

# start ppcoind as daemon
ppcoind -daemon

# wait some time before you check the status (else "error: couldn't connect to server" is shown)
ppcoind getinfo

# wait for the block chain to be synced

You should inspect the number of connections after ppcoind is runnning for some time. After reaching 8 connections quite fast it is expected to grow slowly. If you constantly stay at 8 connections, there might be something wrong and the desired effect of supporting the network has not been achieved. It might be better to stop ppcoind in that case. But give it some time!

ppcoind hovers between 17 and 21 connections (after ppcoind is running for approx. 2 hours; I’ll monitor that):

ppcoind getinfo
{
    "version" : "v0.4.0ppc-beta",
    "protocolversion" : 60004,
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "newmint" : 0.00000000,
    "stake" : 0.00000000,
    "blocks" : 105594,
    "moneysupply" : 21293800.47462900,
    "connections" : 20,
    "proxy" : "",
    "ip" : "obfuscated",
    "difficulty" : 103854944.26609707,
    "testnet" : false,
    "keypoololdest" : 1396903475,
    "keypoolsize" : 101,
    "paytxfee" : 0.01000000,
    "errors" : ""
}

…for the record: one of my VPS troubles me. Getinfo shows “ip” : “0.0.0.0” and 0 connections. There’s something wrong… I bet there’s some NAT as part of the virtualization :frowning:

Hi! I’m currently working on a complete install&configure script for the official raspbian (‘wheezy’) image. I can make time for it during the evening, it will be some hours work spread over one or two weeks, depending on the bumps in the road :stuck_out_tongue:

For the last pi image I made (peercoin-raspi 0.3.0) I used pre cooked binaries by valermos. This time I’d prefer to use either official binaries or built-in compilation in the install&configure script, so all binaries can be verified.

I found some info on how to compile bitcoin-qt on a pi (here: http://coincafe.net/2013/07/06/how-to-run-bitcoin-qt-on-the-raspberry-pi/) , but no detailed information on compiling ppcoin-qt. Does anyone know if it has the same dependencies and directory structure (ie the ‘cd ppcoin, qmake, make’ part)? I’m familiar with scripting, but much less with compiling code. @Jimmy: do you have tips on this?

I can post a test version in this thread, and add or change things on request, like scripts and desktop items. Or I can contribute the install&configure script to a larger running project.

On how to verify that someone actually has a pi, I like Cybnate’s idea of a photo of the screen with serial number, a newspaper date, and maybe a peercointalk user name. It’s possible to forge this, but it will take a lot of effort. The metadata of the photo could also be a requirement, ie the photo file has to have camera metadata in it, and no ‘photoshop’ or ‘gimp’ :wink:

Is it possible to connect raspberry pi and a osx laptop with USB and control it from there as I don’t have keyboard, hmdi monitor…, who have them these days

That should be possible, but with a lot of configuration on the pi, for which you’ll need a keyboard and monitor :smiley:
You can also use a TV with hdmi, and usb keyboards/mice are really cheap.

[quote=“Tea42, post:37, topic:2152”][…]
For the last pi image I made (peercoin-raspi 0.3.0) I used pre cooked binaries by valermos. This time I’d prefer to use either official binaries or built-in compilation in the install&configure script, so all binaries can be verified.
[…]
compiling ppcoin-qt
[…][/quote]

I second that approach (using the source code), but I’d recommend to think about using ppcoind instead of ppcoin-qt. Compiling ppcoind is straightforward, although it takes roughly 1.5 hours when compiling it native on the RPI (I’ve not digged into cross-compiling). There are unfortunately no binaries available (that I’m aware of and which I’d trust).
For using ppcoin-qt you need a keyboard and a monitor attached to the RPI (or you need to export the display or use VNC or else…).
Using ppcoind only requires SSH access via network, so that’s less effort in most cases.

I’m not aware of such a remote control feature.
Have you considered controlling it via network/SSH?