[SOLVED] Unable to mint any NSR using nud

I recently compiled nud on my new Raspberry Pi 2 but it is unable to mint any blocks. The wallet file is the same as previously when I used nu (GUI) for minting on the other computer and the block chain is also the same because I stored it on an external HDD and just switched it to Pi 2.

I can successfully dump my private keys that hold all the nushares that should be used for minting but getinfo reports that balance is 0 and getblockcount reports also 0. I had 11 active connections and it was regularly fetching data from the data feed so its seems that there is no problem with connecting to the network. The wallet has all the addresses and their respective private keys, yet it shows 0 balance. I was able to use functions such as gettransaction so I guess the block chain is successfully accessed from the USB HDD.

I also tried starting nud with -rescan flag and I always made sure to unlock the wallet for minting only. In fact, I have a loop script that regularly unlocks the wallet for minting only in case the old nud has died and got restarted.

The strange thing is that right after setting up nud I was able to see my balance as a response to getinfo. However, a couple of days later with no blocks ever minted the balance went to 0.

Copy everything in the dir to another computer and see if it can mint 1) in the same LAN 2) elsewhere.

My pi couldn’t mint after I reinstalled the OS and copied the blocks from my lap top, which could mint all the time. I had to do a 4day download of the blockchain to fix it.

you could try with the debugging switches and the test network.

Yes, downloading the block chain from scratch was the next thing I was going to try. Can’t do it until the end of next week though.

I’ve tried the same - compile nud on a RaspberryPI2. Here’s a step by step report.

First I cloned the repository

git clone https://bitbucket.org/JordanLeePeershares/nubit.git ~/nubits/

Then I edited ~/nubits/src/makefile.unix to not support UPNP:

sed -i 's\USE_UPNP:=0\USE_UPNP:=-\' ~/nubits/src/makefile.unix

After that I tried to compile

cd ~/nubits/src/
make -f makefile.unix

I got an error message when compiling init.cpp

init.cpp:24:23: fatal error: curl/curl.h: file or directory not found

I installed libcurl, which seems to be a dependency not listed in the ~/nubits/doc/build.txt

sudo apt-get install libcurl4-openssl-dev

After that nud could be compiled with some warnings but no errors.
I’ve started nud after I copied a block chain snapshot from mid of April to ~/.nu/
It’s currently syncing the block chain.

    "version" : "v1.1.0-1-g5133046-dirty-beta",
    "protocolversion" : 50000,
    "walletversion" : 1
    [...]
    "blocks" : 315977,
    [...]
    "connections" : 8,
    [...]

So this seems to be no general problem, but more likely a problem with your block chain snapshot.
If you have 0 connections it’s no wonder you can’t mint.
Did you stop the Nu client (from which you took the block chain) properly?
I often encountered problems with inconsistent block chains after unplanned system restarts.
The same could have happened to you block chain if you simply unplugged the external HDD before shutting down the Nu client.

My Raspberry2 is running

3.18.11-v7+ #781 SMP PREEMPT Tue Apr 21 18:07:59 BST 2015 armv7l GNU/Linux

I didn’t have 0 connections. I actually had 11 connections when I checked. It has transaction information somewhere because gettransaction RPC worked and returned some data, although it didn’t include output addresses which is strange.

The problem was that getblockcount returns 0 and also balance was reported as zero. I closed the old nu properly. Perhaps there was some HDD failure due to improper restart of the Pi so it corrupted the block chain? I checked wallet integrity and it reported that wallet was OK. So, I have connections, I have data feeds, wallet integrity is OK but balance shows 0 and getblockcount is also 0.

I messed up the numbers of connections your initial post. Sorry for that.
What you experience is strange and I can’t explain it.
The nud on RaPi2 is syncing the last 4 weeks of blocks happily.

This issue has been solved now.

I deleted the old block chain and downloaded everything from scratch with a rescan flag set for nud. The downloading stopped at some point and the Pi was still failing to mint any blocks. I restarted the NSR wallet having omitted the rescan flag. It downloaded the remaining blocks and started to mint properly. I have no idea what was wrong and why did it fail to mint even after downloading the block chain from scratch but restarting the wallet made it work. It has now minted blocks successfully for the past 3 days.