forked from dashpay/dash
-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
bugSomething isn't workingSomething isn't workingcomplicatedComplicated issue to resolveComplicated issue to resolveenhancementNew feature or requestNew feature or request
Description
Block validation enhancement
Within validation.cpp at CChainState::ConnectBlock there used to contain a check for a valid mix_hash. This was removed earlier due to issues with prior launch of progpow and we would now like to return usage of this check for block validation. However; when the check is included once again, it causes the block(s) to be marked as invalid.
This check needs to be corrected and the mix_hash should equal the expected...
Tasks
- confirm
mix_hasherror with @Liquid369 - validate/confirm on
testnet - validate/confirm on
mainnetwork - debug
mix_hashresult - improvements to block validation
Related Refs
- PR Hashing adjustment to fit pools #26
- original validation check
- defined SCC progpow epoch_length =
3240
Development Branch
Debug
TestNet
Invalid
2023-08-16T09:27:02Z [DEBUG] exp_mix_hash: e416f7f4ec9038f1d0758197025f3d51f1078665cb4649c0453dc907f6482e0e
2023-08-16T09:27:02Z [DEBUG] block.mix_hash: 0000000000000000000000000000000000000000000000000000000000000000
2023-08-16T09:27:02Z [DEBUG] final_hash: ee6332d7d219a71f59e27ae7016bb358f407ba0dbb63d13941454becf676864c
2023-08-16T09:27:02Z [DEBUG][WARN] CChainState::ConnectBlock: Accepted result as 'REJECT_INVALID' with 'invalid-mixhash' -- 'mix_hash validity failed' :: exp_mix_hash != block.mix_hash :: e416f7f4ec9038f1d0758197025f3d51f1078665cb4649c0453dc907f6482e0e != 0000000000000000000000000000000000000000000000000000000000000000
Valid
2023-08-16T09:31:57Z [DEBUG] exp_mix_hash: 8a2b022ed0acefb1d515853cba3d5c9f33da383736d1a4518cf676e17fa9b3af
2023-08-16T09:31:57Z [DEBUG] block.mix_hash: 8a2b022ed0acefb1d515853cba3d5c9f33da383736d1a4518cf676e17fa9b3af
2023-08-16T09:31:57Z [DEBUG] final_hash: 0000000007a7e52af13b15ca9bed8e241bdfcd2bb9821821846ece2e98951404
...
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcomplicatedComplicated issue to resolveComplicated issue to resolveenhancementNew feature or requestNew feature or request