Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SPORK_8 doesn't do what it should do #17

Open
MattF42 opened this issue Sep 20, 2023 · 1 comment
Open

SPORK_8 doesn't do what it should do #17

MattF42 opened this issue Sep 20, 2023 · 1 comment

Comments

@MattF42
Copy link
Owner

MattF42 commented Sep 20, 2023

So prior to 2.3.1.2 we had
"SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT": true,

I disabled it in 2.3.1.2 because:

If an incorrect blocks get generated without the masternode payment enforcement in place, the network SHOULD reject these and orphan, them, but it doesn't.

What actually seems to happen is that the voting MNs self partition off with an invalid chain. The correctly reject the block as per

if(sporkManager.IsSporkActive(SPORK_8_MASTERNODE_PAYMENT_ENFORCEMENT)) {
LogPrintf("IsBlockPayeeValid -- ERROR: Invalid masternode payment detected at height %d: %s", nBlockHeight, txNew.ToString());
return false;
}

But then spiral off into a death spiral of InvalidChainFound, Invalid masternode payment detected and fairly quickly stop syncing.

I think this happens because only the voting MNs participate in in the IsTransactionValid() / IsBlockPayeeValid() checks, but honestly I'm rather out of my depth here.....

So, we shouldn't get MNs sulking and stopping getting paid (hurrah) - but we CAN have invalid blocks (with not MN reward) which the network will not correctly reject :(

Can someone please take a look and work out how we can re-enable SPORK8 without causing MN breakage?

Block 483396 was an example of such a block:

~/bin/PEPEPOW-cli getrawtransaction a133ae7f74523db8cd389196f8eb6480990a233eff694b96b44cf7db5fedb6f7 1
{
"hex": "02000000010000000000000000000000000000000000000000000000000000000000000000ffffffff1f0344600704b896ff64088100d3b9030304027a657267706f6f6c2e636f6d00000000000100a89c13460200001976a9140ddc16715823d16442abc7bf0538c2cd46ea2c1988ac00000000",
"txid": "a133ae7f74523db8cd389196f8eb6480990a233eff694b96b44cf7db5fedb6f7",
"size": 116,
"version": 2,
"locktime": 0,
"vin": [
{
"coinbase": "0344600704b896ff64088100d3b9030304027a657267706f6f6c2e636f6d00",
"sequence": 0
}
],
"vout": [
{
"value": 25000.00000000,
"valueSat": 2500000000000,
"n": 0,
"scriptPubKey": {
"asm": "OP_DUP OP_HASH160 0ddc16715823d16442abc7bf0538c2cd46ea2c19 OP_EQUALVERIFY OP_CHECKSIG",
"hex": "76a9140ddc16715823d16442abc7bf0538c2cd46ea2c1988ac",
"reqSigs": 1,
"type": "pubkeyhash",
"addresses": [
"P9rTbRfgkXLmvquRHRKY5Nq7ewA1bFoUZv"
]
}
}
],
"blockhash": "00000000001ccca9511293f1cd73be38089b36b6e6b5a74c9a8709e92d220559",
"height": 483396,
"confirmations": 36166,
"time": 1694471865,
"blocktime": 1694471865
}

@MattF42
Copy link
Owner Author

MattF42 commented Sep 22, 2023

Hopefully this is fixed by c6366d5 leaving open until confirmed

@MattF42 MattF42 closed this as completed Sep 22, 2023
@MattF42 MattF42 reopened this Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant