{"action":"created","issue":{"url":"https://api.github.com/repos/bitcoin/bitcoin/issues/16333","repository_url":"https://api.github.com/repos/bitcoin/bitcoin","labels_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/16333/labels{/name}","comments_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/16333/comments","events_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/16333/events","html_url":"https://github.com/bitcoin/bitcoin/pull/16333","id":463761440,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjk0MTc1ODE3","number":16333,"title":"test: Set BIP34Height = 2 for regtest","user":{"login":"MarcoFalke","id":6399679,"node_id":"MDQ6VXNlcjYzOTk2Nzk=","avatar_url":"https://avatars0.githubusercontent.com/u/6399679?v=4","gravatar_id":"","url":"https://api.github.com/users/MarcoFalke","html_url":"https://github.com/MarcoFalke","followers_url":"https://api.github.com/users/MarcoFalke/followers","following_url":"https://api.github.com/users/MarcoFalke/following{/other_user}","gists_url":"https://api.github.com/users/MarcoFalke/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcoFalke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcoFalke/subscriptions","organizations_url":"https://api.github.com/users/MarcoFalke/orgs","repos_url":"https://api.github.com/users/MarcoFalke/repos","events_url":"https://api.github.com/users/MarcoFalke/events{/privacy}","received_events_url":"https://api.github.com/users/MarcoFalke/received_events","type":"User","site_admin":false},"labels":[{"id":62963516,"node_id":"MDU6TGFiZWw2Mjk2MzUxNg==","url":"https://api.github.com/repos/bitcoin/bitcoin/labels/Tests","name":"Tests","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2019-07-03T13:43:42Z","updated_at":"2019-08-05T12:27:09Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/bitcoin/bitcoin/pulls/16333","html_url":"https://github.com/bitcoin/bitcoin/pull/16333","diff_url":"https://github.com/bitcoin/bitcoin/pull/16333.diff","patch_url":"https://github.com/bitcoin/bitcoin/pull/16333.patch"},"body":"BIP34 is active on the current tip of mainnet, so all miners must obey it. It would be nice if it also was active in fresh regtest instances from the earliest time possible.\r\n\r\nI changed the BIP34 height to `2`, so that the block at height=1 may be used to mine a duplicate coinbase. (Needed to test mainnet behaviour)\r\n\r\nThis pull is done in three commits:\r\n*  test: Document blockinfo size in miner_tests:\r\n   Fixing a typo in the docs\r\n\r\n*  test: Create all blocks with version 4 or higher:\r\n   Now that BIP34 is activated earlier, we need to create blocks with a higher version number from where it activated. Just bump it up to at least 4.\r\n\r\n*  test: Set BIP34Height = 2 for regtest:\r\n   This fixes the BIP34 implementation in the tests (to match the one of the Core codebase) and updates the tests where needed"},"comment":{"url":"https://api.github.com/repos/bitcoin/bitcoin/issues/comments/518213529","html_url":"https://github.com/bitcoin/bitcoin/pull/16333#issuecomment-518213529","issue_url":"https://api.github.com/repos/bitcoin/bitcoin/issues/16333","id":518213529,"node_id":"MDEyOklzc3VlQ29tbWVudDUxODIxMzUyOQ==","user":{"login":"MarcoFalke","id":6399679,"node_id":"MDQ6VXNlcjYzOTk2Nzk=","avatar_url":"https://avatars0.githubusercontent.com/u/6399679?v=4","gravatar_id":"","url":"https://api.github.com/users/MarcoFalke","html_url":"https://github.com/MarcoFalke","followers_url":"https://api.github.com/users/MarcoFalke/followers","following_url":"https://api.github.com/users/MarcoFalke/following{/other_user}","gists_url":"https://api.github.com/users/MarcoFalke/gists{/gist_id}","starred_url":"https://api.github.com/users/MarcoFalke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarcoFalke/subscriptions","organizations_url":"https://api.github.com/users/MarcoFalke/orgs","repos_url":"https://api.github.com/users/MarcoFalke/repos","events_url":"https://api.github.com/users/MarcoFalke/events{/privacy}","received_events_url":"https://api.github.com/users/MarcoFalke/received_events","type":"User","site_admin":false},"created_at":"2019-08-05T12:27:09Z","updated_at":"2019-08-05T12:27:09Z","author_association":"MEMBER","body":"> maybe it might be better to only test BIP34 from block 17 rather than block 2\r\n> If so, could be worth adding assert(globalChainParams->GetConsensus().BIP34Height > 16);\r\n\r\nAdding this assert would break existing test networks such as\r\n* signet\r\nhttps://github.com/bitcoin/bitcoin/blob/542b66b3588c779b21b128c694c2f60ab2a81382/src/chainparams.cpp#L299\r\n* liquid\r\nhttps://github.com/ElementsProject/elements/blob/c67ef2938c7f59ff263c13efe5f87fd0f835c34c/src/chainparams.cpp#L642\r\n\r\nSo I will keep this pull request as-is for now."}}
{"actor":{"display_login":"MarcoFalke"}}