{"action":"created","comment":{"url":"https://api.github.com/repos/coniks-sys/coniks-go/pulls/comments/71889985","id":71889985,"diff_hunk":"@@ -114,8 +114,9 @@ func (pad *PAD) GetSTR(epoch uint64) *SignedTreeRoot {\n func (pad *PAD) TB(key string, value []byte) (*TemporaryBinding, error) {\n \t//FIXME: compute private index twice\n \t//it would be refactored after merging VRF integration branch\n-\tindex, _ := pad.computePrivateIndex(key)\n-\ttb := pad.currentSTR.sig\n+\tcStr := pad.currentSTR","path":"merkletree/pad.go","position":null,"original_position":40,"commit_id":"75d649c8daeda4d82e3c7532db7973a5aa253a33","original_commit_id":"75d649c8daeda4d82e3c7532db7973a5aa253a33","user":{"login":"Liamsi","id":7441766,"avatar_url":"https://avatars.githubusercontent.com/u/7441766?v=3","gravatar_id":"","url":"https://api.github.com/users/Liamsi","html_url":"https://github.com/Liamsi","followers_url":"https://api.github.com/users/Liamsi/followers","following_url":"https://api.github.com/users/Liamsi/following{/other_user}","gists_url":"https://api.github.com/users/Liamsi/gists{/gist_id}","starred_url":"https://api.github.com/users/Liamsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Liamsi/subscriptions","organizations_url":"https://api.github.com/users/Liamsi/orgs","repos_url":"https://api.github.com/users/Liamsi/repos","events_url":"https://api.github.com/users/Liamsi/events{/privacy}","received_events_url":"https://api.github.com/users/Liamsi/received_events","type":"User","site_admin":false},"body":"> Currently, when you call pad.Update(policies) it generates the next STR as if the passed in policies were the ones being used. But, if the private key changes, all these temporary bindings being handed out no longer have the right index.\r\n\r\nMakes sense. Will change that.\r\n\r\n> I think PAD needs a policies field reflecting the current policies in place. currentSTR may \r\n\r\nOK, I have to think about that (after the talks/program finished). But on first sight it makes sense to add a policies field to `PAD`.  \r\n\r\n> currentSTR may be badly named in that it is really just the most recently signed tree root, whereas pad.tree is what's current and will be reflected in the next STR. \r\n\r\nWhat do you think about `lastSTR` or `latestSTR`?\r\n\r\n> Then, when you call Update(policies), it should generate the STR with the policies that were actually used (pad.policies), and then swap the pad.policies with the ones being passed in to be used going forward. It can then reshuffle the pad.tree if the private key changed.\r\n\r\n> Hopefully that makes sense.\r\n\r\nSounds reasonable. ","created_at":"2016-07-22T14:43:36Z","updated_at":"2016-07-22T14:43:37Z","html_url":"https://github.com/coniks-sys/coniks-go/pull/19#discussion_r71889985","pull_request_url":"https://api.github.com/repos/coniks-sys/coniks-go/pulls/19","_links":{"self":{"href":"https://api.github.com/repos/coniks-sys/coniks-go/pulls/comments/71889985"},"html":{"href":"https://github.com/coniks-sys/coniks-go/pull/19#discussion_r71889985"},"pull_request":{"href":"https://api.github.com/repos/coniks-sys/coniks-go/pulls/19"}}},"pull_request":{"url":"https://api.github.com/repos/coniks-sys/coniks-go/pulls/19","id":77619896,"html_url":"https://github.com/coniks-sys/coniks-go/pull/19","diff_url":"https://github.com/coniks-sys/coniks-go/pull/19.diff","patch_url":"https://github.com/coniks-sys/coniks-go/pull/19.patch","issue_url":"https://api.github.com/repos/coniks-sys/coniks-go/issues/19","number":19,"state":"open","locked":false,"title":"Vrf integration","user":{"login":"Liamsi","id":7441766,"avatar_url":"https://avatars.githubusercontent.com/u/7441766?v=3","gravatar_id":"","url":"https://api.github.com/users/Liamsi","html_url":"https://github.com/Liamsi","followers_url":"https://api.github.com/users/Liamsi/followers","following_url":"https://api.github.com/users/Liamsi/following{/other_user}","gists_url":"https://api.github.com/users/Liamsi/gists{/gist_id}","starred_url":"https://api.github.com/users/Liamsi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Liamsi/subscriptions","organizations_url":"https://api.github.com/users/Liamsi/orgs","repos_url":"https://api.github.com/users/Liamsi/repos","events_url":"https://api.github.com/users/Liamsi/events{/privacy}","received_events_url":"https://api.github.com/users/Liamsi/received_events","type":"User","site_admin":false},"body":"Use coname's vrf implementation to compute the private index\r\n- Should resolve #14 \r\n- commented out parts of a test which is supposed to work with a specific hash (but not with vrf); might be changed with #16 and #18\r\n- replaced `t.Error` in combination with `return` with `t.Fatal`","created_at":"2016-07-15T13:59:34Z","updated_at":"2016-07-22T14:43:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"82aa16965b9431b062c6f374b53e7a912ab14ecd","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/coniks-sys/coniks-go/pulls/19/commits","review_comments_url":"https://api.github.com/repos/coniks-sys/coniks-go/pulls/19/comments","review_comment_url":"https://api.github.com/repos/coniks-sys/coniks-go/pulls/comments{/number}","comments_url":"https://api.github.com/repos/coniks-sys/coniks-go/issues/19/comments","statuses_url":"https://api.github.com/repos/coniks-sys/coniks-go/statuses/75d649c8daeda4d82e3c7532db7973a5aa253a33","head":{"label":"coniks-sys:vrf_integration","ref":"vrf_integration","sha":"75d649c8daeda4d82e3c7532db7973a5aa253a33","user":{"login":"coniks-sys","id":11236504,"avatar_url":"https://avatars.githubusercontent.com/u/11236504?v=3","gravatar_id":"","url":"https://api.github.com/users/coniks-sys","html_url":"https://github.com/coniks-sys","followers_url":"https://api.github.com/users/coniks-sys/followers","following_url":"https://api.github.com/users/coniks-sys/following{/other_user}","gists_url":"https://api.github.com/users/coniks-sys/gists{/gist_id}","starred_url":"https://api.github.com/users/coniks-sys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coniks-sys/subscriptions","organizations_url":"https://api.github.com/users/coniks-sys/orgs","repos_url":"https://api.github.com/users/coniks-sys/repos","events_url":"https://api.github.com/users/coniks-sys/events{/privacy}","received_events_url":"https://api.github.com/users/coniks-sys/received_events","type":"Organization","site_admin":false},"repo":{"id":60117979,"name":"coniks-go","full_name":"coniks-sys/coniks-go","owner":{"login":"coniks-sys","id":11236504,"avatar_url":"https://avatars.githubusercontent.com/u/11236504?v=3","gravatar_id":"","url":"https://api.github.com/users/coniks-sys","html_url":"https://github.com/coniks-sys","followers_url":"https://api.github.com/users/coniks-sys/followers","following_url":"https://api.github.com/users/coniks-sys/following{/other_user}","gists_url":"https://api.github.com/users/coniks-sys/gists{/gist_id}","starred_url":"https://api.github.com/users/coniks-sys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coniks-sys/subscriptions","organizations_url":"https://api.github.com/users/coniks-sys/orgs","repos_url":"https://api.github.com/users/coniks-sys/repos","events_url":"https://api.github.com/users/coniks-sys/events{/privacy}","received_events_url":"https://api.github.com/users/coniks-sys/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/coniks-sys/coniks-go","description":"A CONIKS implementation in Golang","fork":false,"url":"https://api.github.com/repos/coniks-sys/coniks-go","forks_url":"https://api.github.com/repos/coniks-sys/coniks-go/forks","keys_url":"https://api.github.com/repos/coniks-sys/coniks-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coniks-sys/coniks-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coniks-sys/coniks-go/teams","hooks_url":"https://api.github.com/repos/coniks-sys/coniks-go/hooks","issue_events_url":"https://api.github.com/repos/coniks-sys/coniks-go/issues/events{/number}","events_url":"https://api.github.com/repos/coniks-sys/coniks-go/events","assignees_url":"https://api.github.com/repos/coniks-sys/coniks-go/assignees{/user}","branches_url":"https://api.github.com/repos/coniks-sys/coniks-go/branches{/branch}","tags_url":"https://api.github.com/repos/coniks-sys/coniks-go/tags","blobs_url":"https://api.github.com/repos/coniks-sys/coniks-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coniks-sys/coniks-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coniks-sys/coniks-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/coniks-sys/coniks-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coniks-sys/coniks-go/statuses/{sha}","languages_url":"https://api.github.com/repos/coniks-sys/coniks-go/languages","stargazers_url":"https://api.github.com/repos/coniks-sys/coniks-go/stargazers","contributors_url":"https://api.github.com/repos/coniks-sys/coniks-go/contributors","subscribers_url":"https://api.github.com/repos/coniks-sys/coniks-go/subscribers","subscription_url":"https://api.github.com/repos/coniks-sys/coniks-go/subscription","commits_url":"https://api.github.com/repos/coniks-sys/coniks-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/coniks-sys/coniks-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/coniks-sys/coniks-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/coniks-sys/coniks-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/coniks-sys/coniks-go/contents/{+path}","compare_url":"https://api.github.com/repos/coniks-sys/coniks-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coniks-sys/coniks-go/merges","archive_url":"https://api.github.com/repos/coniks-sys/coniks-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coniks-sys/coniks-go/downloads","issues_url":"https://api.github.com/repos/coniks-sys/coniks-go/issues{/number}","pulls_url":"https://api.github.com/repos/coniks-sys/coniks-go/pulls{/number}","milestones_url":"https://api.github.com/repos/coniks-sys/coniks-go/milestones{/number}","notifications_url":"https://api.github.com/repos/coniks-sys/coniks-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coniks-sys/coniks-go/labels{/name}","releases_url":"https://api.github.com/repos/coniks-sys/coniks-go/releases{/id}","deployments_url":"https://api.github.com/repos/coniks-sys/coniks-go/deployments","created_at":"2016-05-31T19:37:35Z","updated_at":"2016-07-22T01:15:08Z","pushed_at":"2016-07-22T10:24:27Z","git_url":"git://github.com/coniks-sys/coniks-go.git","ssh_url":"git@github.com:coniks-sys/coniks-go.git","clone_url":"https://github.com/coniks-sys/coniks-go.git","svn_url":"https://github.com/coniks-sys/coniks-go","homepage":"","size":217,"stargazers_count":6,"watchers_count":6,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":15,"forks":0,"open_issues":15,"watchers":6,"default_branch":"master"}},"base":{"label":"coniks-sys:master","ref":"master","sha":"ae15fa391144906fe241c77a88acb49defb3ba57","user":{"login":"coniks-sys","id":11236504,"avatar_url":"https://avatars.githubusercontent.com/u/11236504?v=3","gravatar_id":"","url":"https://api.github.com/users/coniks-sys","html_url":"https://github.com/coniks-sys","followers_url":"https://api.github.com/users/coniks-sys/followers","following_url":"https://api.github.com/users/coniks-sys/following{/other_user}","gists_url":"https://api.github.com/users/coniks-sys/gists{/gist_id}","starred_url":"https://api.github.com/users/coniks-sys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coniks-sys/subscriptions","organizations_url":"https://api.github.com/users/coniks-sys/orgs","repos_url":"https://api.github.com/users/coniks-sys/repos","events_url":"https://api.github.com/users/coniks-sys/events{/privacy}","received_events_url":"https://api.github.com/users/coniks-sys/received_events","type":"Organization","site_admin":false},"repo":{"id":60117979,"name":"coniks-go","full_name":"coniks-sys/coniks-go","owner":{"login":"coniks-sys","id":11236504,"avatar_url":"https://avatars.githubusercontent.com/u/11236504?v=3","gravatar_id":"","url":"https://api.github.com/users/coniks-sys","html_url":"https://github.com/coniks-sys","followers_url":"https://api.github.com/users/coniks-sys/followers","following_url":"https://api.github.com/users/coniks-sys/following{/other_user}","gists_url":"https://api.github.com/users/coniks-sys/gists{/gist_id}","starred_url":"https://api.github.com/users/coniks-sys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coniks-sys/subscriptions","organizations_url":"https://api.github.com/users/coniks-sys/orgs","repos_url":"https://api.github.com/users/coniks-sys/repos","events_url":"https://api.github.com/users/coniks-sys/events{/privacy}","received_events_url":"https://api.github.com/users/coniks-sys/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/coniks-sys/coniks-go","description":"A CONIKS implementation in Golang","fork":false,"url":"https://api.github.com/repos/coniks-sys/coniks-go","forks_url":"https://api.github.com/repos/coniks-sys/coniks-go/forks","keys_url":"https://api.github.com/repos/coniks-sys/coniks-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coniks-sys/coniks-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coniks-sys/coniks-go/teams","hooks_url":"https://api.github.com/repos/coniks-sys/coniks-go/hooks","issue_events_url":"https://api.github.com/repos/coniks-sys/coniks-go/issues/events{/number}","events_url":"https://api.github.com/repos/coniks-sys/coniks-go/events","assignees_url":"https://api.github.com/repos/coniks-sys/coniks-go/assignees{/user}","branches_url":"https://api.github.com/repos/coniks-sys/coniks-go/branches{/branch}","tags_url":"https://api.github.com/repos/coniks-sys/coniks-go/tags","blobs_url":"https://api.github.com/repos/coniks-sys/coniks-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coniks-sys/coniks-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coniks-sys/coniks-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/coniks-sys/coniks-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coniks-sys/coniks-go/statuses/{sha}","languages_url":"https://api.github.com/repos/coniks-sys/coniks-go/languages","stargazers_url":"https://api.github.com/repos/coniks-sys/coniks-go/stargazers","contributors_url":"https://api.github.com/repos/coniks-sys/coniks-go/contributors","subscribers_url":"https://api.github.com/repos/coniks-sys/coniks-go/subscribers","subscription_url":"https://api.github.com/repos/coniks-sys/coniks-go/subscription","commits_url":"https://api.github.com/repos/coniks-sys/coniks-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/coniks-sys/coniks-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/coniks-sys/coniks-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/coniks-sys/coniks-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/coniks-sys/coniks-go/contents/{+path}","compare_url":"https://api.github.com/repos/coniks-sys/coniks-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coniks-sys/coniks-go/merges","archive_url":"https://api.github.com/repos/coniks-sys/coniks-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coniks-sys/coniks-go/downloads","issues_url":"https://api.github.com/repos/coniks-sys/coniks-go/issues{/number}","pulls_url":"https://api.github.com/repos/coniks-sys/coniks-go/pulls{/number}","milestones_url":"https://api.github.com/repos/coniks-sys/coniks-go/milestones{/number}","notifications_url":"https://api.github.com/repos/coniks-sys/coniks-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coniks-sys/coniks-go/labels{/name}","releases_url":"https://api.github.com/repos/coniks-sys/coniks-go/releases{/id}","deployments_url":"https://api.github.com/repos/coniks-sys/coniks-go/deployments","created_at":"2016-05-31T19:37:35Z","updated_at":"2016-07-22T01:15:08Z","pushed_at":"2016-07-22T10:24:27Z","git_url":"git://github.com/coniks-sys/coniks-go.git","ssh_url":"git@github.com:coniks-sys/coniks-go.git","clone_url":"https://github.com/coniks-sys/coniks-go.git","svn_url":"https://github.com/coniks-sys/coniks-go","homepage":"","size":217,"stargazers_count":6,"watchers_count":6,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":15,"forks":0,"open_issues":15,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/coniks-sys/coniks-go/pulls/19"},"html":{"href":"https://github.com/coniks-sys/coniks-go/pull/19"},"issue":{"href":"https://api.github.com/repos/coniks-sys/coniks-go/issues/19"},"comments":{"href":"https://api.github.com/repos/coniks-sys/coniks-go/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/coniks-sys/coniks-go/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/coniks-sys/coniks-go/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/coniks-sys/coniks-go/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/coniks-sys/coniks-go/statuses/75d649c8daeda4d82e3c7532db7973a5aa253a33"}}}}
{"actor":{"display_login":"Liamsi"}}