{"action":"created","issue":{"url":"https://api.github.com/repos/exonum/exonum/issues/680","repository_url":"https://api.github.com/repos/exonum/exonum","labels_url":"https://api.github.com/repos/exonum/exonum/issues/680/labels{/name}","comments_url":"https://api.github.com/repos/exonum/exonum/issues/680/comments","events_url":"https://api.github.com/repos/exonum/exonum/issues/680/events","html_url":"https://github.com/exonum/exonum/pull/680","id":321878948,"number":680,"title":"Fixed calculation of max byzantine nodes amount [ECR-1280]","user":{"login":"popzxc","id":12111581,"avatar_url":"https://avatars3.githubusercontent.com/u/12111581?v=4","gravatar_id":"","url":"https://api.github.com/users/popzxc","html_url":"https://github.com/popzxc","followers_url":"https://api.github.com/users/popzxc/followers","following_url":"https://api.github.com/users/popzxc/following{/other_user}","gists_url":"https://api.github.com/users/popzxc/gists{/gist_id}","starred_url":"https://api.github.com/users/popzxc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/popzxc/subscriptions","organizations_url":"https://api.github.com/users/popzxc/orgs","repos_url":"https://api.github.com/users/popzxc/repos","events_url":"https://api.github.com/users/popzxc/events{/privacy}","received_events_url":"https://api.github.com/users/popzxc/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-05-10T10:09:13Z","updated_at":"2018-05-10T12:14:09Z","closed_at":"2018-05-10T11:51:17Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/exonum/exonum/pulls/680","html_url":"https://github.com/exonum/exonum/pull/680","diff_url":"https://github.com/exonum/exonum/pull/680.diff","patch_url":"https://github.com/exonum/exonum/pull/680.patch"},"body":"Initial problem: with only 3 nodes started, if two of them gets disconnected and one restores after some time, it can't reach working node round.\r\n\r\nThe reason: incorrect max byzantine nodes amount calculation. It was calculated as (1/3) of all validators, while it should have been (1/3)-1.\r\n\r\nAfter this fix, reconnected node can reach actual round without any problem.\r\n\r\n---\r\n\r\nI've tried to write a test for this behavior, but didn't succeed. As far as I can see, sandbox doesn't provide functionality to emulate node disconnect. Is there any way to emulate such a behavior?"},"comment":{"url":"https://api.github.com/repos/exonum/exonum/issues/comments/388036181","html_url":"https://github.com/exonum/exonum/pull/680#issuecomment-388036181","issue_url":"https://api.github.com/repos/exonum/exonum/issues/680","id":388036181,"user":{"login":"popzxc","id":12111581,"avatar_url":"https://avatars3.githubusercontent.com/u/12111581?v=4","gravatar_id":"","url":"https://api.github.com/users/popzxc","html_url":"https://github.com/popzxc","followers_url":"https://api.github.com/users/popzxc/followers","following_url":"https://api.github.com/users/popzxc/following{/other_user}","gists_url":"https://api.github.com/users/popzxc/gists{/gist_id}","starred_url":"https://api.github.com/users/popzxc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/popzxc/subscriptions","organizations_url":"https://api.github.com/users/popzxc/orgs","repos_url":"https://api.github.com/users/popzxc/repos","events_url":"https://api.github.com/users/popzxc/events{/privacy}","received_events_url":"https://api.github.com/users/popzxc/received_events","type":"User","site_admin":false},"created_at":"2018-05-10T12:14:09Z","updated_at":"2018-05-10T12:14:09Z","author_association":"CONTRIBUTOR","body":"Regarding testing: I guess it's possible. The problem is we don't have existing unit tests for `State` yet and developing may take some time. I think it's a good idea to create a separate issue for it. \r\n\r\nAbout nitpicks: \r\n> IMO, naming mutating methods get_something is misleading; a more fitting name in this case would be update_validator_round.\r\nFunction itself does not update anything, so I guess `get_*` here is better, since this function is pure.\r\n"}}
{"actor":{"display_login":"popzxc"}}