{"action":"created","comment":{"url":"https://api.github.com/repos/hyperledger/iroha/pulls/comments/167174731","pull_request_review_id":95298522,"id":167174731,"diff_hunk":"@@ -17,72 +17,138 @@ limitations under the License.\n #ifndef TORII_COMMAND_SERVICE_HPP\n #define TORII_COMMAND_SERVICE_HPP\n \n-#include <endpoint.grpc.pb.h>\n-#include <endpoint.pb.h>\n #include <iostream>\n #include <string>\n #include <unordered_map>\n #include \"ametsuchi/storage.hpp\"\n #include \"cache/cache.hpp\"\n+#include \"endpoint.grpc.pb.h\"\n+#include \"endpoint.pb.h\"\n #include \"model/converters/pb_transaction_factory.hpp\"\n #include \"model/transaction_response.hpp\"\n #include \"torii/processor/transaction_processor.hpp\"\n \n namespace torii {\n-\n   /**\n    * Actual implementation of sync CommandService.\n    */\n   class CommandService : public iroha::protocol::CommandService::Service {\n    public:\n+    /**\n+     * Creates a new instance of CommandService\n+     * @param pb_factory - model->protobuf and vice versa converter\n+     * @param tx_processor - processor of received transactions\n+     * @param storage - storage to request transactions outside the cache\n+     * @param start_tx_processing_duration - maximum time between getting a\n+     * StatusStream request and receiving at least one status about processing\n+     * of corresponding transaction\n+     * @param finish_tx_processing_duration - maximum transaction processing\n+     * time. Generally is should be a time of one proposal propagation.\n+     */","path":"irohad/torii/command_service.hpp","position":31,"original_position":34,"commit_id":"341f351a24747106bfbfc8dc5b2592edc3b1f0f4","original_commit_id":"341f351a24747106bfbfc8dc5b2592edc3b1f0f4","user":{"login":"muratovv","id":7502801,"avatar_url":"https://avatars2.githubusercontent.com/u/7502801?v=4","gravatar_id":"","url":"https://api.github.com/users/muratovv","html_url":"https://github.com/muratovv","followers_url":"https://api.github.com/users/muratovv/followers","following_url":"https://api.github.com/users/muratovv/following{/other_user}","gists_url":"https://api.github.com/users/muratovv/gists{/gist_id}","starred_url":"https://api.github.com/users/muratovv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muratovv/subscriptions","organizations_url":"https://api.github.com/users/muratovv/orgs","repos_url":"https://api.github.com/users/muratovv/repos","events_url":"https://api.github.com/users/muratovv/events{/privacy}","received_events_url":"https://api.github.com/users/muratovv/received_events","type":"User","site_admin":false},"body":"I guess, better to create one dependency with proposal propagation time.","created_at":"2018-02-09T09:18:20Z","updated_at":"2018-02-09T09:38:11Z","html_url":"https://github.com/hyperledger/iroha/pull/947#discussion_r167174731","pull_request_url":"https://api.github.com/repos/hyperledger/iroha/pulls/947","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/hyperledger/iroha/pulls/comments/167174731"},"html":{"href":"https://github.com/hyperledger/iroha/pull/947#discussion_r167174731"},"pull_request":{"href":"https://api.github.com/repos/hyperledger/iroha/pulls/947"}}},"pull_request":{"url":"https://api.github.com/repos/hyperledger/iroha/pulls/947","id":167456991,"html_url":"https://github.com/hyperledger/iroha/pull/947","diff_url":"https://github.com/hyperledger/iroha/pull/947.diff","patch_url":"https://github.com/hyperledger/iroha/pull/947.patch","issue_url":"https://api.github.com/repos/hyperledger/iroha/issues/947","number":947,"state":"open","locked":false,"title":"Torii streaming","user":{"login":"luckychess","id":3829208,"avatar_url":"https://avatars3.githubusercontent.com/u/3829208?v=4","gravatar_id":"","url":"https://api.github.com/users/luckychess","html_url":"https://github.com/luckychess","followers_url":"https://api.github.com/users/luckychess/followers","following_url":"https://api.github.com/users/luckychess/following{/other_user}","gists_url":"https://api.github.com/users/luckychess/gists{/gist_id}","starred_url":"https://api.github.com/users/luckychess/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luckychess/subscriptions","organizations_url":"https://api.github.com/users/luckychess/orgs","repos_url":"https://api.github.com/users/luckychess/repos","events_url":"https://api.github.com/users/luckychess/events{/privacy}","received_events_url":"https://api.github.com/users/luckychess/received_events","type":"User","site_admin":false},"body":"<!-- You will not see HTML commented line in Pull Request body -->\r\n<!-- Optional sections may be omitted. Just remove them or write None -->\r\n\r\n<!-- ### Requirements -->\r\n<!-- * Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion. -->\r\n<!-- * All new code must have code coverage above 70% (https://docs.codecov.io/docs/about-code-coverage). -->\r\n<!-- * CircleCI builds must be passed. -->\r\n<!-- * Critical and blocker issues reported by Sorabot must be fixed. -->\r\n<!-- * Branch must be rebased onto base branch (https://soramitsu.atlassian.net/wiki/spaces/IS/pages/11173889/Rebase+and+merge+guide). -->\r\n\r\n\r\n### Description of the Change\r\n\r\n<!-- We must be able to understand the design of your change from this description. If we can't get a good idea of what the code will be doing from the description here, the pull request may be closed at the maintainers' discretion. -->\r\n<!-- Keep in mind that the maintainer reviewing this PR may not be familiar with or have worked with the code here recently, so please walk us through the concepts. -->\r\n\r\nStreaming grpc call for transaction statuses.\r\n\r\n### Benefits\r\n\r\n<!-- What benefits will be realized by the code change? -->\r\nWe want to have a push-based notifications for tx statuses so here we are.\r\n\r\n### Possible Drawbacks \r\n\r\n<!-- What are the possible side-effects or negative impacts of the code change? -->\r\n<!-- If no drawbacks, explicitly mention this (write None) -->\r\nEach streaming call can theoretically block one of grpc thread up to a second. This timeout can be decreased in a least 10 times but it allows to start streaming call before transaction sending.\r\n\r\n### Usage Examples or Tests *[optional]*\r\n\r\n<!-- Point reviewers to the test, code example or documentation which shows usage example of this feature -->\r\nTwo tests were added to torii_service_test.\r\n\r\n### Alternate Designs *[optional]*\r\n\r\n<!-- Explain what other alternates were considered and why the proposed version was selected -->\r\nTwo main possibilities were checked: use combined Torii request which will return stream of responses or use separate calls for that (the second one was actually implemented). The first approach was faced with thread-related difficulties (kick me and I explain details).\r\n","created_at":"2018-02-06T16:07:56Z","updated_at":"2018-02-09T09:38:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a80a1960718b33b2be773c9b95e4751492b13a4c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/hyperledger/iroha/pulls/947/commits","review_comments_url":"https://api.github.com/repos/hyperledger/iroha/pulls/947/comments","review_comment_url":"https://api.github.com/repos/hyperledger/iroha/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hyperledger/iroha/issues/947/comments","statuses_url":"https://api.github.com/repos/hyperledger/iroha/statuses/341f351a24747106bfbfc8dc5b2592edc3b1f0f4","head":{"label":"hyperledger:feature/torii_streaming_dev","ref":"feature/torii_streaming_dev","sha":"341f351a24747106bfbfc8dc5b2592edc3b1f0f4","user":{"login":"hyperledger","id":7657900,"avatar_url":"https://avatars2.githubusercontent.com/u/7657900?v=4","gravatar_id":"","url":"https://api.github.com/users/hyperledger","html_url":"https://github.com/hyperledger","followers_url":"https://api.github.com/users/hyperledger/followers","following_url":"https://api.github.com/users/hyperledger/following{/other_user}","gists_url":"https://api.github.com/users/hyperledger/gists{/gist_id}","starred_url":"https://api.github.com/users/hyperledger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyperledger/subscriptions","organizations_url":"https://api.github.com/users/hyperledger/orgs","repos_url":"https://api.github.com/users/hyperledger/repos","events_url":"https://api.github.com/users/hyperledger/events{/privacy}","received_events_url":"https://api.github.com/users/hyperledger/received_events","type":"Organization","site_admin":false},"repo":{"id":67340575,"name":"iroha","full_name":"hyperledger/iroha","owner":{"login":"hyperledger","id":7657900,"avatar_url":"https://avatars2.githubusercontent.com/u/7657900?v=4","gravatar_id":"","url":"https://api.github.com/users/hyperledger","html_url":"https://github.com/hyperledger","followers_url":"https://api.github.com/users/hyperledger/followers","following_url":"https://api.github.com/users/hyperledger/following{/other_user}","gists_url":"https://api.github.com/users/hyperledger/gists{/gist_id}","starred_url":"https://api.github.com/users/hyperledger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyperledger/subscriptions","organizations_url":"https://api.github.com/users/hyperledger/orgs","repos_url":"https://api.github.com/users/hyperledger/repos","events_url":"https://api.github.com/users/hyperledger/events{/privacy}","received_events_url":"https://api.github.com/users/hyperledger/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hyperledger/iroha","description":"Iroha - A simple, decentralized ledger","fork":false,"url":"https://api.github.com/repos/hyperledger/iroha","forks_url":"https://api.github.com/repos/hyperledger/iroha/forks","keys_url":"https://api.github.com/repos/hyperledger/iroha/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hyperledger/iroha/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hyperledger/iroha/teams","hooks_url":"https://api.github.com/repos/hyperledger/iroha/hooks","issue_events_url":"https://api.github.com/repos/hyperledger/iroha/issues/events{/number}","events_url":"https://api.github.com/repos/hyperledger/iroha/events","assignees_url":"https://api.github.com/repos/hyperledger/iroha/assignees{/user}","branches_url":"https://api.github.com/repos/hyperledger/iroha/branches{/branch}","tags_url":"https://api.github.com/repos/hyperledger/iroha/tags","blobs_url":"https://api.github.com/repos/hyperledger/iroha/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hyperledger/iroha/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hyperledger/iroha/git/refs{/sha}","trees_url":"https://api.github.com/repos/hyperledger/iroha/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hyperledger/iroha/statuses/{sha}","languages_url":"https://api.github.com/repos/hyperledger/iroha/languages","stargazers_url":"https://api.github.com/repos/hyperledger/iroha/stargazers","contributors_url":"https://api.github.com/repos/hyperledger/iroha/contributors","subscribers_url":"https://api.github.com/repos/hyperledger/iroha/subscribers","subscription_url":"https://api.github.com/repos/hyperledger/iroha/subscription","commits_url":"https://api.github.com/repos/hyperledger/iroha/commits{/sha}","git_commits_url":"https://api.github.com/repos/hyperledger/iroha/git/commits{/sha}","comments_url":"https://api.github.com/repos/hyperledger/iroha/comments{/number}","issue_comment_url":"https://api.github.com/repos/hyperledger/iroha/issues/comments{/number}","contents_url":"https://api.github.com/repos/hyperledger/iroha/contents/{+path}","compare_url":"https://api.github.com/repos/hyperledger/iroha/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hyperledger/iroha/merges","archive_url":"https://api.github.com/repos/hyperledger/iroha/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hyperledger/iroha/downloads","issues_url":"https://api.github.com/repos/hyperledger/iroha/issues{/number}","pulls_url":"https://api.github.com/repos/hyperledger/iroha/pulls{/number}","milestones_url":"https://api.github.com/repos/hyperledger/iroha/milestones{/number}","notifications_url":"https://api.github.com/repos/hyperledger/iroha/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hyperledger/iroha/labels{/name}","releases_url":"https://api.github.com/repos/hyperledger/iroha/releases{/id}","deployments_url":"https://api.github.com/repos/hyperledger/iroha/deployments","created_at":"2016-09-04T11:17:53Z","updated_at":"2018-02-09T01:46:02Z","pushed_at":"2018-02-09T06:44:24Z","git_url":"git://github.com/hyperledger/iroha.git","ssh_url":"git@github.com:hyperledger/iroha.git","clone_url":"https://github.com/hyperledger/iroha.git","svn_url":"https://github.com/hyperledger/iroha","homepage":"http://iroha.tech","size":44459,"stargazers_count":576,"watchers_count":576,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":193,"mirror_url":null,"archived":false,"open_issues_count":44,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":193,"open_issues":44,"watchers":576,"default_branch":"master"}},"base":{"label":"hyperledger:develop","ref":"develop","sha":"b4ee15e6b773220adef93cd4fe5a362d7c021e3f","user":{"login":"hyperledger","id":7657900,"avatar_url":"https://avatars2.githubusercontent.com/u/7657900?v=4","gravatar_id":"","url":"https://api.github.com/users/hyperledger","html_url":"https://github.com/hyperledger","followers_url":"https://api.github.com/users/hyperledger/followers","following_url":"https://api.github.com/users/hyperledger/following{/other_user}","gists_url":"https://api.github.com/users/hyperledger/gists{/gist_id}","starred_url":"https://api.github.com/users/hyperledger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyperledger/subscriptions","organizations_url":"https://api.github.com/users/hyperledger/orgs","repos_url":"https://api.github.com/users/hyperledger/repos","events_url":"https://api.github.com/users/hyperledger/events{/privacy}","received_events_url":"https://api.github.com/users/hyperledger/received_events","type":"Organization","site_admin":false},"repo":{"id":67340575,"name":"iroha","full_name":"hyperledger/iroha","owner":{"login":"hyperledger","id":7657900,"avatar_url":"https://avatars2.githubusercontent.com/u/7657900?v=4","gravatar_id":"","url":"https://api.github.com/users/hyperledger","html_url":"https://github.com/hyperledger","followers_url":"https://api.github.com/users/hyperledger/followers","following_url":"https://api.github.com/users/hyperledger/following{/other_user}","gists_url":"https://api.github.com/users/hyperledger/gists{/gist_id}","starred_url":"https://api.github.com/users/hyperledger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyperledger/subscriptions","organizations_url":"https://api.github.com/users/hyperledger/orgs","repos_url":"https://api.github.com/users/hyperledger/repos","events_url":"https://api.github.com/users/hyperledger/events{/privacy}","received_events_url":"https://api.github.com/users/hyperledger/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hyperledger/iroha","description":"Iroha - A simple, decentralized ledger","fork":false,"url":"https://api.github.com/repos/hyperledger/iroha","forks_url":"https://api.github.com/repos/hyperledger/iroha/forks","keys_url":"https://api.github.com/repos/hyperledger/iroha/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hyperledger/iroha/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hyperledger/iroha/teams","hooks_url":"https://api.github.com/repos/hyperledger/iroha/hooks","issue_events_url":"https://api.github.com/repos/hyperledger/iroha/issues/events{/number}","events_url":"https://api.github.com/repos/hyperledger/iroha/events","assignees_url":"https://api.github.com/repos/hyperledger/iroha/assignees{/user}","branches_url":"https://api.github.com/repos/hyperledger/iroha/branches{/branch}","tags_url":"https://api.github.com/repos/hyperledger/iroha/tags","blobs_url":"https://api.github.com/repos/hyperledger/iroha/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hyperledger/iroha/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hyperledger/iroha/git/refs{/sha}","trees_url":"https://api.github.com/repos/hyperledger/iroha/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hyperledger/iroha/statuses/{sha}","languages_url":"https://api.github.com/repos/hyperledger/iroha/languages","stargazers_url":"https://api.github.com/repos/hyperledger/iroha/stargazers","contributors_url":"https://api.github.com/repos/hyperledger/iroha/contributors","subscribers_url":"https://api.github.com/repos/hyperledger/iroha/subscribers","subscription_url":"https://api.github.com/repos/hyperledger/iroha/subscription","commits_url":"https://api.github.com/repos/hyperledger/iroha/commits{/sha}","git_commits_url":"https://api.github.com/repos/hyperledger/iroha/git/commits{/sha}","comments_url":"https://api.github.com/repos/hyperledger/iroha/comments{/number}","issue_comment_url":"https://api.github.com/repos/hyperledger/iroha/issues/comments{/number}","contents_url":"https://api.github.com/repos/hyperledger/iroha/contents/{+path}","compare_url":"https://api.github.com/repos/hyperledger/iroha/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hyperledger/iroha/merges","archive_url":"https://api.github.com/repos/hyperledger/iroha/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hyperledger/iroha/downloads","issues_url":"https://api.github.com/repos/hyperledger/iroha/issues{/number}","pulls_url":"https://api.github.com/repos/hyperledger/iroha/pulls{/number}","milestones_url":"https://api.github.com/repos/hyperledger/iroha/milestones{/number}","notifications_url":"https://api.github.com/repos/hyperledger/iroha/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hyperledger/iroha/labels{/name}","releases_url":"https://api.github.com/repos/hyperledger/iroha/releases{/id}","deployments_url":"https://api.github.com/repos/hyperledger/iroha/deployments","created_at":"2016-09-04T11:17:53Z","updated_at":"2018-02-09T01:46:02Z","pushed_at":"2018-02-09T06:44:24Z","git_url":"git://github.com/hyperledger/iroha.git","ssh_url":"git@github.com:hyperledger/iroha.git","clone_url":"https://github.com/hyperledger/iroha.git","svn_url":"https://github.com/hyperledger/iroha","homepage":"http://iroha.tech","size":44459,"stargazers_count":576,"watchers_count":576,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":193,"mirror_url":null,"archived":false,"open_issues_count":44,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":193,"open_issues":44,"watchers":576,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hyperledger/iroha/pulls/947"},"html":{"href":"https://github.com/hyperledger/iroha/pull/947"},"issue":{"href":"https://api.github.com/repos/hyperledger/iroha/issues/947"},"comments":{"href":"https://api.github.com/repos/hyperledger/iroha/issues/947/comments"},"review_comments":{"href":"https://api.github.com/repos/hyperledger/iroha/pulls/947/comments"},"review_comment":{"href":"https://api.github.com/repos/hyperledger/iroha/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hyperledger/iroha/pulls/947/commits"},"statuses":{"href":"https://api.github.com/repos/hyperledger/iroha/statuses/341f351a24747106bfbfc8dc5b2592edc3b1f0f4"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"muratovv"}}