{"action":"created","comment":{"url":"https://api.github.com/repos/zcash/zcash/pulls/comments/62765329","id":62765329,"diff_hunk":"@@ -356,21 +350,23 @@ BOOST_AUTO_TEST_CASE(test_basic_pour_verification)\n         ss >> pourtx_deserialized;\n \n         BOOST_CHECK(pourtx_deserialized == pourtx);\n-        BOOST_CHECK(pourtx_deserialized.Verify(p));\n+        BOOST_CHECK(pourtx_deserialized.Verify(*p, pubKeyHash));\n     }\n \n     {\n         // Ensure that the balance equation is working.\n-        BOOST_CHECK_THROW(CPourTx(p, scriptPubKey, uint256(rt), inputs, outputs, 10, 0), std::invalid_argument);\n-        BOOST_CHECK_THROW(CPourTx(p, scriptPubKey, uint256(rt), inputs, outputs, 0, 10), std::invalid_argument);\n+        BOOST_CHECK_THROW(CPourTx(*p, pubKeyHash, rt, inputs, outputs, 10, 0), std::invalid_argument);\n+        BOOST_CHECK_THROW(CPourTx(*p, pubKeyHash, rt, inputs, outputs, 0, 10), std::invalid_argument);\n     }\n \n     {\n         // Ensure that it won't verify if the root is changed.\n-        auto test = CPourTx(p, scriptPubKey, uint256(rt), inputs, outputs, 0, 0);\n+        auto test = CPourTx(*p, pubKeyHash, rt, inputs, outputs, 0, 0);\n         test.anchor = GetRandHash();\n-        BOOST_CHECK(!test.Verify(p));\n+        BOOST_CHECK(!test.Verify(*p, pubKeyHash));\n     }\n+\n+    delete p;","path":"src/test/transaction_tests.cpp","position":102,"original_position":102,"commit_id":"bcd19b7a4cc71e677f48ef99d69fbd4b70a73189","original_commit_id":"bcd19b7a4cc71e677f48ef99d69fbd4b70a73189","user":{"login":"ebfull","id":3794471,"avatar_url":"https://avatars.githubusercontent.com/u/3794471?v=3","gravatar_id":"","url":"https://api.github.com/users/ebfull","html_url":"https://github.com/ebfull","followers_url":"https://api.github.com/users/ebfull/followers","following_url":"https://api.github.com/users/ebfull/following{/other_user}","gists_url":"https://api.github.com/users/ebfull/gists{/gist_id}","starred_url":"https://api.github.com/users/ebfull/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebfull/subscriptions","organizations_url":"https://api.github.com/users/ebfull/orgs","repos_url":"https://api.github.com/users/ebfull/repos","events_url":"https://api.github.com/users/ebfull/events{/privacy}","received_events_url":"https://api.github.com/users/ebfull/received_events","type":"User","site_admin":false},"body":"For what it's worth, I've considered that `Unopened()` and `Generate()` could return `unique_ptr`s but I'd like to leave that to future work since it infringes somewhat on how those variables are initialized in our daemon.","created_at":"2016-05-10T22:28:46Z","updated_at":"2016-05-10T22:28:46Z","html_url":"https://github.com/zcash/zcash/pull/908#discussion_r62765329","pull_request_url":"https://api.github.com/repos/zcash/zcash/pulls/908","_links":{"self":{"href":"https://api.github.com/repos/zcash/zcash/pulls/comments/62765329"},"html":{"href":"https://github.com/zcash/zcash/pull/908#discussion_r62765329"},"pull_request":{"href":"https://api.github.com/repos/zcash/zcash/pulls/908"}}},"pull_request":{"url":"https://api.github.com/repos/zcash/zcash/pulls/908","id":68766028,"html_url":"https://github.com/zcash/zcash/pull/908","diff_url":"https://github.com/zcash/zcash/pull/908.diff","patch_url":"https://github.com/zcash/zcash/pull/908.patch","issue_url":"https://api.github.com/repos/zcash/zcash/issues/908","number":908,"state":"open","locked":false,"title":"libzcash and new zkSNARK circuit implementation","user":{"login":"ebfull","id":3794471,"avatar_url":"https://avatars.githubusercontent.com/u/3794471?v=3","gravatar_id":"","url":"https://api.github.com/users/ebfull","html_url":"https://github.com/ebfull","followers_url":"https://api.github.com/users/ebfull/followers","following_url":"https://api.github.com/users/ebfull/following{/other_user}","gists_url":"https://api.github.com/users/ebfull/gists{/gist_id}","starred_url":"https://api.github.com/users/ebfull/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebfull/subscriptions","organizations_url":"https://api.github.com/users/ebfull/orgs","repos_url":"https://api.github.com/users/ebfull/repos","events_url":"https://api.github.com/users/ebfull/events{/privacy}","received_events_url":"https://api.github.com/users/ebfull/received_events","type":"User","site_admin":false},"body":"This PR completes [`libzcash`](https://github.com/zcash/zcash/tree/zc.v0.11.2.latest/src/zcash), the implementation of the [Zcash protocol specification](https://github.com/zcash/zips/blob/9bb4410e45394c8b7e43e35622f54dd4041a4ddd/protocol/protocol.pdf) and replacement of [`libzerocash`](https://github.com/Zerocash/libzerocash), our old Zerocash protocol implementation. The new spec comes with some improvements to security and terminology, with minimal differences from the original academic design.\r\n\r\nThis implementation includes:\r\n\r\n* A rewrite of the zkSNARK circuit for `JoinSplit` operations. This rewrite is cleaner, broken up into separate gadgets, easier to audit and review, and fixes some security bugs. (Closes #822, Closes #809, Closes #500, Closes #854)\r\n* A minimal API for interacting with `JoinSplit`s and surrounding primitives. This PR removes almost twice as much code as it introduces. (Closes #877, Closes #315, Closes #824, Closes #798, Closes #707, Closes #512, Closes #247, Closes #128, Closes #514)\r\n\r\n-----\r\n\r\n**TODO**\r\n\r\n- [x] This will not pass buildbot's tests because the zerocash tests are removed. Once #905 lands those tests will be part of the `full-test-suite` and can be removed by this PR with a rebase. (I will also need to change the `performance-measurements` raw transaction.)\r\n- [x] This will not pass buildbot's tests because the circuit has changed. I will generate and upload the new parameters.\r\n- [x] This does not contain targeted internal circuit tests, and I'm not 100% sure if those are a good idea to mix in this PR or not. (I've decided to split this out into #920.)\r\n- [ ] Add test vectors for `h_sig`.","created_at":"2016-05-03T20:04:17Z","updated_at":"2016-05-10T22:28:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"264f46fd8be9b9335a71b954d3a9898e73382895","assignee":null,"milestone":{"url":"https://api.github.com/repos/zcash/zcash/milestones/32","html_url":"https://github.com/zcash/zcash/milestones/Protocol%202.0-alpha-9bb4410%20Implementation","labels_url":"https://api.github.com/repos/zcash/zcash/milestones/32/labels","id":1687731,"number":32,"title":"Protocol 2.0-alpha-9bb4410 Implementation","description":"","creator":{"login":"nathan-at-least","id":4369700,"avatar_url":"https://avatars.githubusercontent.com/u/4369700?v=3","gravatar_id":"","url":"https://api.github.com/users/nathan-at-least","html_url":"https://github.com/nathan-at-least","followers_url":"https://api.github.com/users/nathan-at-least/followers","following_url":"https://api.github.com/users/nathan-at-least/following{/other_user}","gists_url":"https://api.github.com/users/nathan-at-least/gists{/gist_id}","starred_url":"https://api.github.com/users/nathan-at-least/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathan-at-least/subscriptions","organizations_url":"https://api.github.com/users/nathan-at-least/orgs","repos_url":"https://api.github.com/users/nathan-at-least/repos","events_url":"https://api.github.com/users/nathan-at-least/events{/privacy}","received_events_url":"https://api.github.com/users/nathan-at-least/received_events","type":"User","site_admin":false},"open_issues":14,"closed_issues":7,"state":"open","created_at":"2016-04-06T16:28:28Z","updated_at":"2016-05-09T20:38:06Z","due_on":"2016-05-09T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/zcash/zcash/pulls/908/commits","review_comments_url":"https://api.github.com/repos/zcash/zcash/pulls/908/comments","review_comment_url":"https://api.github.com/repos/zcash/zcash/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zcash/zcash/issues/908/comments","statuses_url":"https://api.github.com/repos/zcash/zcash/statuses/bcd19b7a4cc71e677f48ef99d69fbd4b70a73189","head":{"label":"ebfull:trafford","ref":"trafford","sha":"bcd19b7a4cc71e677f48ef99d69fbd4b70a73189","user":{"login":"ebfull","id":3794471,"avatar_url":"https://avatars.githubusercontent.com/u/3794471?v=3","gravatar_id":"","url":"https://api.github.com/users/ebfull","html_url":"https://github.com/ebfull","followers_url":"https://api.github.com/users/ebfull/followers","following_url":"https://api.github.com/users/ebfull/following{/other_user}","gists_url":"https://api.github.com/users/ebfull/gists{/gist_id}","starred_url":"https://api.github.com/users/ebfull/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebfull/subscriptions","organizations_url":"https://api.github.com/users/ebfull/orgs","repos_url":"https://api.github.com/users/ebfull/repos","events_url":"https://api.github.com/users/ebfull/events{/privacy}","received_events_url":"https://api.github.com/users/ebfull/received_events","type":"User","site_admin":false},"repo":{"id":52047666,"name":"zcash","full_name":"ebfull/zcash","owner":{"login":"ebfull","id":3794471,"avatar_url":"https://avatars.githubusercontent.com/u/3794471?v=3","gravatar_id":"","url":"https://api.github.com/users/ebfull","html_url":"https://github.com/ebfull","followers_url":"https://api.github.com/users/ebfull/followers","following_url":"https://api.github.com/users/ebfull/following{/other_user}","gists_url":"https://api.github.com/users/ebfull/gists{/gist_id}","starred_url":"https://api.github.com/users/ebfull/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebfull/subscriptions","organizations_url":"https://api.github.com/users/ebfull/orgs","repos_url":"https://api.github.com/users/ebfull/repos","events_url":"https://api.github.com/users/ebfull/events{/privacy}","received_events_url":"https://api.github.com/users/ebfull/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ebfull/zcash","description":"zcash","fork":true,"url":"https://api.github.com/repos/ebfull/zcash","forks_url":"https://api.github.com/repos/ebfull/zcash/forks","keys_url":"https://api.github.com/repos/ebfull/zcash/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ebfull/zcash/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ebfull/zcash/teams","hooks_url":"https://api.github.com/repos/ebfull/zcash/hooks","issue_events_url":"https://api.github.com/repos/ebfull/zcash/issues/events{/number}","events_url":"https://api.github.com/repos/ebfull/zcash/events","assignees_url":"https://api.github.com/repos/ebfull/zcash/assignees{/user}","branches_url":"https://api.github.com/repos/ebfull/zcash/branches{/branch}","tags_url":"https://api.github.com/repos/ebfull/zcash/tags","blobs_url":"https://api.github.com/repos/ebfull/zcash/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ebfull/zcash/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ebfull/zcash/git/refs{/sha}","trees_url":"https://api.github.com/repos/ebfull/zcash/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ebfull/zcash/statuses/{sha}","languages_url":"https://api.github.com/repos/ebfull/zcash/languages","stargazers_url":"https://api.github.com/repos/ebfull/zcash/stargazers","contributors_url":"https://api.github.com/repos/ebfull/zcash/contributors","subscribers_url":"https://api.github.com/repos/ebfull/zcash/subscribers","subscription_url":"https://api.github.com/repos/ebfull/zcash/subscription","commits_url":"https://api.github.com/repos/ebfull/zcash/commits{/sha}","git_commits_url":"https://api.github.com/repos/ebfull/zcash/git/commits{/sha}","comments_url":"https://api.github.com/repos/ebfull/zcash/comments{/number}","issue_comment_url":"https://api.github.com/repos/ebfull/zcash/issues/comments{/number}","contents_url":"https://api.github.com/repos/ebfull/zcash/contents/{+path}","compare_url":"https://api.github.com/repos/ebfull/zcash/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ebfull/zcash/merges","archive_url":"https://api.github.com/repos/ebfull/zcash/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ebfull/zcash/downloads","issues_url":"https://api.github.com/repos/ebfull/zcash/issues{/number}","pulls_url":"https://api.github.com/repos/ebfull/zcash/pulls{/number}","milestones_url":"https://api.github.com/repos/ebfull/zcash/milestones{/number}","notifications_url":"https://api.github.com/repos/ebfull/zcash/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ebfull/zcash/labels{/name}","releases_url":"https://api.github.com/repos/ebfull/zcash/releases{/id}","deployments_url":"https://api.github.com/repos/ebfull/zcash/deployments","created_at":"2016-02-18T23:50:56Z","updated_at":"2016-02-18T23:50:59Z","pushed_at":"2016-05-07T23:51:09Z","git_url":"git://github.com/ebfull/zcash.git","ssh_url":"git@github.com:ebfull/zcash.git","clone_url":"https://github.com/ebfull/zcash.git","svn_url":"https://github.com/ebfull/zcash","homepage":"https://z.cash/","size":37902,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"zc.v0.11.2.latest"}},"base":{"label":"zcash:zc.v0.11.2.latest","ref":"zc.v0.11.2.latest","sha":"c9a2eea5e22dee713850329745538f2ce9207dce","user":{"login":"zcash","id":16122764,"avatar_url":"https://avatars.githubusercontent.com/u/16122764?v=3","gravatar_id":"","url":"https://api.github.com/users/zcash","html_url":"https://github.com/zcash","followers_url":"https://api.github.com/users/zcash/followers","following_url":"https://api.github.com/users/zcash/following{/other_user}","gists_url":"https://api.github.com/users/zcash/gists{/gist_id}","starred_url":"https://api.github.com/users/zcash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zcash/subscriptions","organizations_url":"https://api.github.com/users/zcash/orgs","repos_url":"https://api.github.com/users/zcash/repos","events_url":"https://api.github.com/users/zcash/events{/privacy}","received_events_url":"https://api.github.com/users/zcash/received_events","type":"Organization","site_admin":false},"repo":{"id":26987049,"name":"zcash","full_name":"zcash/zcash","owner":{"login":"zcash","id":16122764,"avatar_url":"https://avatars.githubusercontent.com/u/16122764?v=3","gravatar_id":"","url":"https://api.github.com/users/zcash","html_url":"https://github.com/zcash","followers_url":"https://api.github.com/users/zcash/followers","following_url":"https://api.github.com/users/zcash/following{/other_user}","gists_url":"https://api.github.com/users/zcash/gists{/gist_id}","starred_url":"https://api.github.com/users/zcash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zcash/subscriptions","organizations_url":"https://api.github.com/users/zcash/orgs","repos_url":"https://api.github.com/users/zcash/repos","events_url":"https://api.github.com/users/zcash/events{/privacy}","received_events_url":"https://api.github.com/users/zcash/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zcash/zcash","description":"zcash","fork":false,"url":"https://api.github.com/repos/zcash/zcash","forks_url":"https://api.github.com/repos/zcash/zcash/forks","keys_url":"https://api.github.com/repos/zcash/zcash/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zcash/zcash/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zcash/zcash/teams","hooks_url":"https://api.github.com/repos/zcash/zcash/hooks","issue_events_url":"https://api.github.com/repos/zcash/zcash/issues/events{/number}","events_url":"https://api.github.com/repos/zcash/zcash/events","assignees_url":"https://api.github.com/repos/zcash/zcash/assignees{/user}","branches_url":"https://api.github.com/repos/zcash/zcash/branches{/branch}","tags_url":"https://api.github.com/repos/zcash/zcash/tags","blobs_url":"https://api.github.com/repos/zcash/zcash/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zcash/zcash/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zcash/zcash/git/refs{/sha}","trees_url":"https://api.github.com/repos/zcash/zcash/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zcash/zcash/statuses/{sha}","languages_url":"https://api.github.com/repos/zcash/zcash/languages","stargazers_url":"https://api.github.com/repos/zcash/zcash/stargazers","contributors_url":"https://api.github.com/repos/zcash/zcash/contributors","subscribers_url":"https://api.github.com/repos/zcash/zcash/subscribers","subscription_url":"https://api.github.com/repos/zcash/zcash/subscription","commits_url":"https://api.github.com/repos/zcash/zcash/commits{/sha}","git_commits_url":"https://api.github.com/repos/zcash/zcash/git/commits{/sha}","comments_url":"https://api.github.com/repos/zcash/zcash/comments{/number}","issue_comment_url":"https://api.github.com/repos/zcash/zcash/issues/comments{/number}","contents_url":"https://api.github.com/repos/zcash/zcash/contents/{+path}","compare_url":"https://api.github.com/repos/zcash/zcash/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zcash/zcash/merges","archive_url":"https://api.github.com/repos/zcash/zcash/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zcash/zcash/downloads","issues_url":"https://api.github.com/repos/zcash/zcash/issues{/number}","pulls_url":"https://api.github.com/repos/zcash/zcash/pulls{/number}","milestones_url":"https://api.github.com/repos/zcash/zcash/milestones{/number}","notifications_url":"https://api.github.com/repos/zcash/zcash/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zcash/zcash/labels{/name}","releases_url":"https://api.github.com/repos/zcash/zcash/releases{/id}","deployments_url":"https://api.github.com/repos/zcash/zcash/deployments","created_at":"2014-11-22T03:13:10Z","updated_at":"2016-05-10T02:50:20Z","pushed_at":"2016-05-10T14:27:24Z","git_url":"git://github.com/zcash/zcash.git","ssh_url":"git@github.com:zcash/zcash.git","clone_url":"https://github.com/zcash/zcash.git","svn_url":"https://github.com/zcash/zcash","homepage":"https://z.cash/","size":42700,"stargazers_count":700,"watchers_count":700,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":71,"mirror_url":null,"open_issues_count":318,"forks":71,"open_issues":318,"watchers":700,"default_branch":"zc.v0.11.2.latest"}},"_links":{"self":{"href":"https://api.github.com/repos/zcash/zcash/pulls/908"},"html":{"href":"https://github.com/zcash/zcash/pull/908"},"issue":{"href":"https://api.github.com/repos/zcash/zcash/issues/908"},"comments":{"href":"https://api.github.com/repos/zcash/zcash/issues/908/comments"},"review_comments":{"href":"https://api.github.com/repos/zcash/zcash/pulls/908/comments"},"review_comment":{"href":"https://api.github.com/repos/zcash/zcash/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zcash/zcash/pulls/908/commits"},"statuses":{"href":"https://api.github.com/repos/zcash/zcash/statuses/bcd19b7a4cc71e677f48ef99d69fbd4b70a73189"}}}}