Secure wallet for PoS minting with Raspberry Pi or similar device

#1

Hi, I recently made a post on Bitcointalk with an idea how to “bring PPC to the next level”.

If Peercoin goes up in price, there will be some holders with coins worth tens or hundreds of thousands of dollars. For now, if these holders want to participate in the PoS process, they must have a hot wallet on a PC. There should be a easy and very secure solution with an accessible device to encourage this kind of holding.

So my idea was to develop a Raspberry Pi image with a “secure” Linux distribution and only the bare minimum tools to run the PPC client for PoS minting. I think such a distribution exists for BTC already, it must only be ported to PPC. It should be done the way it’s ready to use without any hassles.

What do you think? Or does something like this exist already?

#2

Yes yes yes :slight_smile: and we should do the same for an Android app, u load in ur wallet file and it pos mines for u if u activate it… but yeah let’s start with the pi
Fuzzybear

Sent from my HTC Desire using Tapatalk 2

#3

I´m very interested in this. The step is logical since we call Peercoin a energy efficient coin.

The Pi should also be encrypted since you could unplug the SD easily. Could you please post the link to bitcointalk?

@Fuzzy: I agrre, we should have a android wallet, but i don’t see it as a good idea to do PoS on a android device. Typically the wallet on the smartphone should act like a real wallet (like that one in your pocket - less secure then have the money at home or at the bank but you need it). You won’t hold money in your wallet for >30 days and you should not hold big parts of your total money in your (mobile/pocket) wallet. However, it may be a good starting point to get people in PPC, but the Pi may be a real benefit to store wealth in Peercoin.

#4

I’ve done something like that in my mining server (Debian testing minimal). I have it running bfgminer in background, and in order to run the client for PoS minting, I only had to install X+Openbox+Qt4.

this is a screenshot from VNC (the PPCoin Wallet window is rolled up):

so I think you can do this in raspbian and it’ll work the same way ;D

#5

I also think that a “peercoin Pi distribution” should be easy to do with Raspbian. The most difficult part would be the security (encryption etc.).

The bitcointalk thread where I posted this was https://bitcointalk.org/index.php?topic=335606.0 ("[PPC] Ideas to take it to the next level!").

I thought there was a complete “bitcoin Pi distribution”, but still haven’t found it. But there are other related threads / blog posts with instructions for Bitcoin at the Pi:

Bitcoins on a Raspberry Pi
Tutorial how to run Bitcoin-qt on the Raspberry Pi

Unfortunately I have no Pi here and as I know they are difficult to get where I live. So for now I cannot participate in development until I get one.

#6

Something I’ve been thinking about for a while regarding security that ties into this nicely. I know you need to be online to do PoS minting, however presumably you need to only connect to a single node?

If so then in theory you could completely isolate the Pi on an internal network, all ports, ips etc. blocked. Add a single PC in a DMZ (http://en.wikipedia.org/wiki/DMZ_(computing)) which acts as the communication mechanism with the external PPC network which is configured as the only PC the secured PI can communicate with. This other PC could even be another PI, or simply your home PC running the PPC client and an empty wallet.

I’m not a networking expert but I’m pretty sure this is possible, should be pretty similar to a corporate network?

#7

If you don’t want to bother with the compilation process (which takes a few hours) on the Raspberry Pi:
I’ve just compiled the ppcoind:https://dl.dropboxusercontent.com/u/10180704/ppcoin/ppcoind and ppcoin-qt:https://dl.dropboxusercontent.com/u/10180704/ppcoin/ppcoin-qt binaries from source for the Raspberry Pi with Raspbian.

Please give me feedback if this works for you. This is the current 0.3 realise.

Please keep in mind that the database will grow over time. I store my .ppcoin directory on an USB stick (64 GB formatted with ext2).
Don’t use ext4. The RasPi cannot handle the “overhead” ext4 is producing.


Update:
Just run into an out of memory exception.
Maybe 512MB RAM are not enough :stuck_out_tongue:

  1. Update:
    Forget the first Update.
    I just checked db.log:
    “unable to allocate memory for mutex; resize mutex region”
    I created a DB_CONFIG file in .ppcoin including this line:
    mutex_set_max 100000
    (mentioned in: https://bitcointalk.org/index.php?topic=80439.0)
    ATM the Blockchain is downloading. :slight_smile:
  2. Update
    Everything is fine.
    Blockchain has been downloaded and wallet is unlocked for minting only.
    :slight_smile:
#8

Nice, that is a very good start!

#9

[quote=“Valermos, post:7, topic:759”]If you don’t want to bother with the compilation process (which takes a few hours) on the Raspberry Pi:
I’ve just compiled the ppcoind:https://dl.dropboxusercontent.com/u/10180704/ppcoin/ppcoind and ppcoin-qt:https://dl.dropboxusercontent.com/u/10180704/ppcoin/ppcoin-qt binaries from source for the Raspberry Pi with Raspbian.

Please give me feedback if this works for you. This is the current 0.3 realise.

Please keep in mind that the database will grow over time. I store my .ppcoin directory on an USB stick (64 GB formatted with ext2).
Don’t use ext4. The RasPi cannot handle the “overhead” ext4 is producing.


Update:
Just run into an out of memory exception.
Maybe 512MB RAM are not enough :stuck_out_tongue:

  1. Update:
    Forget the first Update.
    I just checked db.log:
    “unable to allocate memory for mutex; resize mutex region”
    I created a DB_CONFIG file in .ppcoin including this line:
    mutex_set_max 100000
    (mentioned in: https://bitcointalk.org/index.php?topic=80439.0)
    ATM the Blockchain is downloading. :slight_smile:
  2. Update
    Everything is fine.
    Blockchain has been downloaded and wallet is unlocked for minting only.
    :)[/quote]

Sounds great! Could you do a step-by-step instruction on how to accomplish this? I have a Pi sitting around that would love to contribute to the network!
What is the current size of the blockchain anyway? Just so I know if I should go get me a larger card.

update: Happy to report that it compiles on my RPi following the guide thats floating out there for ppcoin on Ubuntu (make sure to follow the swapfile advice it gives, otherwise you’ll run out of memory as it describes). It gives a ton of deprecation warnings, which I guess are due to the ARM not liking this swp{b} function. Other than that it’s running fine so far, downloading the blockchain now, a task which seemingly takes forever. Thanks for the DB_CONFIG advice, havent run into problems so far probably because you already figured it out for me. Happy that I can contribute to the network with such a tiny machine. Energy efficiency, that’s what’s Peercoin is all about! :slight_smile:

update2: And the next day everything is still online and working properly. Using a 4Gb SD card for the entire OS including the blockchain. Little over 1Gb free at the moment, that should be fine for the next couple of months at least unless the whole world starts using Peercoin suddenly.

#10

CubieTruck with 2 GB memory and 8GB Nand flash is a good choice for Peercoin PoS mining.

#11

Jimmy, is that a CubieTruck processor board acting as a processor, with a Raspberry Pi firewall?

#12

They are two independent systems. I think both of them can be used for PoS minting though Raspberry Pi hardware is not so good as CubieTruck.

#13

Thanks. I’m going to pick up a CubieTruck to play around with (I’ve already got a RPi that I use, but the extra memory is nice on the CT)