{"action":"created","issue":{"url":"https://api.github.com/repos/zcash/zcash/issues/2993","repository_url":"https://api.github.com/repos/zcash/zcash","labels_url":"https://api.github.com/repos/zcash/zcash/issues/2993/labels{/name}","comments_url":"https://api.github.com/repos/zcash/zcash/issues/2993/comments","events_url":"https://api.github.com/repos/zcash/zcash/issues/2993/events","html_url":"https://github.com/zcash/zcash/pull/2993","id":300393654,"number":2993,"title":"Use block hash comparison for consistency check when loading block index","user":{"login":"str4d","id":4993799,"avatar_url":"https://avatars0.githubusercontent.com/u/4993799?v=4","gravatar_id":"","url":"https://api.github.com/users/str4d","html_url":"https://github.com/str4d","followers_url":"https://api.github.com/users/str4d/followers","following_url":"https://api.github.com/users/str4d/following{/other_user}","gists_url":"https://api.github.com/users/str4d/gists{/gist_id}","starred_url":"https://api.github.com/users/str4d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/str4d/subscriptions","organizations_url":"https://api.github.com/users/str4d/orgs","repos_url":"https://api.github.com/users/str4d/repos","events_url":"https://api.github.com/users/str4d/events{/privacy}","received_events_url":"https://api.github.com/users/str4d/received_events","type":"User","site_admin":false},"labels":[{"id":317477850,"url":"https://api.github.com/repos/zcash/zcash/labels/error%20handling","name":"error handling","color":"e04040","default":false},{"id":161973760,"url":"https://api.github.com/repos/zcash/zcash/labels/performance","name":"performance","color":"b495f9","default":false},{"id":246224886,"url":"https://api.github.com/repos/zcash/zcash/labels/regression","name":"regression","color":"fe2000","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/zcash/zcash/milestones/67","html_url":"https://github.com/zcash/zcash/milestone/67","labels_url":"https://api.github.com/repos/zcash/zcash/milestones/67/labels","id":2993514,"number":67,"title":"v1.0.15","description":"The Overwinter consensus logic, and a testnet activation height.","creator":{"login":"str4d","id":4993799,"avatar_url":"https://avatars0.githubusercontent.com/u/4993799?v=4","gravatar_id":"","url":"https://api.github.com/users/str4d","html_url":"https://github.com/str4d","followers_url":"https://api.github.com/users/str4d/followers","following_url":"https://api.github.com/users/str4d/following{/other_user}","gists_url":"https://api.github.com/users/str4d/gists{/gist_id}","starred_url":"https://api.github.com/users/str4d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/str4d/subscriptions","organizations_url":"https://api.github.com/users/str4d/orgs","repos_url":"https://api.github.com/users/str4d/repos","events_url":"https://api.github.com/users/str4d/events{/privacy}","received_events_url":"https://api.github.com/users/str4d/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":45,"state":"open","created_at":"2017-12-21T18:06:01Z","updated_at":"2018-02-26T20:59:12Z","due_on":"2018-02-26T08:00:00Z","closed_at":null},"comments":4,"created_at":"2018-02-26T20:59:12Z","updated_at":"2018-02-26T23:57:24Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/zcash/zcash/pulls/2993","html_url":"https://github.com/zcash/zcash/pull/2993","diff_url":"https://github.com/zcash/zcash/pull/2993.diff","patch_url":"https://github.com/zcash/zcash/pull/2993.patch"},"body":"The Equihash check caused block index loading to take around 38x longer.\r\nHowever, we don't need to check it directly, as the only paths to writing a\r\nblock header to disk already go through a proof-of-work check (e.g. receiving a\r\nblock over the network). By forcing the block header inside the CBlockIndex to\r\nbe re-serialized, we retain the benefits of the consistency check without the\r\noverhead at startup."},"comment":{"url":"https://api.github.com/repos/zcash/zcash/issues/comments/368694764","html_url":"https://github.com/zcash/zcash/pull/2993#issuecomment-368694764","issue_url":"https://api.github.com/repos/zcash/zcash/issues/2993","id":368694764,"user":{"login":"bitcartel","id":194979,"avatar_url":"https://avatars2.githubusercontent.com/u/194979?v=4","gravatar_id":"","url":"https://api.github.com/users/bitcartel","html_url":"https://github.com/bitcartel","followers_url":"https://api.github.com/users/bitcartel/followers","following_url":"https://api.github.com/users/bitcartel/following{/other_user}","gists_url":"https://api.github.com/users/bitcartel/gists{/gist_id}","starred_url":"https://api.github.com/users/bitcartel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitcartel/subscriptions","organizations_url":"https://api.github.com/users/bitcartel/orgs","repos_url":"https://api.github.com/users/bitcartel/repos","events_url":"https://api.github.com/users/bitcartel/events{/privacy}","received_events_url":"https://api.github.com/users/bitcartel/received_events","type":"User","site_admin":false},"created_at":"2018-02-26T23:57:24Z","updated_at":"2018-02-26T23:57:24Z","author_association":"CONTRIBUTOR","body":"What I'm asking is what is the consistency check actually against? \r\n\r\nImagine there is disk corruption.   When zcashd wrote a block to disk, its `hashReserved` was all 0x00, as expected.  However there has been some bit rot, and now whenver reading back from disk, it is non-zero junk data.  `(header.GetHash() != pindexNew->GetBlockHash())` won't catch this error, but `CheckProofOfWork` should. (That's pretty much how Zencash realized they had an issue on #2931).\r\n\r\nChecking the block hash can help catch developer error of forgetting to copy a field (which is used as part of computing the block hash), but is there a way we can catch this type of error at build time?\r\n\r\nThis PR as it stands is fine for purpose of fixing the performance regression.  Perhaps the log message \"CheckEquihashSolution failed\" should be changed to something like \"GetBlockHash inconsistency detected, expected {} but got {}\""}}
{"actor":{"display_login":"bitcartel"}}