{"action":"created","comment":{"url":"https://api.github.com/repos/golemfactory/concent/pulls/comments/206337127","pull_request_review_id":141734885,"id":206337127,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNjMzNzEyNw==","diff_hunk":"@@ -0,0 +1,40 @@\n+from enum import IntEnum\n+from enum import unique\n+\n+\n+@unique\n+class PayloadType(IntEnum):\n+    GOLEM_MESSAGE               = 0  # A serialized Golem message.\n+    ERROR                       = 1  # An error code and an error message.\n+    AUTHENTICATION_CHALLENGE    = 2  # A random string of bytes.\n+    AUTHENTICATION_RESPONSE     = 3  # A digital signature of the content sent as authentication challenge.\n+\n+\n+# Random sequence of bytes used as separator between messages. Should be placed after frame.\n+FRAME_SEPARATOR = b'\\x1d\\xb7{\\xb0\\xb9\\x16\\xc8f/\\xd7\\xf0\\xc7\\x06\\x07\\x1e\\xa2'\n+\n+FRAME_SEPARATOR_LENGTH = len(FRAME_SEPARATOR)\n+\n+FRAME_SIGNATURE_BYTES_LENGTH = 65\n+FRAME_REQUEST_ID_BYTES_LENGTH = 4\n+FRAME_PAYLOAD_LENGTH_BYTES_LENGTH = 4\n+\n+FRAME_PAYLOAD_LENGTH_STARTING_BYTE = (\n+    FRAME_SIGNATURE_BYTES_LENGTH +\n+    FRAME_REQUEST_ID_BYTES_LENGTH +\n+    1  # 1 byte for payload_type\n+)\n+\n+FRAME_PAYLOAD_STARTING_BYTE = FRAME_PAYLOAD_LENGTH_STARTING_BYTE + FRAME_PAYLOAD_LENGTH_BYTES_LENGTH\n+\n+ESCAPE_CHARACTER = b'\\xa2\\x1e\\x07\\xc7\\xa2\\x1e\\x07\\xc7\\xa2\\x1e\\x07\\xc7\\xa2\\x1e\\x07\\xc7'\n+ESCAPE_SEQUENCES = {\n+    ESCAPE_CHARACTER: ESCAPE_CHARACTER + b'\\x00',\n+    FRAME_SEPARATOR: ESCAPE_CHARACTER + b'\\x01',\n+}\n+\n+assert ESCAPE_CHARACTER != FRAME_SEPARATOR\n+assert ESCAPE_SEQUENCES[ESCAPE_CHARACTER] != ESCAPE_SEQUENCES[FRAME_SEPARATOR]","path":"middleman_protocol/middleman_protocol/constants.py","position":37,"original_position":37,"commit_id":"8ed6143cf76d006093c6557c4cacfb9a56cf778d","original_commit_id":"3bd13494e2a36c78dd43536c6a2175ecb5475d47","user":{"login":"rwrzesien","id":10088909,"node_id":"MDQ6VXNlcjEwMDg4OTA5","avatar_url":"https://avatars0.githubusercontent.com/u/10088909?v=4","gravatar_id":"","url":"https://api.github.com/users/rwrzesien","html_url":"https://github.com/rwrzesien","followers_url":"https://api.github.com/users/rwrzesien/followers","following_url":"https://api.github.com/users/rwrzesien/following{/other_user}","gists_url":"https://api.github.com/users/rwrzesien/gists{/gist_id}","starred_url":"https://api.github.com/users/rwrzesien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwrzesien/subscriptions","organizations_url":"https://api.github.com/users/rwrzesien/orgs","repos_url":"https://api.github.com/users/rwrzesien/repos","events_url":"https://api.github.com/users/rwrzesien/events{/privacy}","received_events_url":"https://api.github.com/users/rwrzesien/received_events","type":"User","site_admin":false},"body":":+1: done","created_at":"2018-07-30T22:03:46Z","updated_at":"2018-07-30T22:03:47Z","html_url":"https://github.com/golemfactory/concent/pull/673#discussion_r206337127","pull_request_url":"https://api.github.com/repos/golemfactory/concent/pulls/673","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/golemfactory/concent/pulls/comments/206337127"},"html":{"href":"https://github.com/golemfactory/concent/pull/673#discussion_r206337127"},"pull_request":{"href":"https://api.github.com/repos/golemfactory/concent/pulls/673"}},"in_reply_to_id":206230196},"pull_request":{"url":"https://api.github.com/repos/golemfactory/concent/pulls/673","id":202829974,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAyODI5OTc0","html_url":"https://github.com/golemfactory/concent/pull/673","diff_url":"https://github.com/golemfactory/concent/pull/673.diff","patch_url":"https://github.com/golemfactory/concent/pull/673.patch","issue_url":"https://api.github.com/repos/golemfactory/concent/issues/673","number":673,"state":"open","locked":false,"title":"Middleman protocol","user":{"login":"rwrzesien","id":10088909,"node_id":"MDQ6VXNlcjEwMDg4OTA5","avatar_url":"https://avatars0.githubusercontent.com/u/10088909?v=4","gravatar_id":"","url":"https://api.github.com/users/rwrzesien","html_url":"https://github.com/rwrzesien","followers_url":"https://api.github.com/users/rwrzesien/followers","following_url":"https://api.github.com/users/rwrzesien/following{/other_user}","gists_url":"https://api.github.com/users/rwrzesien/gists{/gist_id}","starred_url":"https://api.github.com/users/rwrzesien/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwrzesien/subscriptions","organizations_url":"https://api.github.com/users/rwrzesien/orgs","repos_url":"https://api.github.com/users/rwrzesien/repos","events_url":"https://api.github.com/users/rwrzesien/events{/privacy}","received_events_url":"https://api.github.com/users/rwrzesien/received_events","type":"User","site_admin":false},"body":"Creates message class for Middleman protocol.\r\nCreates helper generator for handling receiving Middleman protocol messages.\r\nAdd tests for messages and helper","created_at":"2018-07-20T12:05:24Z","updated_at":"2018-07-30T22:03:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4a49e0f134211b68ae020346b8d9118438ceec09","assignee":null,"assignees":[],"requested_reviewers":[{"login":"Jakub89","id":20682491,"node_id":"MDQ6VXNlcjIwNjgyNDkx","avatar_url":"https://avatars2.githubusercontent.com/u/20682491?v=4","gravatar_id":"","url":"https://api.github.com/users/Jakub89","html_url":"https://github.com/Jakub89","followers_url":"https://api.github.com/users/Jakub89/followers","following_url":"https://api.github.com/users/Jakub89/following{/other_user}","gists_url":"https://api.github.com/users/Jakub89/gists{/gist_id}","starred_url":"https://api.github.com/users/Jakub89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jakub89/subscriptions","organizations_url":"https://api.github.com/users/Jakub89/orgs","repos_url":"https://api.github.com/users/Jakub89/repos","events_url":"https://api.github.com/users/Jakub89/events{/privacy}","received_events_url":"https://api.github.com/users/Jakub89/received_events","type":"User","site_admin":false},{"login":"bartoszbetka","id":26007109,"node_id":"MDQ6VXNlcjI2MDA3MTA5","avatar_url":"https://avatars0.githubusercontent.com/u/26007109?v=4","gravatar_id":"","url":"https://api.github.com/users/bartoszbetka","html_url":"https://github.com/bartoszbetka","followers_url":"https://api.github.com/users/bartoszbetka/followers","following_url":"https://api.github.com/users/bartoszbetka/following{/other_user}","gists_url":"https://api.github.com/users/bartoszbetka/gists{/gist_id}","starred_url":"https://api.github.com/users/bartoszbetka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bartoszbetka/subscriptions","organizations_url":"https://api.github.com/users/bartoszbetka/orgs","repos_url":"https://api.github.com/users/bartoszbetka/repos","events_url":"https://api.github.com/users/bartoszbetka/events{/privacy}","received_events_url":"https://api.github.com/users/bartoszbetka/received_events","type":"User","site_admin":false},{"login":"pawelkisielewicz","id":36702174,"node_id":"MDQ6VXNlcjM2NzAyMTc0","avatar_url":"https://avatars3.githubusercontent.com/u/36702174?v=4","gravatar_id":"","url":"https://api.github.com/users/pawelkisielewicz","html_url":"https://github.com/pawelkisielewicz","followers_url":"https://api.github.com/users/pawelkisielewicz/followers","following_url":"https://api.github.com/users/pawelkisielewicz/following{/other_user}","gists_url":"https://api.github.com/users/pawelkisielewicz/gists{/gist_id}","starred_url":"https://api.github.com/users/pawelkisielewicz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pawelkisielewicz/subscriptions","organizations_url":"https://api.github.com/users/pawelkisielewicz/orgs","repos_url":"https://api.github.com/users/pawelkisielewicz/repos","events_url":"https://api.github.com/users/pawelkisielewicz/events{/privacy}","received_events_url":"https://api.github.com/users/pawelkisielewicz/received_events","type":"User","site_admin":false},{"login":"MichalW-CP","id":36954871,"node_id":"MDQ6VXNlcjM2OTU0ODcx","avatar_url":"https://avatars3.githubusercontent.com/u/36954871?v=4","gravatar_id":"","url":"https://api.github.com/users/MichalW-CP","html_url":"https://github.com/MichalW-CP","followers_url":"https://api.github.com/users/MichalW-CP/followers","following_url":"https://api.github.com/users/MichalW-CP/following{/other_user}","gists_url":"https://api.github.com/users/MichalW-CP/gists{/gist_id}","starred_url":"https://api.github.com/users/MichalW-CP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichalW-CP/subscriptions","organizations_url":"https://api.github.com/users/MichalW-CP/orgs","repos_url":"https://api.github.com/users/MichalW-CP/repos","events_url":"https://api.github.com/users/MichalW-CP/events{/privacy}","received_events_url":"https://api.github.com/users/MichalW-CP/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/golemfactory/concent/pulls/673/commits","review_comments_url":"https://api.github.com/repos/golemfactory/concent/pulls/673/comments","review_comment_url":"https://api.github.com/repos/golemfactory/concent/pulls/comments{/number}","comments_url":"https://api.github.com/repos/golemfactory/concent/issues/673/comments","statuses_url":"https://api.github.com/repos/golemfactory/concent/statuses/8ed6143cf76d006093c6557c4cacfb9a56cf778d","head":{"label":"golemfactory:feature-middleman-protocol","ref":"feature-middleman-protocol","sha":"8ed6143cf76d006093c6557c4cacfb9a56cf778d","user":{"login":"golemfactory","id":23193179,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMTkzMTc5","avatar_url":"https://avatars1.githubusercontent.com/u/23193179?v=4","gravatar_id":"","url":"https://api.github.com/users/golemfactory","html_url":"https://github.com/golemfactory","followers_url":"https://api.github.com/users/golemfactory/followers","following_url":"https://api.github.com/users/golemfactory/following{/other_user}","gists_url":"https://api.github.com/users/golemfactory/gists{/gist_id}","starred_url":"https://api.github.com/users/golemfactory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/golemfactory/subscriptions","organizations_url":"https://api.github.com/users/golemfactory/orgs","repos_url":"https://api.github.com/users/golemfactory/repos","events_url":"https://api.github.com/users/golemfactory/events{/privacy}","received_events_url":"https://api.github.com/users/golemfactory/received_events","type":"Organization","site_admin":false},"repo":{"id":108836885,"node_id":"MDEwOlJlcG9zaXRvcnkxMDg4MzY4ODU=","name":"concent","full_name":"golemfactory/concent","owner":{"login":"golemfactory","id":23193179,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMTkzMTc5","avatar_url":"https://avatars1.githubusercontent.com/u/23193179?v=4","gravatar_id":"","url":"https://api.github.com/users/golemfactory","html_url":"https://github.com/golemfactory","followers_url":"https://api.github.com/users/golemfactory/followers","following_url":"https://api.github.com/users/golemfactory/following{/other_user}","gists_url":"https://api.github.com/users/golemfactory/gists{/gist_id}","starred_url":"https://api.github.com/users/golemfactory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/golemfactory/subscriptions","organizations_url":"https://api.github.com/users/golemfactory/orgs","repos_url":"https://api.github.com/users/golemfactory/repos","events_url":"https://api.github.com/users/golemfactory/events{/privacy}","received_events_url":"https://api.github.com/users/golemfactory/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/golemfactory/concent","description":"Repository for Concent Service sources","fork":false,"url":"https://api.github.com/repos/golemfactory/concent","forks_url":"https://api.github.com/repos/golemfactory/concent/forks","keys_url":"https://api.github.com/repos/golemfactory/concent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/golemfactory/concent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/golemfactory/concent/teams","hooks_url":"https://api.github.com/repos/golemfactory/concent/hooks","issue_events_url":"https://api.github.com/repos/golemfactory/concent/issues/events{/number}","events_url":"https://api.github.com/repos/golemfactory/concent/events","assignees_url":"https://api.github.com/repos/golemfactory/concent/assignees{/user}","branches_url":"https://api.github.com/repos/golemfactory/concent/branches{/branch}","tags_url":"https://api.github.com/repos/golemfactory/concent/tags","blobs_url":"https://api.github.com/repos/golemfactory/concent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/golemfactory/concent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/golemfactory/concent/git/refs{/sha}","trees_url":"https://api.github.com/repos/golemfactory/concent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/golemfactory/concent/statuses/{sha}","languages_url":"https://api.github.com/repos/golemfactory/concent/languages","stargazers_url":"https://api.github.com/repos/golemfactory/concent/stargazers","contributors_url":"https://api.github.com/repos/golemfactory/concent/contributors","subscribers_url":"https://api.github.com/repos/golemfactory/concent/subscribers","subscription_url":"https://api.github.com/repos/golemfactory/concent/subscription","commits_url":"https://api.github.com/repos/golemfactory/concent/commits{/sha}","git_commits_url":"https://api.github.com/repos/golemfactory/concent/git/commits{/sha}","comments_url":"https://api.github.com/repos/golemfactory/concent/comments{/number}","issue_comment_url":"https://api.github.com/repos/golemfactory/concent/issues/comments{/number}","contents_url":"https://api.github.com/repos/golemfactory/concent/contents/{+path}","compare_url":"https://api.github.com/repos/golemfactory/concent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/golemfactory/concent/merges","archive_url":"https://api.github.com/repos/golemfactory/concent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/golemfactory/concent/downloads","issues_url":"https://api.github.com/repos/golemfactory/concent/issues{/number}","pulls_url":"https://api.github.com/repos/golemfactory/concent/pulls{/number}","milestones_url":"https://api.github.com/repos/golemfactory/concent/milestones{/number}","notifications_url":"https://api.github.com/repos/golemfactory/concent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/golemfactory/concent/labels{/name}","releases_url":"https://api.github.com/repos/golemfactory/concent/releases{/id}","deployments_url":"https://api.github.com/repos/golemfactory/concent/deployments","created_at":"2017-10-30T10:41:44Z","updated_at":"2018-07-25T09:44:24Z","pushed_at":"2018-07-30T21:31:35Z","git_url":"git://github.com/golemfactory/concent.git","ssh_url":"git@github.com:golemfactory/concent.git","clone_url":"https://github.com/golemfactory/concent.git","svn_url":"https://github.com/golemfactory/concent","homepage":null,"size":2459,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":87,"license":null,"forks":2,"open_issues":87,"watchers":4,"default_branch":"master"}},"base":{"label":"golemfactory:master","ref":"master","sha":"8396b46c1098ed98b2ec84928817333107cbadb5","user":{"login":"golemfactory","id":23193179,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMTkzMTc5","avatar_url":"https://avatars1.githubusercontent.com/u/23193179?v=4","gravatar_id":"","url":"https://api.github.com/users/golemfactory","html_url":"https://github.com/golemfactory","followers_url":"https://api.github.com/users/golemfactory/followers","following_url":"https://api.github.com/users/golemfactory/following{/other_user}","gists_url":"https://api.github.com/users/golemfactory/gists{/gist_id}","starred_url":"https://api.github.com/users/golemfactory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/golemfactory/subscriptions","organizations_url":"https://api.github.com/users/golemfactory/orgs","repos_url":"https://api.github.com/users/golemfactory/repos","events_url":"https://api.github.com/users/golemfactory/events{/privacy}","received_events_url":"https://api.github.com/users/golemfactory/received_events","type":"Organization","site_admin":false},"repo":{"id":108836885,"node_id":"MDEwOlJlcG9zaXRvcnkxMDg4MzY4ODU=","name":"concent","full_name":"golemfactory/concent","owner":{"login":"golemfactory","id":23193179,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIzMTkzMTc5","avatar_url":"https://avatars1.githubusercontent.com/u/23193179?v=4","gravatar_id":"","url":"https://api.github.com/users/golemfactory","html_url":"https://github.com/golemfactory","followers_url":"https://api.github.com/users/golemfactory/followers","following_url":"https://api.github.com/users/golemfactory/following{/other_user}","gists_url":"https://api.github.com/users/golemfactory/gists{/gist_id}","starred_url":"https://api.github.com/users/golemfactory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/golemfactory/subscriptions","organizations_url":"https://api.github.com/users/golemfactory/orgs","repos_url":"https://api.github.com/users/golemfactory/repos","events_url":"https://api.github.com/users/golemfactory/events{/privacy}","received_events_url":"https://api.github.com/users/golemfactory/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/golemfactory/concent","description":"Repository for Concent Service sources","fork":false,"url":"https://api.github.com/repos/golemfactory/concent","forks_url":"https://api.github.com/repos/golemfactory/concent/forks","keys_url":"https://api.github.com/repos/golemfactory/concent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/golemfactory/concent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/golemfactory/concent/teams","hooks_url":"https://api.github.com/repos/golemfactory/concent/hooks","issue_events_url":"https://api.github.com/repos/golemfactory/concent/issues/events{/number}","events_url":"https://api.github.com/repos/golemfactory/concent/events","assignees_url":"https://api.github.com/repos/golemfactory/concent/assignees{/user}","branches_url":"https://api.github.com/repos/golemfactory/concent/branches{/branch}","tags_url":"https://api.github.com/repos/golemfactory/concent/tags","blobs_url":"https://api.github.com/repos/golemfactory/concent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/golemfactory/concent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/golemfactory/concent/git/refs{/sha}","trees_url":"https://api.github.com/repos/golemfactory/concent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/golemfactory/concent/statuses/{sha}","languages_url":"https://api.github.com/repos/golemfactory/concent/languages","stargazers_url":"https://api.github.com/repos/golemfactory/concent/stargazers","contributors_url":"https://api.github.com/repos/golemfactory/concent/contributors","subscribers_url":"https://api.github.com/repos/golemfactory/concent/subscribers","subscription_url":"https://api.github.com/repos/golemfactory/concent/subscription","commits_url":"https://api.github.com/repos/golemfactory/concent/commits{/sha}","git_commits_url":"https://api.github.com/repos/golemfactory/concent/git/commits{/sha}","comments_url":"https://api.github.com/repos/golemfactory/concent/comments{/number}","issue_comment_url":"https://api.github.com/repos/golemfactory/concent/issues/comments{/number}","contents_url":"https://api.github.com/repos/golemfactory/concent/contents/{+path}","compare_url":"https://api.github.com/repos/golemfactory/concent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/golemfactory/concent/merges","archive_url":"https://api.github.com/repos/golemfactory/concent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/golemfactory/concent/downloads","issues_url":"https://api.github.com/repos/golemfactory/concent/issues{/number}","pulls_url":"https://api.github.com/repos/golemfactory/concent/pulls{/number}","milestones_url":"https://api.github.com/repos/golemfactory/concent/milestones{/number}","notifications_url":"https://api.github.com/repos/golemfactory/concent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/golemfactory/concent/labels{/name}","releases_url":"https://api.github.com/repos/golemfactory/concent/releases{/id}","deployments_url":"https://api.github.com/repos/golemfactory/concent/deployments","created_at":"2017-10-30T10:41:44Z","updated_at":"2018-07-25T09:44:24Z","pushed_at":"2018-07-30T21:31:35Z","git_url":"git://github.com/golemfactory/concent.git","ssh_url":"git@github.com:golemfactory/concent.git","clone_url":"https://github.com/golemfactory/concent.git","svn_url":"https://github.com/golemfactory/concent","homepage":null,"size":2459,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":87,"license":null,"forks":2,"open_issues":87,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/golemfactory/concent/pulls/673"},"html":{"href":"https://github.com/golemfactory/concent/pull/673"},"issue":{"href":"https://api.github.com/repos/golemfactory/concent/issues/673"},"comments":{"href":"https://api.github.com/repos/golemfactory/concent/issues/673/comments"},"review_comments":{"href":"https://api.github.com/repos/golemfactory/concent/pulls/673/comments"},"review_comment":{"href":"https://api.github.com/repos/golemfactory/concent/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/golemfactory/concent/pulls/673/commits"},"statuses":{"href":"https://api.github.com/repos/golemfactory/concent/statuses/8ed6143cf76d006093c6557c4cacfb9a56cf778d"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"rwrzesien"}}