Is ppc.blockr.io on the wrong chain?

they are at block 233813 now
im at block 233786 (and fully synced)

pi@raspberrypi:~ $ peerbox -health

Checking if we are on the right chain…
Using ppc.blockr.io as reference.

last_block_hash_matches: False
merkle_root_matches: False
block_count_matches: False
previous_block_hash_matches: False

edit: it went on for a bit, now stuck at block 233788, will wait and see what happens

I can confirm this issue. Peerunity (commit c72e0a17a1bba640f42e7520d8d98fb8146bbfed) is on block 233816 (hash 44042ee9748e8815ca36de68439c051e7ccf5712c1153a339304c37bf8841a3b) and ppcoin (commit f01ccea4b515ce6e01f4a50cc6b50a4f3337c7ee) is on block 233788 (hash 692485cf83835c8b0d44bcfaf6bacfa88d27fe8d2c4e00b1e2323961f8c96740).

It appears Peerunity forked from ppcoin after block 233761 (f6624a7ed7cd44a7d71aa25741be503be3626944e1a39c857f5aa0f84c583dc6).

onoz…

This is the best I could find from ppcoin in regards to the issue:

REORGANIZE REORGANIZE: Disconnect 29 blocks; f6624a7ed7cd44a7d71a..41ced2eafb872861c5f8 REORGANIZE: Connect 23 blocks; f6624a7ed7cd44a7d71a..c2a279bcf1b343164ab3 ERROR: ConnectInputs() : e0a3796d49 stake reward exceeded ERROR: Reorganize() : ConnectBlock b1dec17f000417d1d93b failed

This is from my ppcoind node:

$ ppcoind getinfo
{
    "version" : "v0.5.3ppc-beta",
    "protocolversion" : 60006,
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "newmint" : 0.00000000,
    "stake" : 0.00000000,
    "blocks" : 233805,
...
}

$ ppcoind getblock f6624a7ed7cd44a7d71aa25741be503be3626944e1a39c857f5aa0f84c583dc6
{
    "hash" : "f6624a7ed7cd44a7d71aa25741be503be3626944e1a39c857f5aa0f84c583dc6",
    "size" : 455,
    "height" : 233761,
    "version" : 1,
    "merkleroot" : "404929098ff9676dce90d846b2afc445d3b4f11fcdef90a098ad2f32a489dca4",
    "time" : "2016-04-26 06:01:20 UTC",
    "nonce" : 0,
    "bits" : "1c11bafa",
    "difficulty" : 14.43827680,
    "mint" : 0.93000000,
    "previousblockhash" : "3b7e843bfb5e98692a8889a5e12439dcc4cf6157dd21a078e11b3659f38da946",
    "nextblockhash" : "ede584a6a766ab6b51c70f97541550e397bf1b7ae7452f83ec8b75ae1a6db176",
    "flags" : "proof-of-stake",
    "proofhash" : "0000027a10071a5fa6a1a9e81a5e75ea500845ef2f1ce6c77f624dfefff6ccf2",
    "entropybit" : 0,
    "modifier" : "764d0bfbabbdf2cb",
    "modifierchecksum" : "5905909d",
    "tx" : [
        "3e03eef8348aa723d7018d905268325548bc81c4b2273e8791148285a3749a64",
        "91db797edab5db04b2495ea497fcad70a1f4b81e49ddcff2665ceb7c78b2d348"
    ]
}

Anyone can post the output of the following commands from peerunity?

getinfo
getblock f6624a7ed7cd44a7d71aa25741be503be3626944e1a39c857f5aa0f84c583dc6
getblock b1dec17f000417d1d93b... (need to find the full hash of the rejected block)

Here’s what I have for Peerunity.

$ peerunityd getinfo { "version" : "v0.2.0", "protocolversion" : 60006, "walletversion" : 60000, "balance" : 0.00000000, "newmint" : 0.00000000, "stake" : 0.00000000, "blocks" : 233848, "moneysupply" : 23127553.34286400, "connections" : 12, "proxy" : "", "difficulty" : 426012443.80039656, "testnet" : false, "keypoololdest" : 1440447513, "keypoolsize" : 101, "paytxfee" : 0.01000000, "errors" : "" } $ peerunityd getblock f6624a7ed7cd44a7d71aa25741be503be3626944e1a39c857f5aa0f84c583dc6 { "hash" : "f6624a7ed7cd44a7d71aa25741be503be3626944e1a39c857f5aa0f84c583dc6", "size" : 455, "height" : 233761, "version" : 1, "merkleroot" : "404929098ff9676dce90d846b2afc445d3b4f11fcdef90a098ad2f32a489dca4", "time" : "2016-04-26 06:01:20 UTC", "nonce" : 0, "bits" : "1c11bafa", "difficulty" : 14.43827680, "mint" : 0.93000000, "previousblockhash" : "3b7e843bfb5e98692a8889a5e12439dcc4cf6157dd21a078e11b3659f38da946", "nextblockhash" : "b1dec17f000417d1d93bce0b272095d62d0fb8d5ebbf11a0e0e14091d414bdbf", "flags" : "proof-of-stake", "proofhash" : "0000027a10071a5fa6a1a9e81a5e75ea500845ef2f1ce6c77f624dfefff6ccf2", "entropybit" : 0, "modifier" : "764d0bfbabbdf2cb", "modifierchecksum" : "5905909d", "tx" : [ "3e03eef8348aa723d7018d905268325548bc81c4b2273e8791148285a3749a64", "91db797edab5db04b2495ea497fcad70a1f4b81e49ddcff2665ceb7c78b2d348" ] } $ peerunityd getblock b1dec17f000417d1d93bce0b272095d62d0fb8d5ebbf11a0e0e14091d414bdbf { "hash" : "b1dec17f000417d1d93bce0b272095d62d0fb8d5ebbf11a0e0e14091d414bdbf", "size" : 2169, "height" : 233762, "version" : 1, "merkleroot" : "2637ff0561fa3601d8aab4eb59c332927f23c17ca71278f635fa026de540f1d3", "time" : "2016-04-26 06:04:13 UTC", "nonce" : 0, "bits" : "1c11b66b", "difficulty" : 14.45279206, "mint" : 0.10000000, "previousblockhash" : "f6624a7ed7cd44a7d71aa25741be503be3626944e1a39c857f5aa0f84c583dc6", "nextblockhash" : "497c2cf91c307e400b7299eddd34bea78ba31b90c25a3432aac8801800636824", "flags" : "proof-of-stake stake-modifier", "proofhash" : "00000006fd95760033e77ad63573c50560c0d87761518372d7d9f367a2c00aa6", "entropybit" : 1, "modifier" : "43c138ecc372de8c", "modifierchecksum" : "57516a91", "tx" : [ "0fbec98cf5135538f5df6b3eb225d1eee8c0a77f472084e9a29fe2a768f959f1", "e0a3796d4934e3bce158396d58d7bec60db648e2170c86686a5e8add70f2cc85", "45a2a7dfa60a111c047cbd79f233252c6beaabc8894cd55e30e6f6dd0f962825" ] }

From my peerunityd:

peerunityd getinfo
{
    "version" : "v0.2.0",
    "protocolversion" : 60006,
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "newmint" : 0.00000000,
    "stake" : 0.00000000,
    "blocks" : 233853,
    "moneysupply" : 23127558.00286400,
    "connections" : 8,
    "proxy" : "",
    "ip" : "obfuscated",
    "difficulty" : 426012443.80039656,
    "testnet" : false,
    "keypoololdest" : 1459937950,
    "keypoolsize" : 101,
    "paytxfee" : 0.01000000,
    "errors" : ""
}
peerunityd getblock f6624a7ed7cd44a7d71aa25741be503be3626944e1a39c857f5aa0f84c583dc6
{
    "hash" : "f6624a7ed7cd44a7d71aa25741be503be3626944e1a39c857f5aa0f84c583dc6",
    "size" : 455,
    "height" : 233761,
    "version" : 1,
    "merkleroot" : "404929098ff9676dce90d846b2afc445d3b4f11fcdef90a098ad2f32a489dca4",
    "time" : "2016-04-26 06:01:20 UTC",
    "nonce" : 0,
    "bits" : "1c11bafa",
    "difficulty" : 14.43827680,
    "mint" : 0.93000000,
    "previousblockhash" : "3b7e843bfb5e98692a8889a5e12439dcc4cf6157dd21a078e11b3659f38da946",
    "nextblockhash" : "b1dec17f000417d1d93bce0b272095d62d0fb8d5ebbf11a0e0e14091d414bdbf",
    "flags" : "proof-of-stake",
    "proofhash" : "0000027a10071a5fa6a1a9e81a5e75ea500845ef2f1ce6c77f624dfefff6ccf2",
    "entropybit" : 0,
    "modifier" : "764d0bfbabbdf2cb",
    "modifierchecksum" : "5905909d",
    "tx" : [
        "3e03eef8348aa723d7018d905268325548bc81c4b2273e8791148285a3749a64",
        "91db797edab5db04b2495ea497fcad70a1f4b81e49ddcff2665ceb7c78b2d348"
    ]
}
peerunityd getblock b1dec17f000417d1d93bce0b272095d62d0fb8d5ebbf11a0e0e14091d414bdbf
{
    "hash" : "b1dec17f000417d1d93bce0b272095d62d0fb8d5ebbf11a0e0e14091d414bdbf",
    "size" : 2169,
    "height" : 233762,
    "version" : 1,
    "merkleroot" : "2637ff0561fa3601d8aab4eb59c332927f23c17ca71278f635fa026de540f1d3",
    "time" : "2016-04-26 06:04:13 UTC",
    "nonce" : 0,
    "bits" : "1c11b66b",
    "difficulty" : 14.45279206,
    "mint" : 0.10000000,
    "previousblockhash" : "f6624a7ed7cd44a7d71aa25741be503be3626944e1a39c857f5aa0f84c583dc6",
    "nextblockhash" : "497c2cf91c307e400b7299eddd34bea78ba31b90c25a3432aac8801800636824",
    "flags" : "proof-of-stake stake-modifier",
    "proofhash" : "00000006fd95760033e77ad63573c50560c0d87761518372d7d9f367a2c00aa6",
    "entropybit" : 1,
    "modifier" : "43c138ecc372de8c",
    "modifierchecksum" : "57516a91",
    "tx" : [
        "0fbec98cf5135538f5df6b3eb225d1eee8c0a77f472084e9a29fe2a768f959f1",
        "e0a3796d4934e3bce158396d58d7bec60db648e2170c86686a5e8add70f2cc85",
        "45a2a7dfa60a111c047cbd79f233252c6beaabc8894cd55e30e6f6dd0f962825"
    ]
}

So why I’m on the wrong chain along with blockr? My node was running constantly past days.

http://31.178.239.144/12

I’m at block 233814 with 35 connections.

Do I have to restart node? Do I have to delete and redownload all blockchain?

EDIT:

I restarted node and don’t want to delete blockchain until more info about issue.

EDIT:

I’m running peercoin core.

EDIT:

Currently at block 233815

EDIT:

EDIT:

From my point of view this thread should have a title “is peerunity on the wrong chain?”

EDIT:

Currently at block 233816

I ran some additional diagnosis print, here is what I got from ppcoin daemon debug log:

Diagnosis/Stake-Reward : nStakeReward=0.10 GetProofOfStakeReward=0.10 GetMinFee=0.02
ERROR: ConnectInputs() : e0a3796d49 stake reward exceeded

Here is the print patch. If you are capable of building peerunity, can try this on a testing node and see what peerunity thinks those three values are for the stake in question (proof-of-stake for block height 233762).

diff --git a/src/main.cpp b/src/main.cpp
index 1050bce..45d9a66 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1304,6 +1304,8 @@ bool CTransaction::ConnectInputs(CTxDB& txdb, MapPrevTx inputs,
             if (!GetCoinAge(txdb, nCoinAge))
                 return error("ConnectInputs() : %s unable to get coin age for coinstake", GetHash().ToString().substr(0,10).c_str());
             int64 nStakeReward = GetValueOut() - nValueIn;
+            // Temporary diagnosis patch to debug peerunity stake issue
+            printf("Diagnosis/Stake-Reward : nStakeReward=%s GetProofOfStakeReward=%s GetMinFee=%s\n", FormatMoney(nStakeReward).c_str(), FormatMoney(GetProofOfStakeReward(nCoinAge)).c_str(), FormatMoney(GetMinFee()).c_str());
             if (nStakeReward > GetProofOfStakeReward(nCoinAge) - GetMinFee() + MIN_TX_FEE)
                 return DoS(100, error("ConnectInputs() : %s stake reward exceeded", GetHash().ToString().substr(0,10).c_str()));
         }

MatthewLM has identified the issue in peerunity and is working on a fix with peerunity.

So https://coinplorer.com/PPC is on the correct fork?

I pushed my changes here: https://github.com/MatthewLM/Peerunity/tree/0.2.1 If [member=30128]glv[/member] or someone could make a 0.2.1 branch on the parent repository and pull the changes, that would be great.

I checked that it ended on the correct chain, though I couldn’t see in the logs that it rejected the incorrect block. I can’t do any more testing right now as I need to go to bed.

Edit: Got back from cleaning my teeth and I can confirm that the problematic block is rejected after my fix:

REORGANIZE REORGANIZE: Disconnect 59 blocks; f6624a7ed7cd44a7d71a..fb781905a55446914fcd REORGANIZE: Connect 49 blocks; f6624a7ed7cd44a7d71a..0643fd3b6ede651507bb ERROR: ConnectInputs() : e0a3796d49 stake reward exceeded ERROR: Reorganize() : ConnectBlock b1dec17f000417d1d93b failed InvalidChainFound: invalid block=5c88c52e0322c2e069b7 height=233866 trust=8218089960288378 InvalidChainFound: current best=fb781905a55446914fcd height=233820 trust=8214663673371452 ERROR: SetBestChain() : Reorganize failed ERROR: AcceptBlock() : AddToBlockIndex failed ERROR: ProcessBlock() : AcceptBlock FAILED

Considering this, I am personally happy for the fix to go ahead.

Fix looks good to me. Great job identifying the problem and providing fix to the community quickly! Now get some well-deserved sweet dreams ;D

I compiled @MatthewLM’s 0.2.1 and started peerunityd with the same application data folder I used before with 0.2.0
Now it looks like this:

peerunityd getinfo
{
    "version" : "v0.2.1.0-g3cb34c9",
    "protocolversion" : 60006,
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "newmint" : 0.00000000,
    "stake" : 0.00000000,
    "blocks" : 233890,
    "moneysupply" : 23127847.76509600,
    "connections" : 8,
    "proxy" : "",
    "ip" : "obfuscated",
    "difficulty" : 388848999.99911582,
    "testnet" : false,
    "keypoololdest" : 1459937950,
    "keypoolsize" : 101,
    "paytxfee" : 0.01000000,
    "errors" : ""
}

peerunityd getblock f6624a7ed7cd44a7d71aa25741be503be3626944e1a39c857f5aa0f84c583dc6
{
    "hash" : "f6624a7ed7cd44a7d71aa25741be503be3626944e1a39c857f5aa0f84c583dc6",
    "size" : 455,
    "height" : 233761,
    "version" : 1,
    "merkleroot" : "404929098ff9676dce90d846b2afc445d3b4f11fcdef90a098ad2f32a489dca4",
    "time" : "2016-04-26 06:01:20 UTC",
    "nonce" : 0,
    "bits" : "1c11bafa",
    "difficulty" : 14.43827680,
    "mint" : 0.93000000,
    "previousblockhash" : "3b7e843bfb5e98692a8889a5e12439dcc4cf6157dd21a078e11b3659f38da946",
    "nextblockhash" : "b1dec17f000417d1d93bce0b272095d62d0fb8d5ebbf11a0e0e14091d414bdbf",
    "flags" : "proof-of-stake",
    "proofhash" : "0000027a10071a5fa6a1a9e81a5e75ea500845ef2f1ce6c77f624dfefff6ccf2",
    "entropybit" : 0,
    "modifier" : "764d0bfbabbdf2cb",
    "modifierchecksum" : "5905909d",
    "tx" : [
        "3e03eef8348aa723d7018d905268325548bc81c4b2273e8791148285a3749a64",
        "91db797edab5db04b2495ea497fcad70a1f4b81e49ddcff2665ceb7c78b2d348"
    ]
}
peerunityd getblock b1dec17f000417d1d93bce0b272095d62d0fb8d5ebbf11a0e0e14091d414bdbf
{
    "hash" : "b1dec17f000417d1d93bce0b272095d62d0fb8d5ebbf11a0e0e14091d414bdbf",
    "size" : 2169,
    "height" : 233762,
    "version" : 1,
    "merkleroot" : "2637ff0561fa3601d8aab4eb59c332927f23c17ca71278f635fa026de540f1d3",
    "time" : "2016-04-26 06:04:13 UTC",
    "nonce" : 0,
    "bits" : "1c11b66b",
    "difficulty" : 14.45279206,
    "mint" : 0.10000000,
    "previousblockhash" : "f6624a7ed7cd44a7d71aa25741be503be3626944e1a39c857f5aa0f84c583dc6",
    "nextblockhash" : "497c2cf91c307e400b7299eddd34bea78ba31b90c25a3432aac8801800636824",
    "flags" : "proof-of-stake stake-modifier",
    "proofhash" : "00000006fd95760033e77ad63573c50560c0d87761518372d7d9f367a2c00aa6",
    "entropybit" : 1,
    "modifier" : "43c138ecc372de8c",
    "modifierchecksum" : "57516a91",
    "tx" : [
        "0fbec98cf5135538f5df6b3eb225d1eee8c0a77f472084e9a29fe2a768f959f1",
        "e0a3796d4934e3bce158396d58d7bec60db648e2170c86686a5e8add70f2cc85",
        "45a2a7dfa60a111c047cbd79f233252c6beaabc8894cd55e30e6f6dd0f962825"
    ]
}

Shouldn’t that have been reorganized?

blockchain on forked peerunity won’t get reorganized until main chain catches up and passes in height the fork, iic.

you can either start from scratch deleting blockchain locally or wait.

what’s worse is that there are too many peerunity nodes that are minting, lengthening the broken chain. i am afraid that without snapshot from le roy this problem won’t be solved quickly (

Great job! Fast team debug work :slight_smile:

Peerunity will not recheck the broken block, so I would recommend that people either wait or download the blockchain from scratch using the fixed Peerunity. When Sunny is able to make checkpoints again, Peerunity should move onto the correct chain. If the correct chain becomes longest then Peerunity will also switch. All Peerunity minters should either stop minting or move to the correct chain. The same applies to miners.

After downloading the blockchain with @MatthewLM’s peerunityd 0.2.1 from scratch (thx to the size it’s only a matter of hours and not days!):

short version:

peerunityd getblock f6624a7ed7cd44a7d71aa25741be503be3626944e1a39c857f5aa0f84c583dc6
[...]
    "previousblockhash" : "3b7e843bfb5e98692a8889a5e12439dcc4cf6157dd21a078e11b3659f38da946",
    "nextblockhash" : "ede584a6a766ab6b51c70f97541550e397bf1b7ae7452f83ec8b75ae1a6db176",

extended version:

peerunityd getinfo
{
    "version" : "v0.2.1.0-g3cb34c9",
    "protocolversion" : 60006,
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "newmint" : 0.00000000,
    "stake" : 0.00000000,
    "blocks" : 233866,
    "moneysupply" : 23129207.12328800,
    "connections" : 8,
    "proxy" : "",
    "ip" : "obfuscated",
    "difficulty" : 360177819.36430633,
    "testnet" : false,
    "keypoololdest" : 1461755606,
    "keypoolsize" : 101,
    "paytxfee" : 0.01000000,
    "errors" : ""
}

peerunityd getblock f6624a7ed7cd44a7d71aa25741be503be3626944e1a39c857f5aa0f84c583dc6
{
    "hash" : "f6624a7ed7cd44a7d71aa25741be503be3626944e1a39c857f5aa0f84c583dc6",
    "size" : 455,
    "height" : 233761,
    "version" : 1,
    "merkleroot" : "404929098ff9676dce90d846b2afc445d3b4f11fcdef90a098ad2f32a489dca4",
    "time" : "2016-04-26 06:01:20 UTC",
    "nonce" : 0,
    "bits" : "1c11bafa",
    "difficulty" : 14.43827680,
    "mint" : 0.93000000,
    "previousblockhash" : "3b7e843bfb5e98692a8889a5e12439dcc4cf6157dd21a078e11b3659f38da946",
    "nextblockhash" : "ede584a6a766ab6b51c70f97541550e397bf1b7ae7452f83ec8b75ae1a6db176",
    "flags" : "proof-of-stake",
    "proofhash" : "0000027a10071a5fa6a1a9e81a5e75ea500845ef2f1ce6c77f624dfefff6ccf2",
    "entropybit" : 0,
    "modifier" : "764d0bfbabbdf2cb",
    "modifierchecksum" : "5905909d",
    "tx" : [
        "3e03eef8348aa723d7018d905268325548bc81c4b2273e8791148285a3749a64",
        "91db797edab5db04b2495ea497fcad70a1f4b81e49ddcff2665ceb7c78b2d348"
    ]
}

peerunityd getblock ede584a6a766ab6b51c70f97541550e397bf1b7ae7452f83ec8b75ae1a6db176
{
    "hash" : "ede584a6a766ab6b51c70f97541550e397bf1b7ae7452f83ec8b75ae1a6db176",
    "size" : 1818,
    "height" : 233762,
    "version" : 1,
    "merkleroot" : "3739c86ca7ac19e1453a7535a7813779b53b67bc6dd4404289bcc4170a6b2719",
    "time" : "2016-04-26 06:15:02 UTC",
    "nonce" : 0,
    "bits" : "1c11b66b",
    "difficulty" : 14.45279206,
    "mint" : 2.40000000,
    "previousblockhash" : "f6624a7ed7cd44a7d71aa25741be503be3626944e1a39c857f5aa0f84c583dc6",
    "nextblockhash" : "0a68ccfe043c0c7ae890b707bdb98436e32809f19d720252b8fe5bc2edf18736",
    "flags" : "proof-of-stake stake-modifier",
    "proofhash" : "000009da7180bd14b57c6552ca4fb42badd79c5b2eac456896158d9bef743903",
    "entropybit" : 0,
    "modifier" : "43c138ecc372de8c",
    "modifierchecksum" : "919aa4ba",
    "tx" : [
        "0c101360a6b91b94b834a0f424871c845b46556c47de0d6754d8e0c27f01bf1d",
        "9e3886f5724df5acad867c0962e426eacc5d6eb798c8432ded6f919ce4b9ee2b",
        "8370f67666c92e92a75ac8628510c0a1f66d170e713a5f9997baebdf4e40f270",
        "0f1668c2da6117064a32a27f0806e7aee4f5615e6577bfb557ca84058dbcac98",
        "45a2a7dfa60a111c047cbd79f233252c6beaabc8894cd55e30e6f6dd0f962825"
    ]

Builds of Peerunity 0.2.1 are released: https://github.com/Peerunity/Peerunity/releases