{"action":"created","comment":{"url":"https://api.github.com/repos/poanetwork/hbbft/pulls/comments/201383346","pull_request_review_id":135874655,"id":201383346,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwMTM4MzM0Ng==","diff_hunk":"@@ -338,34 +340,26 @@ where\n             // `hb_batch`, and the current change state.\n             let mut batch = Batch::new(hb_batch.epoch + self.start_epoch);\n             // Add the user transactions to `batch` and handle votes and DKG messages.\n-            for (id, tx_vec) in hb_batch.transactions {\n-                let entry = batch.transactions.entry(id);\n-                let id_txs = entry.or_insert_with(Vec::new);\n-                for tx in tx_vec {\n-                    match tx {\n-                        Transaction::User(tx) => id_txs.push(tx),\n-                        Transaction::Signed(epoch, s_id, node_tx, sig) => {\n-                            if epoch < self.start_epoch {\n-                                info!(\"Obsolete node transaction: {:?}.\", node_tx);\n-                                continue;\n-                            }\n-                            if !self.verify_signature(&s_id, &sig, &node_tx)? {\n-                                info!(\"Invalid signature from {:?} for: {:?}.\", s_id, node_tx);\n-                                let fault_kind = FaultKind::InvalidNodeTransactionSignature;\n-                                fault_log.append(s_id.clone(), fault_kind);\n-                                continue;\n-                            }\n-                            use self::NodeTransaction::*;\n-                            match node_tx {\n-                                Change(change) => self.handle_vote(s_id, change),\n-                                Propose(propose) => self\n-                                    .handle_propose(&s_id, propose)?\n-                                    .merge_into(&mut fault_log),\n-                                Accept(accept) => self\n-                                    .handle_accept(&s_id, accept)?\n-                                    .merge_into(&mut fault_log),\n-                            }\n-                        }\n+            for (id, int_contrib) in hb_batch.contributions {\n+                batch.contributions.insert(id, int_contrib.contrib);\n+                for SignedTransaction(epoch, s_id, node_tx, sig) in int_contrib.transactions {\n+                    if epoch < self.start_epoch {\n+                        info!(\"Obsolete node transaction: {:?}.\", node_tx);\n+                        continue;\n+                    }\n+                    if !self.verify_signature(&s_id, &sig, &node_tx)? {","path":"src/dynamic_honey_badger.rs","position":297,"original_position":299,"commit_id":"ca2dd2327ed84117924c43bf40ecf07bef4a7a39","original_commit_id":"2566e173bca9be7cf3c29efa3b80e33160088591","user":{"login":"afck","id":7894725,"node_id":"MDQ6VXNlcjc4OTQ3MjU=","avatar_url":"https://avatars0.githubusercontent.com/u/7894725?v=4","gravatar_id":"","url":"https://api.github.com/users/afck","html_url":"https://github.com/afck","followers_url":"https://api.github.com/users/afck/followers","following_url":"https://api.github.com/users/afck/following{/other_user}","gists_url":"https://api.github.com/users/afck/gists{/gist_id}","starred_url":"https://api.github.com/users/afck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afck/subscriptions","organizations_url":"https://api.github.com/users/afck/orgs","repos_url":"https://api.github.com/users/afck/repos","events_url":"https://api.github.com/users/afck/events{/privacy}","received_events_url":"https://api.github.com/users/afck/received_events","type":"User","site_admin":false},"body":"Good catch! I missed that while resolving the giant merge conflict. :sweat_smile: ","created_at":"2018-07-10T15:15:04Z","updated_at":"2018-07-10T15:31:21Z","html_url":"https://github.com/poanetwork/hbbft/pull/117#discussion_r201383346","pull_request_url":"https://api.github.com/repos/poanetwork/hbbft/pulls/117","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/poanetwork/hbbft/pulls/comments/201383346"},"html":{"href":"https://github.com/poanetwork/hbbft/pull/117#discussion_r201383346"},"pull_request":{"href":"https://api.github.com/repos/poanetwork/hbbft/pulls/117"}},"in_reply_to_id":201346951},"pull_request":{"url":"https://api.github.com/repos/poanetwork/hbbft/pulls/117","id":200365086,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAwMzY1MDg2","html_url":"https://github.com/poanetwork/hbbft/pull/117","diff_url":"https://github.com/poanetwork/hbbft/pull/117.diff","patch_url":"https://github.com/poanetwork/hbbft/pull/117.patch","issue_url":"https://api.github.com/repos/poanetwork/hbbft/issues/117","number":117,"state":"open","locked":false,"title":"Separate queue from Honey Badger.","user":{"login":"afck","id":7894725,"node_id":"MDQ6VXNlcjc4OTQ3MjU=","avatar_url":"https://avatars0.githubusercontent.com/u/7894725?v=4","gravatar_id":"","url":"https://api.github.com/users/afck","html_url":"https://github.com/afck","followers_url":"https://api.github.com/users/afck/followers","following_url":"https://api.github.com/users/afck/following{/other_user}","gists_url":"https://api.github.com/users/afck/gists{/gist_id}","starred_url":"https://api.github.com/users/afck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/afck/subscriptions","organizations_url":"https://api.github.com/users/afck/orgs","repos_url":"https://api.github.com/users/afck/repos","events_url":"https://api.github.com/users/afck/events{/privacy}","received_events_url":"https://api.github.com/users/afck/received_events","type":"User","site_admin":false},"body":"This makes Honey Badger a bit more complicated but a lot more flexible:\r\nIt is now unaware of transactions and basically just runs one Subset\r\ninstance per epoch.\r\n\r\nThat way, users can use any kind of external queue, control throttling\r\nand prioritization.","created_at":"2018-07-10T11:29:47Z","updated_at":"2018-07-10T15:31:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"19bd6f421bec5987b5cc5af11946c5ed997940f3","assignee":null,"assignees":[],"requested_reviewers":[{"login":"vkomenda","id":5529505,"node_id":"MDQ6VXNlcjU1Mjk1MDU=","avatar_url":"https://avatars3.githubusercontent.com/u/5529505?v=4","gravatar_id":"","url":"https://api.github.com/users/vkomenda","html_url":"https://github.com/vkomenda","followers_url":"https://api.github.com/users/vkomenda/followers","following_url":"https://api.github.com/users/vkomenda/following{/other_user}","gists_url":"https://api.github.com/users/vkomenda/gists{/gist_id}","starred_url":"https://api.github.com/users/vkomenda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vkomenda/subscriptions","organizations_url":"https://api.github.com/users/vkomenda/orgs","repos_url":"https://api.github.com/users/vkomenda/repos","events_url":"https://api.github.com/users/vkomenda/events{/privacy}","received_events_url":"https://api.github.com/users/vkomenda/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/poanetwork/hbbft/pulls/117/commits","review_comments_url":"https://api.github.com/repos/poanetwork/hbbft/pulls/117/comments","review_comment_url":"https://api.github.com/repos/poanetwork/hbbft/pulls/comments{/number}","comments_url":"https://api.github.com/repos/poanetwork/hbbft/issues/117/comments","statuses_url":"https://api.github.com/repos/poanetwork/hbbft/statuses/ca2dd2327ed84117924c43bf40ecf07bef4a7a39","head":{"label":"poanetwork:afck-queue","ref":"afck-queue","sha":"ca2dd2327ed84117924c43bf40ecf07bef4a7a39","user":{"login":"poanetwork","id":28943015,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4OTQzMDE1","avatar_url":"https://avatars2.githubusercontent.com/u/28943015?v=4","gravatar_id":"","url":"https://api.github.com/users/poanetwork","html_url":"https://github.com/poanetwork","followers_url":"https://api.github.com/users/poanetwork/followers","following_url":"https://api.github.com/users/poanetwork/following{/other_user}","gists_url":"https://api.github.com/users/poanetwork/gists{/gist_id}","starred_url":"https://api.github.com/users/poanetwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poanetwork/subscriptions","organizations_url":"https://api.github.com/users/poanetwork/orgs","repos_url":"https://api.github.com/users/poanetwork/repos","events_url":"https://api.github.com/users/poanetwork/events{/privacy}","received_events_url":"https://api.github.com/users/poanetwork/received_events","type":"Organization","site_admin":false},"repo":{"id":125307734,"node_id":"MDEwOlJlcG9zaXRvcnkxMjUzMDc3MzQ=","name":"hbbft","full_name":"poanetwork/hbbft","owner":{"login":"poanetwork","id":28943015,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4OTQzMDE1","avatar_url":"https://avatars2.githubusercontent.com/u/28943015?v=4","gravatar_id":"","url":"https://api.github.com/users/poanetwork","html_url":"https://github.com/poanetwork","followers_url":"https://api.github.com/users/poanetwork/followers","following_url":"https://api.github.com/users/poanetwork/following{/other_user}","gists_url":"https://api.github.com/users/poanetwork/gists{/gist_id}","starred_url":"https://api.github.com/users/poanetwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poanetwork/subscriptions","organizations_url":"https://api.github.com/users/poanetwork/orgs","repos_url":"https://api.github.com/users/poanetwork/repos","events_url":"https://api.github.com/users/poanetwork/events{/privacy}","received_events_url":"https://api.github.com/users/poanetwork/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/poanetwork/hbbft","description":" An implementation of the paper \"Honey Badger of BFT Protocols\" in Rust. This is a modular library of consensus.","fork":false,"url":"https://api.github.com/repos/poanetwork/hbbft","forks_url":"https://api.github.com/repos/poanetwork/hbbft/forks","keys_url":"https://api.github.com/repos/poanetwork/hbbft/keys{/key_id}","collaborators_url":"https://api.github.com/repos/poanetwork/hbbft/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/poanetwork/hbbft/teams","hooks_url":"https://api.github.com/repos/poanetwork/hbbft/hooks","issue_events_url":"https://api.github.com/repos/poanetwork/hbbft/issues/events{/number}","events_url":"https://api.github.com/repos/poanetwork/hbbft/events","assignees_url":"https://api.github.com/repos/poanetwork/hbbft/assignees{/user}","branches_url":"https://api.github.com/repos/poanetwork/hbbft/branches{/branch}","tags_url":"https://api.github.com/repos/poanetwork/hbbft/tags","blobs_url":"https://api.github.com/repos/poanetwork/hbbft/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/poanetwork/hbbft/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/poanetwork/hbbft/git/refs{/sha}","trees_url":"https://api.github.com/repos/poanetwork/hbbft/git/trees{/sha}","statuses_url":"https://api.github.com/repos/poanetwork/hbbft/statuses/{sha}","languages_url":"https://api.github.com/repos/poanetwork/hbbft/languages","stargazers_url":"https://api.github.com/repos/poanetwork/hbbft/stargazers","contributors_url":"https://api.github.com/repos/poanetwork/hbbft/contributors","subscribers_url":"https://api.github.com/repos/poanetwork/hbbft/subscribers","subscription_url":"https://api.github.com/repos/poanetwork/hbbft/subscription","commits_url":"https://api.github.com/repos/poanetwork/hbbft/commits{/sha}","git_commits_url":"https://api.github.com/repos/poanetwork/hbbft/git/commits{/sha}","comments_url":"https://api.github.com/repos/poanetwork/hbbft/comments{/number}","issue_comment_url":"https://api.github.com/repos/poanetwork/hbbft/issues/comments{/number}","contents_url":"https://api.github.com/repos/poanetwork/hbbft/contents/{+path}","compare_url":"https://api.github.com/repos/poanetwork/hbbft/compare/{base}...{head}","merges_url":"https://api.github.com/repos/poanetwork/hbbft/merges","archive_url":"https://api.github.com/repos/poanetwork/hbbft/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/poanetwork/hbbft/downloads","issues_url":"https://api.github.com/repos/poanetwork/hbbft/issues{/number}","pulls_url":"https://api.github.com/repos/poanetwork/hbbft/pulls{/number}","milestones_url":"https://api.github.com/repos/poanetwork/hbbft/milestones{/number}","notifications_url":"https://api.github.com/repos/poanetwork/hbbft/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/poanetwork/hbbft/labels{/name}","releases_url":"https://api.github.com/repos/poanetwork/hbbft/releases{/id}","deployments_url":"https://api.github.com/repos/poanetwork/hbbft/deployments","created_at":"2018-03-15T03:32:34Z","updated_at":"2018-07-10T14:12:00Z","pushed_at":"2018-07-10T15:31:16Z","git_url":"git://github.com/poanetwork/hbbft.git","ssh_url":"git@github.com:poanetwork/hbbft.git","clone_url":"https://github.com/poanetwork/hbbft.git","svn_url":"https://github.com/poanetwork/hbbft","homepage":"","size":929,"stargazers_count":54,"watchers_count":54,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"archived":false,"open_issues_count":23,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":9,"open_issues":23,"watchers":54,"default_branch":"master"}},"base":{"label":"poanetwork:master","ref":"master","sha":"b546c16a5e45c8b5fa41e0e7d5b867f0df9f6fad","user":{"login":"poanetwork","id":28943015,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4OTQzMDE1","avatar_url":"https://avatars2.githubusercontent.com/u/28943015?v=4","gravatar_id":"","url":"https://api.github.com/users/poanetwork","html_url":"https://github.com/poanetwork","followers_url":"https://api.github.com/users/poanetwork/followers","following_url":"https://api.github.com/users/poanetwork/following{/other_user}","gists_url":"https://api.github.com/users/poanetwork/gists{/gist_id}","starred_url":"https://api.github.com/users/poanetwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poanetwork/subscriptions","organizations_url":"https://api.github.com/users/poanetwork/orgs","repos_url":"https://api.github.com/users/poanetwork/repos","events_url":"https://api.github.com/users/poanetwork/events{/privacy}","received_events_url":"https://api.github.com/users/poanetwork/received_events","type":"Organization","site_admin":false},"repo":{"id":125307734,"node_id":"MDEwOlJlcG9zaXRvcnkxMjUzMDc3MzQ=","name":"hbbft","full_name":"poanetwork/hbbft","owner":{"login":"poanetwork","id":28943015,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4OTQzMDE1","avatar_url":"https://avatars2.githubusercontent.com/u/28943015?v=4","gravatar_id":"","url":"https://api.github.com/users/poanetwork","html_url":"https://github.com/poanetwork","followers_url":"https://api.github.com/users/poanetwork/followers","following_url":"https://api.github.com/users/poanetwork/following{/other_user}","gists_url":"https://api.github.com/users/poanetwork/gists{/gist_id}","starred_url":"https://api.github.com/users/poanetwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poanetwork/subscriptions","organizations_url":"https://api.github.com/users/poanetwork/orgs","repos_url":"https://api.github.com/users/poanetwork/repos","events_url":"https://api.github.com/users/poanetwork/events{/privacy}","received_events_url":"https://api.github.com/users/poanetwork/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/poanetwork/hbbft","description":" An implementation of the paper \"Honey Badger of BFT Protocols\" in Rust. This is a modular library of consensus.","fork":false,"url":"https://api.github.com/repos/poanetwork/hbbft","forks_url":"https://api.github.com/repos/poanetwork/hbbft/forks","keys_url":"https://api.github.com/repos/poanetwork/hbbft/keys{/key_id}","collaborators_url":"https://api.github.com/repos/poanetwork/hbbft/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/poanetwork/hbbft/teams","hooks_url":"https://api.github.com/repos/poanetwork/hbbft/hooks","issue_events_url":"https://api.github.com/repos/poanetwork/hbbft/issues/events{/number}","events_url":"https://api.github.com/repos/poanetwork/hbbft/events","assignees_url":"https://api.github.com/repos/poanetwork/hbbft/assignees{/user}","branches_url":"https://api.github.com/repos/poanetwork/hbbft/branches{/branch}","tags_url":"https://api.github.com/repos/poanetwork/hbbft/tags","blobs_url":"https://api.github.com/repos/poanetwork/hbbft/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/poanetwork/hbbft/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/poanetwork/hbbft/git/refs{/sha}","trees_url":"https://api.github.com/repos/poanetwork/hbbft/git/trees{/sha}","statuses_url":"https://api.github.com/repos/poanetwork/hbbft/statuses/{sha}","languages_url":"https://api.github.com/repos/poanetwork/hbbft/languages","stargazers_url":"https://api.github.com/repos/poanetwork/hbbft/stargazers","contributors_url":"https://api.github.com/repos/poanetwork/hbbft/contributors","subscribers_url":"https://api.github.com/repos/poanetwork/hbbft/subscribers","subscription_url":"https://api.github.com/repos/poanetwork/hbbft/subscription","commits_url":"https://api.github.com/repos/poanetwork/hbbft/commits{/sha}","git_commits_url":"https://api.github.com/repos/poanetwork/hbbft/git/commits{/sha}","comments_url":"https://api.github.com/repos/poanetwork/hbbft/comments{/number}","issue_comment_url":"https://api.github.com/repos/poanetwork/hbbft/issues/comments{/number}","contents_url":"https://api.github.com/repos/poanetwork/hbbft/contents/{+path}","compare_url":"https://api.github.com/repos/poanetwork/hbbft/compare/{base}...{head}","merges_url":"https://api.github.com/repos/poanetwork/hbbft/merges","archive_url":"https://api.github.com/repos/poanetwork/hbbft/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/poanetwork/hbbft/downloads","issues_url":"https://api.github.com/repos/poanetwork/hbbft/issues{/number}","pulls_url":"https://api.github.com/repos/poanetwork/hbbft/pulls{/number}","milestones_url":"https://api.github.com/repos/poanetwork/hbbft/milestones{/number}","notifications_url":"https://api.github.com/repos/poanetwork/hbbft/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/poanetwork/hbbft/labels{/name}","releases_url":"https://api.github.com/repos/poanetwork/hbbft/releases{/id}","deployments_url":"https://api.github.com/repos/poanetwork/hbbft/deployments","created_at":"2018-03-15T03:32:34Z","updated_at":"2018-07-10T14:12:00Z","pushed_at":"2018-07-10T15:31:16Z","git_url":"git://github.com/poanetwork/hbbft.git","ssh_url":"git@github.com:poanetwork/hbbft.git","clone_url":"https://github.com/poanetwork/hbbft.git","svn_url":"https://github.com/poanetwork/hbbft","homepage":"","size":929,"stargazers_count":54,"watchers_count":54,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"archived":false,"open_issues_count":23,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":9,"open_issues":23,"watchers":54,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/poanetwork/hbbft/pulls/117"},"html":{"href":"https://github.com/poanetwork/hbbft/pull/117"},"issue":{"href":"https://api.github.com/repos/poanetwork/hbbft/issues/117"},"comments":{"href":"https://api.github.com/repos/poanetwork/hbbft/issues/117/comments"},"review_comments":{"href":"https://api.github.com/repos/poanetwork/hbbft/pulls/117/comments"},"review_comment":{"href":"https://api.github.com/repos/poanetwork/hbbft/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/poanetwork/hbbft/pulls/117/commits"},"statuses":{"href":"https://api.github.com/repos/poanetwork/hbbft/statuses/ca2dd2327ed84117924c43bf40ecf07bef4a7a39"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"afck"}}