PND Headless staking with Pandacoind v2.1.2
Tue 13 January 2015 by LrdShaperI had problems running v3.0.0 on my Sheevaplug but was able to make v2.1.2 work. As of writing v3.0.1 is out but I haven't tried it yet
Ok here we go. Assuming your on Debian or Ubuntu:
1) Download v2.1.2 source code from https://github.com/pandacoin-official/pandacoin/releases into your working directory
git clone https://github.com/pandacoin-official/pandacoin.git
2) Install the dependencies:
sudo apt-get install build-essential libssl-dev libdb++-dev libboost-all-dev libqrencode-dev
3) Build and install pandacoind
cd pandacoin-2.1.2/src/
make -f makefile.unix
make -f makefile.unix install-stripped
4) Go to the directory where you want to store your wallet. This is also the directory where pandacoind will download the blockchain to so make sure you have ample space. In this example we'll use /home/foobar
cd /home/foobar
mkdir pandabank
cd pandabank
5) Create the config file (pandacoin.conf) add the following lines
rpcuser=pandacoinrpc
rpcpassword=setanypasswordhere <- this is NOT your wallet passphrase!!!
server=0
daemon=1
6 ) Assuming you already have your wallet copied to /home/foobar/pandabank, start pandacoind and tell it which directory to use
/usr/local/bin/pandacoind -datadir=/home/foobar/pandabank
You'll get a message "Pandacoin server starting"
7) It takes a while to start up so be patient. To know whether it started successfully you can run:
tail -f /home/foobar/pandabank/debug.log
And you should see something like
Pandacoin version v2.1.2.0-g32a928e ()
Using OpenSSL version OpenSSL 1.0.1e 11 Feb 2013
Startup time: 01/12/15 12:20:30
Default data directory /home/foobar/.pandacoin
Used data directory /home/foobar/pandabank
dbenv.open LogDir=/home/foobar/pandabank/database ErrorFile=/home/foobar/pandabank/db.log
Bound to [::]:xxxx
Bound to 0.0.0.0:xxxx
Loading block index...
Opening LevelDB in /home/foobar/pandabank/txleveldb
Transaction index version is 70509
Opened LevelDB successfully
8) Once the log starts moving you'll be able to query the status of the pandacoind server as it downloads the blockchain. Press Ctrl+C to exit from tail and:
/usr/local/bin/pandacoind -datadir=/home/foobar/pandabank getinfo
9) Once the blockchain is sync'd tell pandacoind to unlock your wallet and start staking
/usr/local/bin/pandacoind -datadir=/home/foobar/pandabank walletpassphrase < yourwalletpassphrasehere> 9999999 true
10) Verify that it is indeed staking
/usr/local/bin/pandacoind -datadir=/home/foobar/pandabank getstakinginfo
If you see
"staking" : true,
then you're in business.
To list the last 10 transactions:
/usr/local/bin/pandacoind -datadir=/home/foobar/pandabank listtransactions
Interests earned with less than 520 confirmations will show as "category : immature" while interests earned that have 520 or more confirmations will show as "category : generate". The fields time and timereceived are in epoch format.
"time" : 1421143991,
"timereceived" : 1421143991
To convert them to standard date and time:
perl -e 'print scalar(localtime(1421143991)), "\n"'
Tue Jan 13 18:13:11 2015
OR
export pndepoch=1421143991 && date --date "Jan 1, 1970 00:00:00 +0000 + ${pndepoch} seconds"
Tue Jan 13 18:13:11 MYT 2015
To display all available options in pandacoind:
/usr/local/bin/pandacoind -datadir=/home/foobar/pandabank help
Many thanks to mtrycz for his help at https://bitcointalk.org/index.php?topic=568529.0 Cheers!