Mining halted permanently on chain instance.

+1 vote

I'm running a chain which was mining for so long. Suddenly it stopped mining blocks after a Block Height of 1700. Proof-of-Work is totally disabled on this chain instance, and target-adjust-freq is set to -1. The chain has only one node, and it completely operates on mining diversity. Two addresses have mining permissions. The private keys of both are stored in the node. The chain instance was originally running on Multichain 2.0-release version and protocol version 20006. I recently upgraded the Multichain to version 2.0.1 and the chain's protocol version to 20009. The mining process halted a couple of days later. Here are the chain parameters:

{
    "chain-protocol": "multichain",
    "chain-description": "MultiChain test-chain",
    "root-stream-name": "root",
    "root-stream-open": false,
    "chain-is-testnet": false,
    "target-block-time": 10,
    "maximum-block-size": 1000000000,
    "maximum-chunk-size": 16777216,
    "maximum-chunk-count": 2048,
    "default-network-port": 5134,
    "default-rpc-port": 5135,
    "anyone-can-connect": false,
    "anyone-can-send": false,
    "anyone-can-receive": false,
    "anyone-can-receive-empty": true,
    "anyone-can-create": false,
    "anyone-can-issue": false,
    "anyone-can-mine": false,
    "anyone-can-activate": false,
    "anyone-can-admin": false,
    "support-miner-precheck": true,
    "allow-arbitrary-outputs": false,
    "allow-p2sh-outputs": true,
    "allow-multisig-outputs": true,
    "setup-first-blocks": 60,
    "mining-diversity": 0.6,
    "admin-consensus-upgrade": 0.8,
    "admin-consensus-txfilter": 0.5,
    "admin-consensus-admin": 0.8,
    "admin-consensus-activate": 0,
    "admin-consensus-mine": 0.8,
    "admin-consensus-create": 0,
    "admin-consensus-issue": 0,
    "lock-admin-mine-rounds": 5,
    "mining-requires-peers": true,
    "mine-empty-rounds": 5,
    "mining-turnover": 1,
    "first-block-reward": -1,
    "initial-block-reward": 0,
    "reward-halving-interval": 52560000,
    "reward-spendable-delay": 1,
    "minimum-per-output": 0,
    "maximum-per-output": 100000000000000,
    "minimum-offchain-fee": 0,
    "minimum-relay-fee": 0,
    "native-currency-multiple": 100000000,
    "skip-pow-check": true,
    "pow-minimum-bits": 2,
    "target-adjust-freq": -1,
    "allow-min-difficulty-blocks": true,
    "only-accept-std-txs": true,
    "max-std-tx-size": 100000000,
    "max-std-op-returns-count": 1024,
    "max-std-op-return-size": 67108864,
    "max-std-op-drops-count": 100,
    "max-std-element-size": 32768,
    "chain-name": "test-chain",
    "protocol-version": 20009,
    "network-message-start": "fefbecf3",
    "address-pubkeyhash-version": "005a822f",
    "address-scripthash-version": "05b60446",
    "private-key-version": "806a9347",
    "address-checksum-value": "4c11730f",
    "genesis-pubkey": "0370a4c226b62185d0398f0b574bbd88be227fa1eaf67f5413ac59e90ebb581e18",
    "genesis-version": 1,
    "genesis-timestamp": 1548839559,
    "genesis-nbits": 541065215,
    "genesis-nonce": 3,
    "genesis-pubkey-hash": "61797be245561b55914f713748df03991ff314eb",
    "genesis-hash": "033f70ffe875e84b24cdafdedec6db24a4b359869fe473890018c4946fc6d184",
    "chain-params-hash": "e74b8ad4cbf701beb1eb3b7dc6a9e704f8f23d03a311978cff9906c4ef25d80d"
}


I'm not able to narrow down to the root cause. Any help?

related to an answer for: Mining halted permanently
asked May 20, 2019 by Cypher

1 Answer

+1 vote
 
Best answer

Are you still generating new transactions for this node? I ask because the parameters are set to stop mining if there are no new transactions. Apart from that the only unusual parameter I see is pow-minimum-bits=2 but that should not cause mining to stop. You can also take a look at the last few thousand lines in the debug.log file in your blockchain directory to see if there are any clues, and post those here.

answered May 20, 2019 by MultiChain
selected May 29, 2019 by Cypher
Interestingly the issue is resolved by setting the runtime parameter miningrequirespeers to false. The mining actually stopped after the 2nd mining address came into picture. When there was only 1 miner initially, the chain was working flawless. Although the 2nd address belongs to the same node, the chain still demands "mining-requires-peers" to be set to "false" for it to continue mining. Upon setting the miningrequirespeers to false, the issue was resolved. Not sure how to explain this. Can you please help me understand?
Yes, this is the expected behavior of mining-requires-peers, it is not applied if there is a single address with mine permissions, to make life easier for people just getting started.

See the documentation here: https://www.multichain.com/developers/blockchain-parameters/
...