{"action":"created","comment":{"url":"https://api.github.com/repos/google/certificate-transparency/pulls/comments/23010588","id":23010588,"diff_hunk":"@@ -0,0 +1,290 @@\n+#include \"log/cluster_state_controller.h\"\n+\n+#include <gtest/gtest.h>\n+#include <map>\n+#include <memory>\n+#include <string>\n+#include <thread>\n+\n+#include \"log/logged_certificate.h\"\n+#include \"proto/ct.pb.h\"\n+#include \"util/fake_etcd.h\"\n+#include \"util/libevent_wrapper.h\"\n+#include \"util/mock_masterelection.h\"\n+#include \"util/testing.h\"\n+#include \"util/util.h\"\n+\n+using ct::ClusterNodeState;\n+using ct::SignedTreeHead;\n+using std::make_shared;\n+using std::shared_ptr;\n+using std::string;\n+using testing::Return;\n+using testing::NiceMock;\n+\n+namespace cert_trans {\n+\n+const char kNodeId1[] = \"node1\";\n+const char kNodeId2[] = \"node2\";\n+const char kNodeId3[] = \"node3\";\n+\n+\n+class ClusterStateControllerTest : public ::testing::Test {\n+ public:\n+  ClusterStateControllerTest()\n+      : pool_(2),\n+        base_(make_shared<libevent::Base>()),\n+        pump_(base_),\n+        etcd_(base_),\n+        store_(new EtcdConsistentStore<LoggedCertificate>(&pool_, &etcd_, \"\",\n+                                                          kNodeId1)),\n+        store2_(new EtcdConsistentStore<LoggedCertificate>(&pool_, &etcd_, \"\",\n+                                                           kNodeId2)),\n+        store3_(new EtcdConsistentStore<LoggedCertificate>(&pool_, &etcd_, \"\",\n+                                                           kNodeId3)),\n+        controller_(&pool_, store_.get(), election_, 1, 1) {\n+    // Set up some handy STHs\n+    sth100_.set_tree_size(100);\n+    sth100_.set_timestamp(100);\n+    sth200_.set_tree_size(200);\n+    sth200_.set_timestamp(200);\n+    sth300_.set_tree_size(300);\n+    sth300_.set_timestamp(300);\n+    cns100_.mutable_newest_sth()->CopyFrom(sth100_);\n+    cns200_.mutable_newest_sth()->CopyFrom(sth200_);\n+    cns300_.mutable_newest_sth()->CopyFrom(sth300_);\n+\n+    ON_CALL(election_, IsMaster()).WillByDefault(Return(false));\n+  }\n+\n+ protected:\n+  ct::ClusterNodeState GetLocalState() {\n+    return controller_.local_node_state_;\n+  }\n+\n+  ct::ClusterNodeState GetNodeStateView(const string& node_id) {\n+    auto it(controller_.all_node_states_.find(node_id));\n+    CHECK(it != controller_.all_node_states_.end());\n+    return it->second;\n+  }\n+\n+  SignedTreeHead sth100_, sth200_, sth300_;\n+  ClusterNodeState cns100_, cns200_, cns300_;\n+\n+  ThreadPool pool_;\n+  shared_ptr<libevent::Base> base_;\n+  libevent::EventPumpThread pump_;\n+  FakeEtcdClient etcd_;\n+  std::unique_ptr<EtcdConsistentStore<LoggedCertificate>> store_;\n+  std::unique_ptr<EtcdConsistentStore<LoggedCertificate>> store2_;\n+  std::unique_ptr<EtcdConsistentStore<LoggedCertificate>> store3_;\n+  NiceMock<MockMasterElection> election_;\n+  ClusterStateController<LoggedCertificate> controller_;\n+};\n+\n+\n+typedef class EtcdConsistentStoreTest EtcdConsistentStoreDeathTest;\n+\n+\n+TEST_F(ClusterStateControllerTest, TestNewTreeHead) {\n+  ct::SignedTreeHead sth;\n+  sth.set_tree_size(234);\n+  controller_.NewTreeHead(sth);\n+  EXPECT_EQ(sth.DebugString(), GetLocalState().newest_sth().DebugString());\n+}\n+\n+\n+TEST_F(ClusterStateControllerTest, TestContiguousTreeSizeUpdated) {\n+  const int kNewTreeSize(2345);\n+  controller_.ContiguousTreeSizeUpdated(kNewTreeSize);\n+  EXPECT_EQ(kNewTreeSize, GetLocalState().contiguous_tree_size());\n+}\n+\n+\n+TEST_F(ClusterStateControllerTest, TestCalculateServingSTHAt50Percent) {\n+  MockMasterElection election_is_master;\n+  EXPECT_CALL(election_is_master, IsMaster()).WillRepeatedly(Return(true));\n+  ClusterStateController<LoggedCertificate> controller50(&pool_, store_.get(),\n+                                                         election_is_master, 0,\n+                                                         0.5);\n+  store_->SetClusterNodeState(cns100_);\n+  sleep(1);\n+  SignedTreeHead sth;\n+  // Can serve sth1 because all nodes have it !\n+  EXPECT_TRUE(controller50.GetCalculatedServingSTH(&sth));\n+  EXPECT_EQ(sth100_.tree_size(), sth.tree_size());\n+\n+  store2_->SetClusterNodeState(cns200_);\n+  sleep(1);\n+  // Can serve sth2 because 50% of nodes have it\n+  EXPECT_TRUE(controller50.GetCalculatedServingSTH(&sth));\n+  EXPECT_EQ(sth200_.tree_size(), sth.tree_size());\n+\n+  store3_->SetClusterNodeState(cns300_);\n+  sleep(1);\n+  // Can serve sth2 because 66% of nodes have it (or higher)\n+  // Can't serve sth3 because only 33% of nodes cover it.\n+  EXPECT_TRUE(controller50.GetCalculatedServingSTH(&sth));\n+  EXPECT_EQ(sth200_.tree_size(), sth.tree_size());\n+}\n+\n+\n+TEST_F(ClusterStateControllerTest, TestCalculateServingSTHAt70Percent) {\n+  MockMasterElection election_is_master;\n+  EXPECT_CALL(election_is_master, IsMaster()).WillRepeatedly(Return(true));\n+  ClusterStateController<LoggedCertificate> controller70(&pool_, store_.get(),\n+                                                         election_is_master, 0,\n+                                                         0.7);\n+  store_->SetClusterNodeState(cns100_);\n+  sleep(1);\n+  SignedTreeHead sth;\n+  // Can serve sth1 because all nodes have it !\n+  EXPECT_TRUE(controller70.GetCalculatedServingSTH(&sth));\n+  EXPECT_EQ(sth100_.tree_size(), sth.tree_size());\n+\n+  store2_->SetClusterNodeState(cns200_);\n+  sleep(1);\n+  // Can still only serve sth1 because only 50% of nodes have sth2\n+  EXPECT_TRUE(controller70.GetCalculatedServingSTH(&sth));\n+  EXPECT_EQ(sth100_.tree_size(), sth.tree_size());\n+\n+  store3_->SetClusterNodeState(cns300_);\n+  sleep(1);\n+  // Can still only serve sth1 because only 66% of nodes have sth2\n+  EXPECT_TRUE(controller70.GetCalculatedServingSTH(&sth));\n+  EXPECT_EQ(sth100_.tree_size(), sth.tree_size());\n+}\n+\n+\n+TEST_F(ClusterStateControllerTest,\n+       TestCalculateServingSTHAt60PercentTwoNodeMin) {\n+  MockMasterElection election_is_master;\n+  EXPECT_CALL(election_is_master, IsMaster()).WillRepeatedly(Return(true));\n+  ClusterStateController<LoggedCertificate> controller60(&pool_, store_.get(),\n+                                                         election_is_master, 2,\n+                                                         0.6);\n+  store_->SetClusterNodeState(cns100_);\n+  sleep(1);\n+  SignedTreeHead sth;\n+  // Can't serve at all because not enough nodes\n+  EXPECT_FALSE(controller60.GetCalculatedServingSTH(&sth));\n+\n+  store2_->SetClusterNodeState(cns200_);\n+  sleep(1);\n+  // Can serve sth1 because there are two nodes, but < 60% coverage for sth2\n+  EXPECT_TRUE(controller60.GetCalculatedServingSTH(&sth));\n+  EXPECT_EQ(sth100_.tree_size(), sth.tree_size());\n+\n+  store3_->SetClusterNodeState(cns300_);\n+  sleep(1);\n+  EXPECT_TRUE(controller60.GetCalculatedServingSTH(&sth));\n+  // Can serve sth2 because there are two out of three nodes with sth2 or above\n+  EXPECT_EQ(sth200_.tree_size(), sth.tree_size());\n+}\n+\n+\n+TEST_F(ClusterStateControllerTest, TestCalculateServingSTHAsClusterMoves) {\n+  MockMasterElection election_is_master;\n+  EXPECT_CALL(election_is_master, IsMaster()).WillRepeatedly(Return(true));\n+  ClusterStateController<LoggedCertificate> controller50(&pool_, store_.get(),\n+                                                         election_is_master, 0,\n+                                                         0.5);\n+  store_->SetClusterNodeState(cns100_);\n+  store2_->SetClusterNodeState(cns100_);\n+  store3_->SetClusterNodeState(cns100_);\n+  sleep(1);\n+  SignedTreeHead sth;\n+  EXPECT_TRUE(controller50.GetCalculatedServingSTH(&sth));\n+  EXPECT_EQ(sth100_.tree_size(), sth.tree_size());\n+\n+  store_->SetClusterNodeState(cns200_);\n+  sleep(1);\n+  // Node1@200\n+  // Node2 and Node3 @100:\n+  // Still have to serve at sth100\n+  EXPECT_TRUE(controller50.GetCalculatedServingSTH(&sth));\n+  EXPECT_EQ(sth100_.tree_size(), sth.tree_size());\n+\n+  store3_->SetClusterNodeState(cns200_);\n+  sleep(1);\n+  // Node1 and Node3 @200\n+  // Node2 @100:\n+  // Can serve at sth200\n+  EXPECT_TRUE(controller50.GetCalculatedServingSTH(&sth));\n+  EXPECT_EQ(sth200_.tree_size(), sth.tree_size());\n+\n+  store2_->SetClusterNodeState(cns300_);\n+  sleep(1);\n+  // Node1 and Node3 @200\n+  // Node2 @300:\n+  // Still have to serve at sth200\n+  EXPECT_TRUE(controller50.GetCalculatedServingSTH(&sth));\n+  EXPECT_EQ(sth200_.tree_size(), sth.tree_size());\n+}\n+\n+\n+TEST_F(ClusterStateControllerTest, TestKeepsNewerSTH) {\n+  store_->SetClusterNodeState(cns100_);\n+\n+  // Create a node with an identically sized but newer STH:\n+  SignedTreeHead newer_sth(sth100_);\n+  newer_sth.set_timestamp(newer_sth.timestamp() + 1);\n+  ClusterNodeState newer_cns;\n+  *newer_cns.mutable_newest_sth() = newer_sth;\n+  store2_->SetClusterNodeState(newer_cns);\n+  sleep(1);\n+\n+  SignedTreeHead sth;\n+  EXPECT_TRUE(controller_.GetCalculatedServingSTH(&sth));\n+  EXPECT_EQ(newer_sth.tree_size(), sth.tree_size());\n+  EXPECT_EQ(newer_sth.timestamp(), sth.timestamp());\n+}\n+\n+\n+TEST_F(ClusterStateControllerTest, TestCannotSelectSmallerSTH) {\n+  MockMasterElection election_is_master;\n+  EXPECT_CALL(election_is_master, IsMaster()).WillRepeatedly(Return(true));\n+  ClusterStateController<LoggedCertificate> controller50(&pool_, store_.get(),\n+                                                         election_is_master, 0,\n+                                                         0.5);\n+  store_->SetClusterNodeState(cns200_);\n+  store2_->SetClusterNodeState(cns200_);\n+  store3_->SetClusterNodeState(cns200_);\n+  sleep(1);\n+  SignedTreeHead sth;\n+  EXPECT_TRUE(controller50.GetCalculatedServingSTH(&sth));\n+  EXPECT_EQ(sth200_.tree_size(), sth.tree_size());\n+\n+  store_->SetClusterNodeState(cns100_);\n+  sleep(1);\n+  // Node1@100\n+  // Node2 and Node3 @200:\n+  // Still have to serve at sth200\n+  EXPECT_TRUE(controller50.GetCalculatedServingSTH(&sth));\n+  EXPECT_EQ(sth200_.tree_size(), sth.tree_size());\n+\n+  store3_->SetClusterNodeState(cns100_);\n+  sleep(1);\n+  // Node1 and Node3 @100\n+  // Node2 @200\n+  // But cannot select an earlier STH than the one we last served with, so must\n+  // stick with sth200:\n+  EXPECT_TRUE(controller50.GetCalculatedServingSTH(&sth));\n+  EXPECT_EQ(sth200_.tree_size(), sth.tree_size());\n+\n+  store2_->SetClusterNodeState(cns100_);\n+  sleep(1);\n+  // Still have to serve at sth200\n+  EXPECT_TRUE(controller50.GetCalculatedServingSTH(&sth));\n+  EXPECT_EQ(sth200_.tree_size(), sth.tree_size());\n+}\n+\n+\n+}  // namespace cert_trans\n+\n+\n+int main(int argc, char** argv) {\n+  cert_trans::test::InitTesting(argv[0], &argc, &argv, true);\n+  ::testing::FLAGS_gtest_death_test_style = \"threadsafe\";","path":"cpp/log/cluster_state_controller_test.cc","position":288,"original_position":288,"commit_id":"0ef57d7f233c85b9b12b8ba30e25c7b130c3347a","original_commit_id":"0ef57d7f233c85b9b12b8ba30e25c7b130c3347a","user":{"login":"AlCutter","id":7648032,"avatar_url":"https://avatars.githubusercontent.com/u/7648032?v=3","gravatar_id":"","url":"https://api.github.com/users/AlCutter","html_url":"https://github.com/AlCutter","followers_url":"https://api.github.com/users/AlCutter/followers","following_url":"https://api.github.com/users/AlCutter/following{/other_user}","gists_url":"https://api.github.com/users/AlCutter/gists{/gist_id}","starred_url":"https://api.github.com/users/AlCutter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlCutter/subscriptions","organizations_url":"https://api.github.com/users/AlCutter/orgs","repos_url":"https://api.github.com/users/AlCutter/repos","events_url":"https://api.github.com/users/AlCutter/events{/privacy}","received_events_url":"https://api.github.com/users/AlCutter/received_events","type":"User","site_admin":false},"body":"Whoops, that was dragged in from elsewhere by mistake - dinged.","created_at":"2015-01-15T14:02:10Z","updated_at":"2015-01-15T14:02:10Z","html_url":"https://github.com/google/certificate-transparency/pull/400#discussion_r23010588","pull_request_url":"https://api.github.com/repos/google/certificate-transparency/pulls/400","_links":{"self":{"href":"https://api.github.com/repos/google/certificate-transparency/pulls/comments/23010588"},"html":{"href":"https://github.com/google/certificate-transparency/pull/400#discussion_r23010588"},"pull_request":{"href":"https://api.github.com/repos/google/certificate-transparency/pulls/400"}}},"pull_request":{"url":"https://api.github.com/repos/google/certificate-transparency/pulls/400","id":27423710,"html_url":"https://github.com/google/certificate-transparency/pull/400","diff_url":"https://github.com/google/certificate-transparency/pull/400.diff","patch_url":"https://github.com/google/certificate-transparency/pull/400.patch","issue_url":"https://api.github.com/repos/google/certificate-transparency/issues/400","number":400,"state":"open","locked":false,"title":"Add ClusterStateController to determine current serving STH.","user":{"login":"AlCutter","id":7648032,"avatar_url":"https://avatars.githubusercontent.com/u/7648032?v=3","gravatar_id":"","url":"https://api.github.com/users/AlCutter","html_url":"https://github.com/AlCutter","followers_url":"https://api.github.com/users/AlCutter/followers","following_url":"https://api.github.com/users/AlCutter/following{/other_user}","gists_url":"https://api.github.com/users/AlCutter/gists{/gist_id}","starred_url":"https://api.github.com/users/AlCutter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlCutter/subscriptions","organizations_url":"https://api.github.com/users/AlCutter/orgs","repos_url":"https://api.github.com/users/AlCutter/repos","events_url":"https://api.github.com/users/AlCutter/events{/privacy}","received_events_url":"https://api.github.com/users/AlCutter/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-01-15T12:05:57Z","updated_at":"2015-01-15T14:02:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"31d8efb3b96242f1e605c5bde8ee65d65e9ce199","assignee":{"login":"pphaneuf","id":40400,"avatar_url":"https://avatars.githubusercontent.com/u/40400?v=3","gravatar_id":"","url":"https://api.github.com/users/pphaneuf","html_url":"https://github.com/pphaneuf","followers_url":"https://api.github.com/users/pphaneuf/followers","following_url":"https://api.github.com/users/pphaneuf/following{/other_user}","gists_url":"https://api.github.com/users/pphaneuf/gists{/gist_id}","starred_url":"https://api.github.com/users/pphaneuf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pphaneuf/subscriptions","organizations_url":"https://api.github.com/users/pphaneuf/orgs","repos_url":"https://api.github.com/users/pphaneuf/repos","events_url":"https://api.github.com/users/pphaneuf/events{/privacy}","received_events_url":"https://api.github.com/users/pphaneuf/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/google/certificate-transparency/pulls/400/commits","review_comments_url":"https://api.github.com/repos/google/certificate-transparency/pulls/400/comments","review_comment_url":"https://api.github.com/repos/google/certificate-transparency/pulls/comments/{number}","comments_url":"https://api.github.com/repos/google/certificate-transparency/issues/400/comments","statuses_url":"https://api.github.com/repos/google/certificate-transparency/statuses/0ef57d7f233c85b9b12b8ba30e25c7b130c3347a","head":{"label":"AlCutter:cluster_state","ref":"cluster_state","sha":"0ef57d7f233c85b9b12b8ba30e25c7b130c3347a","user":{"login":"AlCutter","id":7648032,"avatar_url":"https://avatars.githubusercontent.com/u/7648032?v=3","gravatar_id":"","url":"https://api.github.com/users/AlCutter","html_url":"https://github.com/AlCutter","followers_url":"https://api.github.com/users/AlCutter/followers","following_url":"https://api.github.com/users/AlCutter/following{/other_user}","gists_url":"https://api.github.com/users/AlCutter/gists{/gist_id}","starred_url":"https://api.github.com/users/AlCutter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlCutter/subscriptions","organizations_url":"https://api.github.com/users/AlCutter/orgs","repos_url":"https://api.github.com/users/AlCutter/repos","events_url":"https://api.github.com/users/AlCutter/events{/privacy}","received_events_url":"https://api.github.com/users/AlCutter/received_events","type":"User","site_admin":false},"repo":{"id":23961092,"name":"certificate-transparency","full_name":"AlCutter/certificate-transparency","owner":{"login":"AlCutter","id":7648032,"avatar_url":"https://avatars.githubusercontent.com/u/7648032?v=3","gravatar_id":"","url":"https://api.github.com/users/AlCutter","html_url":"https://github.com/AlCutter","followers_url":"https://api.github.com/users/AlCutter/followers","following_url":"https://api.github.com/users/AlCutter/following{/other_user}","gists_url":"https://api.github.com/users/AlCutter/gists{/gist_id}","starred_url":"https://api.github.com/users/AlCutter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlCutter/subscriptions","organizations_url":"https://api.github.com/users/AlCutter/orgs","repos_url":"https://api.github.com/users/AlCutter/repos","events_url":"https://api.github.com/users/AlCutter/events{/privacy}","received_events_url":"https://api.github.com/users/AlCutter/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AlCutter/certificate-transparency","description":"Auditing for TLS certificates.","fork":true,"url":"https://api.github.com/repos/AlCutter/certificate-transparency","forks_url":"https://api.github.com/repos/AlCutter/certificate-transparency/forks","keys_url":"https://api.github.com/repos/AlCutter/certificate-transparency/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AlCutter/certificate-transparency/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AlCutter/certificate-transparency/teams","hooks_url":"https://api.github.com/repos/AlCutter/certificate-transparency/hooks","issue_events_url":"https://api.github.com/repos/AlCutter/certificate-transparency/issues/events{/number}","events_url":"https://api.github.com/repos/AlCutter/certificate-transparency/events","assignees_url":"https://api.github.com/repos/AlCutter/certificate-transparency/assignees{/user}","branches_url":"https://api.github.com/repos/AlCutter/certificate-transparency/branches{/branch}","tags_url":"https://api.github.com/repos/AlCutter/certificate-transparency/tags","blobs_url":"https://api.github.com/repos/AlCutter/certificate-transparency/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AlCutter/certificate-transparency/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AlCutter/certificate-transparency/git/refs{/sha}","trees_url":"https://api.github.com/repos/AlCutter/certificate-transparency/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AlCutter/certificate-transparency/statuses/{sha}","languages_url":"https://api.github.com/repos/AlCutter/certificate-transparency/languages","stargazers_url":"https://api.github.com/repos/AlCutter/certificate-transparency/stargazers","contributors_url":"https://api.github.com/repos/AlCutter/certificate-transparency/contributors","subscribers_url":"https://api.github.com/repos/AlCutter/certificate-transparency/subscribers","subscription_url":"https://api.github.com/repos/AlCutter/certificate-transparency/subscription","commits_url":"https://api.github.com/repos/AlCutter/certificate-transparency/commits{/sha}","git_commits_url":"https://api.github.com/repos/AlCutter/certificate-transparency/git/commits{/sha}","comments_url":"https://api.github.com/repos/AlCutter/certificate-transparency/comments{/number}","issue_comment_url":"https://api.github.com/repos/AlCutter/certificate-transparency/issues/comments/{number}","contents_url":"https://api.github.com/repos/AlCutter/certificate-transparency/contents/{+path}","compare_url":"https://api.github.com/repos/AlCutter/certificate-transparency/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AlCutter/certificate-transparency/merges","archive_url":"https://api.github.com/repos/AlCutter/certificate-transparency/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AlCutter/certificate-transparency/downloads","issues_url":"https://api.github.com/repos/AlCutter/certificate-transparency/issues{/number}","pulls_url":"https://api.github.com/repos/AlCutter/certificate-transparency/pulls{/number}","milestones_url":"https://api.github.com/repos/AlCutter/certificate-transparency/milestones{/number}","notifications_url":"https://api.github.com/repos/AlCutter/certificate-transparency/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AlCutter/certificate-transparency/labels{/name}","releases_url":"https://api.github.com/repos/AlCutter/certificate-transparency/releases{/id}","created_at":"2014-09-12T13:11:02Z","updated_at":"2014-11-27T12:57:17Z","pushed_at":"2015-01-15T13:57:21Z","git_url":"git://github.com/AlCutter/certificate-transparency.git","ssh_url":"git@github.com:AlCutter/certificate-transparency.git","clone_url":"https://github.com/AlCutter/certificate-transparency.git","svn_url":"https://github.com/AlCutter/certificate-transparency","homepage":"http://www.certificate-transparency.org/","size":18204,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"google:super_duper","ref":"super_duper","sha":"e6b029c67719e8eea454bfed5928a8210d0e02bc","user":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":19989605,"name":"certificate-transparency","full_name":"google/certificate-transparency","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/certificate-transparency","description":"Auditing for TLS certificates.","fork":false,"url":"https://api.github.com/repos/google/certificate-transparency","forks_url":"https://api.github.com/repos/google/certificate-transparency/forks","keys_url":"https://api.github.com/repos/google/certificate-transparency/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/certificate-transparency/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/certificate-transparency/teams","hooks_url":"https://api.github.com/repos/google/certificate-transparency/hooks","issue_events_url":"https://api.github.com/repos/google/certificate-transparency/issues/events{/number}","events_url":"https://api.github.com/repos/google/certificate-transparency/events","assignees_url":"https://api.github.com/repos/google/certificate-transparency/assignees{/user}","branches_url":"https://api.github.com/repos/google/certificate-transparency/branches{/branch}","tags_url":"https://api.github.com/repos/google/certificate-transparency/tags","blobs_url":"https://api.github.com/repos/google/certificate-transparency/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/certificate-transparency/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/certificate-transparency/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/certificate-transparency/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/certificate-transparency/statuses/{sha}","languages_url":"https://api.github.com/repos/google/certificate-transparency/languages","stargazers_url":"https://api.github.com/repos/google/certificate-transparency/stargazers","contributors_url":"https://api.github.com/repos/google/certificate-transparency/contributors","subscribers_url":"https://api.github.com/repos/google/certificate-transparency/subscribers","subscription_url":"https://api.github.com/repos/google/certificate-transparency/subscription","commits_url":"https://api.github.com/repos/google/certificate-transparency/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/certificate-transparency/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/certificate-transparency/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/certificate-transparency/issues/comments/{number}","contents_url":"https://api.github.com/repos/google/certificate-transparency/contents/{+path}","compare_url":"https://api.github.com/repos/google/certificate-transparency/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/certificate-transparency/merges","archive_url":"https://api.github.com/repos/google/certificate-transparency/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/certificate-transparency/downloads","issues_url":"https://api.github.com/repos/google/certificate-transparency/issues{/number}","pulls_url":"https://api.github.com/repos/google/certificate-transparency/pulls{/number}","milestones_url":"https://api.github.com/repos/google/certificate-transparency/milestones{/number}","notifications_url":"https://api.github.com/repos/google/certificate-transparency/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/certificate-transparency/labels{/name}","releases_url":"https://api.github.com/repos/google/certificate-transparency/releases{/id}","created_at":"2014-05-20T17:03:47Z","updated_at":"2015-01-15T12:41:33Z","pushed_at":"2015-01-15T12:51:54Z","git_url":"git://github.com/google/certificate-transparency.git","ssh_url":"git@github.com:google/certificate-transparency.git","clone_url":"https://github.com/google/certificate-transparency.git","svn_url":"https://github.com/google/certificate-transparency","homepage":"http://www.certificate-transparency.org/","size":21312,"stargazers_count":80,"watchers_count":80,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":30,"forks":30,"open_issues":30,"watchers":80,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/google/certificate-transparency/pulls/400"},"html":{"href":"https://github.com/google/certificate-transparency/pull/400"},"issue":{"href":"https://api.github.com/repos/google/certificate-transparency/issues/400"},"comments":{"href":"https://api.github.com/repos/google/certificate-transparency/issues/400/comments"},"review_comments":{"href":"https://api.github.com/repos/google/certificate-transparency/pulls/400/comments"},"review_comment":{"href":"https://api.github.com/repos/google/certificate-transparency/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/google/certificate-transparency/pulls/400/commits"},"statuses":{"href":"https://api.github.com/repos/google/certificate-transparency/statuses/0ef57d7f233c85b9b12b8ba30e25c7b130c3347a"}}}}