{"action":"created","comment":{"url":"https://api.github.com/repos/maidsafe/parsec/pulls/comments/240951614","pull_request_review_id":184098746,"id":240951614,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MDk1MTYxNA==","diff_hunk":"@@ -56,12 +56,16 @@ pub(crate) struct MetaElection<P: PublicId> {\n     pub(crate) consensus_len: usize,\n     // Key of the payload decided by this meta-election.\n     pub(crate) payload_key: Option<ObservationKey<P>>,\n-    // Topological index of the first event processed in this meta-election.\n-    pub(crate) start_index: usize,\n+    // Set of all events that carry a payload that hasn't yet been consensused.\n+    pub(crate) unconsensused_events: BTreeSet<EventIndex>,","path":"src/meta_voting/meta_elections.rs","position":7,"original_position":7,"commit_id":"3b36c6e7e477a5f552276198595d75eb3e385fad","original_commit_id":"cc5550bee036704880b569bd7fdf37ca0e4da428","user":{"login":"madadam","id":5271,"node_id":"MDQ6VXNlcjUyNzE=","avatar_url":"https://avatars0.githubusercontent.com/u/5271?v=4","gravatar_id":"","url":"https://api.github.com/users/madadam","html_url":"https://github.com/madadam","followers_url":"https://api.github.com/users/madadam/followers","following_url":"https://api.github.com/users/madadam/following{/other_user}","gists_url":"https://api.github.com/users/madadam/gists{/gist_id}","starred_url":"https://api.github.com/users/madadam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/madadam/subscriptions","organizations_url":"https://api.github.com/users/madadam/orgs","repos_url":"https://api.github.com/users/madadam/repos","events_url":"https://api.github.com/users/madadam/events{/privacy}","received_events_url":"https://api.github.com/users/madadam/received_events","type":"User","site_admin":false},"body":"> Isn't it when we see that all nodes reached consensus on a payload?\r\n\r\nNo. When we ourselves reach consensus on a payload, we create new meta-election and we initialize it with all the unconsensused events from the previous election minus the ones that carry the payload we just consensused.","created_at":"2018-12-12T10:11:02Z","updated_at":"2018-12-12T10:11:03Z","html_url":"https://github.com/maidsafe/parsec/pull/212#discussion_r240951614","pull_request_url":"https://api.github.com/repos/maidsafe/parsec/pulls/212","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/maidsafe/parsec/pulls/comments/240951614"},"html":{"href":"https://github.com/maidsafe/parsec/pull/212#discussion_r240951614"},"pull_request":{"href":"https://api.github.com/repos/maidsafe/parsec/pulls/212"}},"in_reply_to_id":240643143},"pull_request":{"url":"https://api.github.com/repos/maidsafe/parsec/pulls/212","id":236461563,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM2NDYxNTYz","html_url":"https://github.com/maidsafe/parsec/pull/212","diff_url":"https://github.com/maidsafe/parsec/pull/212.diff","patch_url":"https://github.com/maidsafe/parsec/pull/212.patch","issue_url":"https://api.github.com/repos/maidsafe/parsec/issues/212","number":212,"state":"open","locked":false,"title":"Perf optimization: cache unconsensused events in meta-election","user":{"login":"madadam","id":5271,"node_id":"MDQ6VXNlcjUyNzE=","avatar_url":"https://avatars0.githubusercontent.com/u/5271?v=4","gravatar_id":"","url":"https://api.github.com/users/madadam","html_url":"https://github.com/madadam","followers_url":"https://api.github.com/users/madadam/followers","following_url":"https://api.github.com/users/madadam/following{/other_user}","gists_url":"https://api.github.com/users/madadam/gists{/gist_id}","starred_url":"https://api.github.com/users/madadam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/madadam/subscriptions","organizations_url":"https://api.github.com/users/madadam/orgs","repos_url":"https://api.github.com/users/madadam/repos","events_url":"https://api.github.com/users/madadam/events{/privacy}","received_events_url":"https://api.github.com/users/madadam/received_events","type":"User","site_admin":false},"body":"This PR trying to improve performance by reducing the number of events we need to traverse when calculating interesting content. It does so by caching all events that carry unconsensused payloads in the meta-election.\r\n\r\nIt also fixes two subtle bugs in the `previous_interesting_content` optimization. Details are explained in the corresponding commit message.","created_at":"2018-12-06T09:33:22Z","updated_at":"2018-12-12T10:11:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"667764489ec1d518f9bf37f63e8709de8cb57611","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/maidsafe/parsec/pulls/212/commits","review_comments_url":"https://api.github.com/repos/maidsafe/parsec/pulls/212/comments","review_comment_url":"https://api.github.com/repos/maidsafe/parsec/pulls/comments{/number}","comments_url":"https://api.github.com/repos/maidsafe/parsec/issues/212/comments","statuses_url":"https://api.github.com/repos/maidsafe/parsec/statuses/3b36c6e7e477a5f552276198595d75eb3e385fad","head":{"label":"madadam:perf-optimization","ref":"perf-optimization","sha":"3b36c6e7e477a5f552276198595d75eb3e385fad","user":{"login":"madadam","id":5271,"node_id":"MDQ6VXNlcjUyNzE=","avatar_url":"https://avatars0.githubusercontent.com/u/5271?v=4","gravatar_id":"","url":"https://api.github.com/users/madadam","html_url":"https://github.com/madadam","followers_url":"https://api.github.com/users/madadam/followers","following_url":"https://api.github.com/users/madadam/following{/other_user}","gists_url":"https://api.github.com/users/madadam/gists{/gist_id}","starred_url":"https://api.github.com/users/madadam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/madadam/subscriptions","organizations_url":"https://api.github.com/users/madadam/orgs","repos_url":"https://api.github.com/users/madadam/repos","events_url":"https://api.github.com/users/madadam/events{/privacy}","received_events_url":"https://api.github.com/users/madadam/received_events","type":"User","site_admin":false},"repo":{"id":147331996,"node_id":"MDEwOlJlcG9zaXRvcnkxNDczMzE5OTY=","name":"parsec","full_name":"madadam/parsec","private":false,"owner":{"login":"madadam","id":5271,"node_id":"MDQ6VXNlcjUyNzE=","avatar_url":"https://avatars0.githubusercontent.com/u/5271?v=4","gravatar_id":"","url":"https://api.github.com/users/madadam","html_url":"https://github.com/madadam","followers_url":"https://api.github.com/users/madadam/followers","following_url":"https://api.github.com/users/madadam/following{/other_user}","gists_url":"https://api.github.com/users/madadam/gists{/gist_id}","starred_url":"https://api.github.com/users/madadam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/madadam/subscriptions","organizations_url":"https://api.github.com/users/madadam/orgs","repos_url":"https://api.github.com/users/madadam/repos","events_url":"https://api.github.com/users/madadam/events{/privacy}","received_events_url":"https://api.github.com/users/madadam/received_events","type":"User","site_admin":false},"html_url":"https://github.com/madadam/parsec","description":"Protocol for Asynchronous, Reliable, Secure and Efficient Consensus","fork":true,"url":"https://api.github.com/repos/madadam/parsec","forks_url":"https://api.github.com/repos/madadam/parsec/forks","keys_url":"https://api.github.com/repos/madadam/parsec/keys{/key_id}","collaborators_url":"https://api.github.com/repos/madadam/parsec/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/madadam/parsec/teams","hooks_url":"https://api.github.com/repos/madadam/parsec/hooks","issue_events_url":"https://api.github.com/repos/madadam/parsec/issues/events{/number}","events_url":"https://api.github.com/repos/madadam/parsec/events","assignees_url":"https://api.github.com/repos/madadam/parsec/assignees{/user}","branches_url":"https://api.github.com/repos/madadam/parsec/branches{/branch}","tags_url":"https://api.github.com/repos/madadam/parsec/tags","blobs_url":"https://api.github.com/repos/madadam/parsec/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/madadam/parsec/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/madadam/parsec/git/refs{/sha}","trees_url":"https://api.github.com/repos/madadam/parsec/git/trees{/sha}","statuses_url":"https://api.github.com/repos/madadam/parsec/statuses/{sha}","languages_url":"https://api.github.com/repos/madadam/parsec/languages","stargazers_url":"https://api.github.com/repos/madadam/parsec/stargazers","contributors_url":"https://api.github.com/repos/madadam/parsec/contributors","subscribers_url":"https://api.github.com/repos/madadam/parsec/subscribers","subscription_url":"https://api.github.com/repos/madadam/parsec/subscription","commits_url":"https://api.github.com/repos/madadam/parsec/commits{/sha}","git_commits_url":"https://api.github.com/repos/madadam/parsec/git/commits{/sha}","comments_url":"https://api.github.com/repos/madadam/parsec/comments{/number}","issue_comment_url":"https://api.github.com/repos/madadam/parsec/issues/comments{/number}","contents_url":"https://api.github.com/repos/madadam/parsec/contents/{+path}","compare_url":"https://api.github.com/repos/madadam/parsec/compare/{base}...{head}","merges_url":"https://api.github.com/repos/madadam/parsec/merges","archive_url":"https://api.github.com/repos/madadam/parsec/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/madadam/parsec/downloads","issues_url":"https://api.github.com/repos/madadam/parsec/issues{/number}","pulls_url":"https://api.github.com/repos/madadam/parsec/pulls{/number}","milestones_url":"https://api.github.com/repos/madadam/parsec/milestones{/number}","notifications_url":"https://api.github.com/repos/madadam/parsec/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/madadam/parsec/labels{/name}","releases_url":"https://api.github.com/repos/madadam/parsec/releases{/id}","deployments_url":"https://api.github.com/repos/madadam/parsec/deployments","created_at":"2018-09-04T10:56:07Z","updated_at":"2018-09-04T10:56:10Z","pushed_at":"2018-12-12T08:32:30Z","git_url":"git://github.com/madadam/parsec.git","ssh_url":"git@github.com:madadam/parsec.git","clone_url":"https://github.com/madadam/parsec.git","svn_url":"https://github.com/madadam/parsec","homepage":null,"size":1545,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"maidsafe:master","ref":"master","sha":"fb410f10cec5623fc61f32941a614357606968cb","user":{"login":"maidsafe","id":536423,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzNjQyMw==","avatar_url":"https://avatars1.githubusercontent.com/u/536423?v=4","gravatar_id":"","url":"https://api.github.com/users/maidsafe","html_url":"https://github.com/maidsafe","followers_url":"https://api.github.com/users/maidsafe/followers","following_url":"https://api.github.com/users/maidsafe/following{/other_user}","gists_url":"https://api.github.com/users/maidsafe/gists{/gist_id}","starred_url":"https://api.github.com/users/maidsafe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maidsafe/subscriptions","organizations_url":"https://api.github.com/users/maidsafe/orgs","repos_url":"https://api.github.com/users/maidsafe/repos","events_url":"https://api.github.com/users/maidsafe/events{/privacy}","received_events_url":"https://api.github.com/users/maidsafe/received_events","type":"Organization","site_admin":false},"repo":{"id":136022756,"node_id":"MDEwOlJlcG9zaXRvcnkxMzYwMjI3NTY=","name":"parsec","full_name":"maidsafe/parsec","private":false,"owner":{"login":"maidsafe","id":536423,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUzNjQyMw==","avatar_url":"https://avatars1.githubusercontent.com/u/536423?v=4","gravatar_id":"","url":"https://api.github.com/users/maidsafe","html_url":"https://github.com/maidsafe","followers_url":"https://api.github.com/users/maidsafe/followers","following_url":"https://api.github.com/users/maidsafe/following{/other_user}","gists_url":"https://api.github.com/users/maidsafe/gists{/gist_id}","starred_url":"https://api.github.com/users/maidsafe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maidsafe/subscriptions","organizations_url":"https://api.github.com/users/maidsafe/orgs","repos_url":"https://api.github.com/users/maidsafe/repos","events_url":"https://api.github.com/users/maidsafe/events{/privacy}","received_events_url":"https://api.github.com/users/maidsafe/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/maidsafe/parsec","description":"Protocol for Asynchronous, Reliable, Secure and Efficient Consensus","fork":false,"url":"https://api.github.com/repos/maidsafe/parsec","forks_url":"https://api.github.com/repos/maidsafe/parsec/forks","keys_url":"https://api.github.com/repos/maidsafe/parsec/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maidsafe/parsec/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maidsafe/parsec/teams","hooks_url":"https://api.github.com/repos/maidsafe/parsec/hooks","issue_events_url":"https://api.github.com/repos/maidsafe/parsec/issues/events{/number}","events_url":"https://api.github.com/repos/maidsafe/parsec/events","assignees_url":"https://api.github.com/repos/maidsafe/parsec/assignees{/user}","branches_url":"https://api.github.com/repos/maidsafe/parsec/branches{/branch}","tags_url":"https://api.github.com/repos/maidsafe/parsec/tags","blobs_url":"https://api.github.com/repos/maidsafe/parsec/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maidsafe/parsec/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maidsafe/parsec/git/refs{/sha}","trees_url":"https://api.github.com/repos/maidsafe/parsec/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maidsafe/parsec/statuses/{sha}","languages_url":"https://api.github.com/repos/maidsafe/parsec/languages","stargazers_url":"https://api.github.com/repos/maidsafe/parsec/stargazers","contributors_url":"https://api.github.com/repos/maidsafe/parsec/contributors","subscribers_url":"https://api.github.com/repos/maidsafe/parsec/subscribers","subscription_url":"https://api.github.com/repos/maidsafe/parsec/subscription","commits_url":"https://api.github.com/repos/maidsafe/parsec/commits{/sha}","git_commits_url":"https://api.github.com/repos/maidsafe/parsec/git/commits{/sha}","comments_url":"https://api.github.com/repos/maidsafe/parsec/comments{/number}","issue_comment_url":"https://api.github.com/repos/maidsafe/parsec/issues/comments{/number}","contents_url":"https://api.github.com/repos/maidsafe/parsec/contents/{+path}","compare_url":"https://api.github.com/repos/maidsafe/parsec/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maidsafe/parsec/merges","archive_url":"https://api.github.com/repos/maidsafe/parsec/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maidsafe/parsec/downloads","issues_url":"https://api.github.com/repos/maidsafe/parsec/issues{/number}","pulls_url":"https://api.github.com/repos/maidsafe/parsec/pulls{/number}","milestones_url":"https://api.github.com/repos/maidsafe/parsec/milestones{/number}","notifications_url":"https://api.github.com/repos/maidsafe/parsec/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maidsafe/parsec/labels{/name}","releases_url":"https://api.github.com/repos/maidsafe/parsec/releases{/id}","deployments_url":"https://api.github.com/repos/maidsafe/parsec/deployments","created_at":"2018-06-04T12:36:27Z","updated_at":"2018-12-11T13:00:59Z","pushed_at":"2018-12-12T08:32:31Z","git_url":"git://github.com/maidsafe/parsec.git","ssh_url":"git@github.com:maidsafe/parsec.git","clone_url":"https://github.com/maidsafe/parsec.git","svn_url":"https://github.com/maidsafe/parsec","homepage":null,"size":1437,"stargazers_count":129,"watchers_count":129,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":28,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":28,"open_issues":3,"watchers":129,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/maidsafe/parsec/pulls/212"},"html":{"href":"https://github.com/maidsafe/parsec/pull/212"},"issue":{"href":"https://api.github.com/repos/maidsafe/parsec/issues/212"},"comments":{"href":"https://api.github.com/repos/maidsafe/parsec/issues/212/comments"},"review_comments":{"href":"https://api.github.com/repos/maidsafe/parsec/pulls/212/comments"},"review_comment":{"href":"https://api.github.com/repos/maidsafe/parsec/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/maidsafe/parsec/pulls/212/commits"},"statuses":{"href":"https://api.github.com/repos/maidsafe/parsec/statuses/3b36c6e7e477a5f552276198595d75eb3e385fad"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"madadam"}}