My peerbox has been minting on the wrong chain and stuck for 5 days

It had been a pleasant surprise to find that my peerbox has found a POS block, before I found ppcoind was stuck at a block 5 days ago, minting on a dead-end chain, after I rebooted it. :frowning:

[sunny@peerbox ~]$ peerbox-info -a
{
    "ppcoind": {
        "balance": xxx,
        "blocks": 134353,
        "connections": 8,
        "difficulty": 427831xxx,
        "difficulty proof-of-stake": 12.7xx,
        "errors": "",
        "ip": "x.x.x.x",
        "keypoololdest": 138969xxxx,
        "keypoolsize": 101,
        "moneysupply": 21767xxx,
        "newmint": 0.0,
        "paytxfee": 0.01,
        "protocolversion": 60004,
        "proxy": "",
        "stake": xxx,
        "testnet": false,
        "unlocked_until": 241138xxxx,
        "version": "v0.4.0ppc-4-g5ace24f-beta",
        "walletversion": 60000
    },
    "system": {
        "average load": [
            1.47,
            1.35,
            1.28
        ],
        "board_rev": "0xe",
        "hardware": "Raspberry Pi",
        "kernel release": "3.14.6-3-GRSEC",
        "maccaddr": "xxx",
        "peerbox": "0.22",
        "serial": "000000000ff8xxxx",
        "system_temperature": 51.92,
        "uptime": "5 days, 23:48:28.110000"
    }

The block number of the main chain is about 135322. Note that the load was very high.
I saved the debug log and restarted ppcoind twice but couldn’t get it to start resync. So I rebooted peerbox. It didn’t help either.
What should I do?

OK I copied blk* database/* from my laptop, set owner, group, permission right, and removed addr.dat. Now the box is minting on the main chain. load is 0.23.

I am glad to learn you successfully resolved this problem. :slight_smile:

I am glad to learn you successfully resolved this problem. :)[/quote]

P’box is not quite fit for the faint of heart yet. But it’s getting there.

@mhps

Sorry for responding so late, I was away.

I’m reading this and I do not know why it was on wrong blockchain. I’m not sure that this goes to Peerbox issues, since this can happen to any ppc client. Did you maybe use ppcoind-blockchain package that lead it to use wrong chain?

I agree it could be a problem of the original peercoind or even bitcoind. Since peerbox is inteded to be left running unattended for a long time, maybe a watch dog is good to have.
I am not using the ppcoind-blockchain package. I kept 6MB (if uncompressed) debug.log if you are interested.

I agree it could be a problem of the original peercoind or even bitcoind. Since peerbox is inteded to be left running unattended for a long time, maybe a watch dog is good to have.
I am not using the ppcoind-blockchain package. I kept 6MB (if uncompressed) debug.log if you are interested.[/quote]

so you propose this as solution?

[quote=“mhps, post:15, topic:2829”]Maybe to add something that the box is minting on the main chain.

I’d like to see a short format that shows the parameters that often change:
connection, balance, diff, staked, last block number and how long ago it was found (health indicator), CPU load, temperature.[/quote]

Ok, can do but you mentioned too much stuff here IMO.
Maybe health indicator is enough beside existing features?
Did you research how do people usually detect wrong chain, and how do they fix it?

I agree that watchdog is good idea.

[quote=“peerchemist, post:7, topic:2928”]so you propose this as solution?

[quote=“mhps, post:15, topic:2829”]Maybe to add something that the box is minting on the main chain.

I’d like to see a short format that shows the parameters that often change:
connection, balance, diff, staked, last block number and how long ago it was found (health indicator), CPU load, temperature.[/quote][/quote]

It’s not a solution, but a general suggestion helping the user to monitor the status of peerbox more easily. The health indicator could have helped me to spot the problem reported here. If my peerbox hadn’t found a new block, I would not have noticed that it was running on the wrong chain.

Ok, can do but you mentioned too much stuff here IMO. Maybe health indicator is enough beside existing features? Did you research how do people usually detect wrong chain, and how do they fix it?

I agree that watchdog is good idea.

I haven’t done research in any comprehensive way. Usually people find out by noticing that their found blocks are orphaned. To detect the problem I was having, one can check if the time of the last block falls far behind the current system time.

Letting peerbox auto-start minting by a watchdog might need have the passphrase left in the SD card, which is a security concern.

Ok, I’ll try to implement watching difference between sys clock (NTP) and last found block.