{"action":"closed","issue":{"url":"https://api.github.com/repos/dogecoin/libdohj/issues/15","repository_url":"https://api.github.com/repos/dogecoin/libdohj","labels_url":"https://api.github.com/repos/dogecoin/libdohj/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/dogecoin/libdohj/issues/15/comments","events_url":"https://api.github.com/repos/dogecoin/libdohj/issues/15/events","html_url":"https://github.com/dogecoin/libdohj/issues/15","id":137033315,"number":15,"title":"Is \"MergedMiningHeader missing from parent coinbase\" a correct consensus rule?","user":{"login":"JeremyRand","id":244188,"avatar_url":"https://avatars.githubusercontent.com/u/244188?v=3","gravatar_id":"","url":"https://api.github.com/users/JeremyRand","html_url":"https://github.com/JeremyRand","followers_url":"https://api.github.com/users/JeremyRand/followers","following_url":"https://api.github.com/users/JeremyRand/following{/other_user}","gists_url":"https://api.github.com/users/JeremyRand/gists{/gist_id}","starred_url":"https://api.github.com/users/JeremyRand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeremyRand/subscriptions","organizations_url":"https://api.github.com/users/JeremyRand/orgs","repos_url":"https://api.github.com/users/JeremyRand/repos","events_url":"https://api.github.com/users/JeremyRand/events{/privacy}","received_events_url":"https://api.github.com/users/JeremyRand/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dogecoin/libdohj/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"rnicoll","id":3513077,"avatar_url":"https://avatars.githubusercontent.com/u/3513077?v=3","gravatar_id":"","url":"https://api.github.com/users/rnicoll","html_url":"https://github.com/rnicoll","followers_url":"https://api.github.com/users/rnicoll/followers","following_url":"https://api.github.com/users/rnicoll/following{/other_user}","gists_url":"https://api.github.com/users/rnicoll/gists{/gist_id}","starred_url":"https://api.github.com/users/rnicoll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rnicoll/subscriptions","organizations_url":"https://api.github.com/users/rnicoll/orgs","repos_url":"https://api.github.com/users/rnicoll/repos","events_url":"https://api.github.com/users/rnicoll/events{/privacy}","received_events_url":"https://api.github.com/users/rnicoll/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2016-02-28T09:45:18Z","updated_at":"2016-02-28T23:54:22Z","closed_at":"2016-02-28T23:54:22Z","body":"Hello!\r\n\r\nI've been playing around with adding Namecoin support to libdohj.  I don't have any code to release yet, but I have a quick question about an issue that I'm running into.\r\n\r\nWhen libdohj processes this Namecoin MainNet block: https://namecoin.webbtc.com/block/5fb89c3b18c27bc38d351d516177cbd3504c95ca0494cbbbbd52f2fb5f2ff1ec , I get the error \"MergedMiningHeader missing from parent coinbase\".  This is block height 19414.  Namecoin MainNet's first auxpow block was at height 19200, so it looks like a lot of auxpow blocks passed verification before this one failed.  I notice that while the previous block does contain the string \"fabe6d6d\" in the hex representation of its auxpow coinbase (which is the merged mining header), this block does not (although there is auxpow data present and the auxpow bit is set in the block version).\r\n\r\nI then looked at the C++ source code for both Namecoin Core and Dogecoin Core.  The libdohj auxpow verification code is pretty similar to both of the C++ implementations, except that I cannot find this particular error in either of the C++ implementations.  Dogecoin Core instead uses the error \"Aux POW chain merkle root must start in the first 20 bytes of the parent coinbase\", which only is raised under a subset of circumstances.  See https://github.com/dogecoin/dogecoin/blob/master/src/auxpow.cpp#L107 for the relevant function of Dogecoin Core, and https://github.com/dogecoin/libdohj/blob/master/src/main/java/org/bitcoinj/core/AuxPoW.java#L238 for the equivalent function in libdohj.\r\n\r\nSo, I'm a little bit confused on what the purpose is of this check in libdohj.  Is this a consensus difference between libdohj and Dogecoin Core, which Dogecoin has just been lucky enough to not run into in the production blockchain?\r\n\r\nCheers.\r\n\r\n-Jeremy Rand, namecoin.org"}}