{"action":"created","comment":{"url":"https://api.github.com/repos/aeternity/epoch/pulls/comments/177784103","pull_request_review_id":107706634,"id":177784103,"diff_hunk":"@@ -105,37 +104,37 @@ application_test(Config) ->\n \n     app_stop(StartedApps -- ?TO_BE_STOPPED_APPS_BLACKLIST, TempDir).\n \n-aec_sync_test(Config) ->\n-    application:set_env(jobs, queues,\n-                        [{sync_jobs, [passive]},\n-                         {sync_workers, [{regulators, [{counter, [{limit, 4}]}]},\n-                                         {producer, {aec_sync, sync_worker, []}}\n-                                        ]}]),\n-    {ok, StartedApps, TempDir} = prepare_app_start(aecore, Config),\n-    ct:log(\"jobs running with env: ~p\", [application:get_env(jobs, queues)]),\n-    aec_test_utils:fake_start_aehttp(),\n-\n-    ok = application:start(aecore),\n-    SyncPid = whereis(aec_sync),\n-    ct:log(\"Running aec_sync ~p\", [SyncPid]),\n-\n-    ok = aec_sync:connect_peer(\"http://my.evil_machine:3012/\"),\n-    ct:log(\"trying to connect --> job scheduled\"),\n-    %% give it some time to execute the scheduled job\n-    timer:sleep(50),   \n-    false = aec_peers:is_blocked(\"http://my.evil_machine:3012/\"),\n-    ct:log(\"as expected not blocked\"),\n-\n-    ok = aec_sync:connect_peer(\"http://my.evil_machine:3012/\"),\n-    ct:log(\"trying to connect again --> job scheduled\"),\n-    timer:sleep(50),\n-    SyncPid = whereis(aec_sync), %% Sync has not been restarted!\n-    Peers = aec_peers:all(),\n-    ct:log(\"tried twice and although it failed, it is a peer: ~p\", [Peers]),\n-    1 = length(Peers),\n-\n-    ok = application:stop(aecore),\n-    app_stop(StartedApps -- ?TO_BE_STOPPED_APPS_BLACKLIST, TempDir).\n+%% aec_sync_test(Config) ->","path":"apps/aecore/test/aec_eunit_SUITE.erl","position":66,"original_position":66,"commit_id":"6a19de605d1e394fd066d847e66990fe98502e87","original_commit_id":"63417a177aba127c02278d2bdff1646db371e619","user":{"login":"uwiger","id":160216,"avatar_url":"https://avatars3.githubusercontent.com/u/160216?v=4","gravatar_id":"","url":"https://api.github.com/users/uwiger","html_url":"https://github.com/uwiger","followers_url":"https://api.github.com/users/uwiger/followers","following_url":"https://api.github.com/users/uwiger/following{/other_user}","gists_url":"https://api.github.com/users/uwiger/gists{/gist_id}","starred_url":"https://api.github.com/users/uwiger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uwiger/subscriptions","organizations_url":"https://api.github.com/users/uwiger/orgs","repos_url":"https://api.github.com/users/uwiger/repos","events_url":"https://api.github.com/users/uwiger/events{/privacy}","received_events_url":"https://api.github.com/users/uwiger/received_events","type":"User","site_admin":false},"body":"Perhaps delete?","created_at":"2018-03-28T15:09:04Z","updated_at":"2018-03-28T15:22:57Z","html_url":"https://github.com/aeternity/epoch/pull/891#discussion_r177784103","pull_request_url":"https://api.github.com/repos/aeternity/epoch/pulls/891","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/aeternity/epoch/pulls/comments/177784103"},"html":{"href":"https://github.com/aeternity/epoch/pull/891#discussion_r177784103"},"pull_request":{"href":"https://api.github.com/repos/aeternity/epoch/pulls/891"}}},"pull_request":{"url":"https://api.github.com/repos/aeternity/epoch/pulls/891","id":177014050,"html_url":"https://github.com/aeternity/epoch/pull/891","diff_url":"https://github.com/aeternity/epoch/pull/891.diff","patch_url":"https://github.com/aeternity/epoch/pull/891.patch","issue_url":"https://api.github.com/repos/aeternity/epoch/issues/891","number":891,"state":"open","locked":false,"title":"New sync protocol","user":{"login":"hanssv","id":86615,"avatar_url":"https://avatars2.githubusercontent.com/u/86615?v=4","gravatar_id":"","url":"https://api.github.com/users/hanssv","html_url":"https://github.com/hanssv","followers_url":"https://api.github.com/users/hanssv/followers","following_url":"https://api.github.com/users/hanssv/following{/other_user}","gists_url":"https://api.github.com/users/hanssv/gists{/gist_id}","starred_url":"https://api.github.com/users/hanssv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hanssv/subscriptions","organizations_url":"https://api.github.com/users/hanssv/orgs","repos_url":"https://api.github.com/users/hanssv/repos","events_url":"https://api.github.com/users/hanssv/events{/privacy}","received_events_url":"https://api.github.com/users/hanssv/received_events","type":"User","site_admin":false},"body":"More or less the complete solution - see TODO below.\r\n\r\nRemoves the HTTP API for ping, and instead introduce a `sync_port` where the node will listen for incoming TCP connections. A secure Noise handshake is made (using the protocol version and genesis hash to ensure nodes are compatible) and then this connection is kept for ping, sync, gossip, etc.\r\n\r\nThis includes a major rewrite of `aec_peers` and the introduction of `aec_peer_connection` - the new module contains all the logic for P2P communication (previously scattered between `aeu_request`, `aehttp_dispatch_ext` etc...).\r\n\r\nTODO:\r\n- [ ] Document the changes to the configuration and the new overall sync behavior \r\n- [x] Implement message fragmentation (once serialized blocks gets bigger than 2^16 bytes we hit this)\r\n- [x] Fix the tests for blocked nodes + aec_peers\r\n- [x] Fix python tests\r\n- [x] Fix the Peers endpoint (format changed)\r\n- [x] Python test_use_cases (should use Peers endpoint) \r\n- ~~Eventually give up if connection/handshake works but we fail pinging - postpone this to upcoming work with peer discovery~~\r\n- [x] Remove more dead-code (aeu_request, etc...)\r\n- [x] Go through all the logging and remove and re-label them\r\n- [ ] Synchronize with the work in serialization - currently using `msgpack`","created_at":"2018-03-23T09:32:32Z","updated_at":"2018-03-28T15:22:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"874da511f7ec56f81f1c0438cc3af5746256e855","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/aeternity/epoch/pulls/891/commits","review_comments_url":"https://api.github.com/repos/aeternity/epoch/pulls/891/comments","review_comment_url":"https://api.github.com/repos/aeternity/epoch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aeternity/epoch/issues/891/comments","statuses_url":"https://api.github.com/repos/aeternity/epoch/statuses/6a19de605d1e394fd066d847e66990fe98502e87","head":{"label":"aeternity:new_sync_protocol","ref":"new_sync_protocol","sha":"6a19de605d1e394fd066d847e66990fe98502e87","user":{"login":"aeternity","id":21989234,"avatar_url":"https://avatars1.githubusercontent.com/u/21989234?v=4","gravatar_id":"","url":"https://api.github.com/users/aeternity","html_url":"https://github.com/aeternity","followers_url":"https://api.github.com/users/aeternity/followers","following_url":"https://api.github.com/users/aeternity/following{/other_user}","gists_url":"https://api.github.com/users/aeternity/gists{/gist_id}","starred_url":"https://api.github.com/users/aeternity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aeternity/subscriptions","organizations_url":"https://api.github.com/users/aeternity/orgs","repos_url":"https://api.github.com/users/aeternity/repos","events_url":"https://api.github.com/users/aeternity/events{/privacy}","received_events_url":"https://api.github.com/users/aeternity/received_events","type":"Organization","site_admin":false},"repo":{"id":99802036,"name":"epoch","full_name":"aeternity/epoch","owner":{"login":"aeternity","id":21989234,"avatar_url":"https://avatars1.githubusercontent.com/u/21989234?v=4","gravatar_id":"","url":"https://api.github.com/users/aeternity","html_url":"https://github.com/aeternity","followers_url":"https://api.github.com/users/aeternity/followers","following_url":"https://api.github.com/users/aeternity/following{/other_user}","gists_url":"https://api.github.com/users/aeternity/gists{/gist_id}","starred_url":"https://api.github.com/users/aeternity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aeternity/subscriptions","organizations_url":"https://api.github.com/users/aeternity/orgs","repos_url":"https://api.github.com/users/aeternity/repos","events_url":"https://api.github.com/users/aeternity/events{/privacy}","received_events_url":"https://api.github.com/users/aeternity/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aeternity/epoch","description":"æternity testnet: solving scalability problems by making sense of state-channels ","fork":false,"url":"https://api.github.com/repos/aeternity/epoch","forks_url":"https://api.github.com/repos/aeternity/epoch/forks","keys_url":"https://api.github.com/repos/aeternity/epoch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aeternity/epoch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aeternity/epoch/teams","hooks_url":"https://api.github.com/repos/aeternity/epoch/hooks","issue_events_url":"https://api.github.com/repos/aeternity/epoch/issues/events{/number}","events_url":"https://api.github.com/repos/aeternity/epoch/events","assignees_url":"https://api.github.com/repos/aeternity/epoch/assignees{/user}","branches_url":"https://api.github.com/repos/aeternity/epoch/branches{/branch}","tags_url":"https://api.github.com/repos/aeternity/epoch/tags","blobs_url":"https://api.github.com/repos/aeternity/epoch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aeternity/epoch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aeternity/epoch/git/refs{/sha}","trees_url":"https://api.github.com/repos/aeternity/epoch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aeternity/epoch/statuses/{sha}","languages_url":"https://api.github.com/repos/aeternity/epoch/languages","stargazers_url":"https://api.github.com/repos/aeternity/epoch/stargazers","contributors_url":"https://api.github.com/repos/aeternity/epoch/contributors","subscribers_url":"https://api.github.com/repos/aeternity/epoch/subscribers","subscription_url":"https://api.github.com/repos/aeternity/epoch/subscription","commits_url":"https://api.github.com/repos/aeternity/epoch/commits{/sha}","git_commits_url":"https://api.github.com/repos/aeternity/epoch/git/commits{/sha}","comments_url":"https://api.github.com/repos/aeternity/epoch/comments{/number}","issue_comment_url":"https://api.github.com/repos/aeternity/epoch/issues/comments{/number}","contents_url":"https://api.github.com/repos/aeternity/epoch/contents/{+path}","compare_url":"https://api.github.com/repos/aeternity/epoch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aeternity/epoch/merges","archive_url":"https://api.github.com/repos/aeternity/epoch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aeternity/epoch/downloads","issues_url":"https://api.github.com/repos/aeternity/epoch/issues{/number}","pulls_url":"https://api.github.com/repos/aeternity/epoch/pulls{/number}","milestones_url":"https://api.github.com/repos/aeternity/epoch/milestones{/number}","notifications_url":"https://api.github.com/repos/aeternity/epoch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aeternity/epoch/labels{/name}","releases_url":"https://api.github.com/repos/aeternity/epoch/releases{/id}","deployments_url":"https://api.github.com/repos/aeternity/epoch/deployments","created_at":"2017-08-09T11:44:30Z","updated_at":"2018-03-28T14:29:59Z","pushed_at":"2018-03-28T15:16:04Z","git_url":"git://github.com/aeternity/epoch.git","ssh_url":"git@github.com:aeternity/epoch.git","clone_url":"https://github.com/aeternity/epoch.git","svn_url":"https://github.com/aeternity/epoch","homepage":"http://www.aeternity.com","size":5468,"stargazers_count":431,"watchers_count":431,"language":"Erlang","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":75,"mirror_url":null,"archived":false,"open_issues_count":13,"license":{"key":"isc","name":"ISC License","spdx_id":"ISC","url":"https://api.github.com/licenses/isc"},"forks":75,"open_issues":13,"watchers":431,"default_branch":"master"}},"base":{"label":"aeternity:master","ref":"master","sha":"633c3054233709025a83fc6e26dce7c554d32fbe","user":{"login":"aeternity","id":21989234,"avatar_url":"https://avatars1.githubusercontent.com/u/21989234?v=4","gravatar_id":"","url":"https://api.github.com/users/aeternity","html_url":"https://github.com/aeternity","followers_url":"https://api.github.com/users/aeternity/followers","following_url":"https://api.github.com/users/aeternity/following{/other_user}","gists_url":"https://api.github.com/users/aeternity/gists{/gist_id}","starred_url":"https://api.github.com/users/aeternity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aeternity/subscriptions","organizations_url":"https://api.github.com/users/aeternity/orgs","repos_url":"https://api.github.com/users/aeternity/repos","events_url":"https://api.github.com/users/aeternity/events{/privacy}","received_events_url":"https://api.github.com/users/aeternity/received_events","type":"Organization","site_admin":false},"repo":{"id":99802036,"name":"epoch","full_name":"aeternity/epoch","owner":{"login":"aeternity","id":21989234,"avatar_url":"https://avatars1.githubusercontent.com/u/21989234?v=4","gravatar_id":"","url":"https://api.github.com/users/aeternity","html_url":"https://github.com/aeternity","followers_url":"https://api.github.com/users/aeternity/followers","following_url":"https://api.github.com/users/aeternity/following{/other_user}","gists_url":"https://api.github.com/users/aeternity/gists{/gist_id}","starred_url":"https://api.github.com/users/aeternity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aeternity/subscriptions","organizations_url":"https://api.github.com/users/aeternity/orgs","repos_url":"https://api.github.com/users/aeternity/repos","events_url":"https://api.github.com/users/aeternity/events{/privacy}","received_events_url":"https://api.github.com/users/aeternity/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aeternity/epoch","description":"æternity testnet: solving scalability problems by making sense of state-channels ","fork":false,"url":"https://api.github.com/repos/aeternity/epoch","forks_url":"https://api.github.com/repos/aeternity/epoch/forks","keys_url":"https://api.github.com/repos/aeternity/epoch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aeternity/epoch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aeternity/epoch/teams","hooks_url":"https://api.github.com/repos/aeternity/epoch/hooks","issue_events_url":"https://api.github.com/repos/aeternity/epoch/issues/events{/number}","events_url":"https://api.github.com/repos/aeternity/epoch/events","assignees_url":"https://api.github.com/repos/aeternity/epoch/assignees{/user}","branches_url":"https://api.github.com/repos/aeternity/epoch/branches{/branch}","tags_url":"https://api.github.com/repos/aeternity/epoch/tags","blobs_url":"https://api.github.com/repos/aeternity/epoch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aeternity/epoch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aeternity/epoch/git/refs{/sha}","trees_url":"https://api.github.com/repos/aeternity/epoch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aeternity/epoch/statuses/{sha}","languages_url":"https://api.github.com/repos/aeternity/epoch/languages","stargazers_url":"https://api.github.com/repos/aeternity/epoch/stargazers","contributors_url":"https://api.github.com/repos/aeternity/epoch/contributors","subscribers_url":"https://api.github.com/repos/aeternity/epoch/subscribers","subscription_url":"https://api.github.com/repos/aeternity/epoch/subscription","commits_url":"https://api.github.com/repos/aeternity/epoch/commits{/sha}","git_commits_url":"https://api.github.com/repos/aeternity/epoch/git/commits{/sha}","comments_url":"https://api.github.com/repos/aeternity/epoch/comments{/number}","issue_comment_url":"https://api.github.com/repos/aeternity/epoch/issues/comments{/number}","contents_url":"https://api.github.com/repos/aeternity/epoch/contents/{+path}","compare_url":"https://api.github.com/repos/aeternity/epoch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aeternity/epoch/merges","archive_url":"https://api.github.com/repos/aeternity/epoch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aeternity/epoch/downloads","issues_url":"https://api.github.com/repos/aeternity/epoch/issues{/number}","pulls_url":"https://api.github.com/repos/aeternity/epoch/pulls{/number}","milestones_url":"https://api.github.com/repos/aeternity/epoch/milestones{/number}","notifications_url":"https://api.github.com/repos/aeternity/epoch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aeternity/epoch/labels{/name}","releases_url":"https://api.github.com/repos/aeternity/epoch/releases{/id}","deployments_url":"https://api.github.com/repos/aeternity/epoch/deployments","created_at":"2017-08-09T11:44:30Z","updated_at":"2018-03-28T14:29:59Z","pushed_at":"2018-03-28T15:16:04Z","git_url":"git://github.com/aeternity/epoch.git","ssh_url":"git@github.com:aeternity/epoch.git","clone_url":"https://github.com/aeternity/epoch.git","svn_url":"https://github.com/aeternity/epoch","homepage":"http://www.aeternity.com","size":5468,"stargazers_count":431,"watchers_count":431,"language":"Erlang","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":75,"mirror_url":null,"archived":false,"open_issues_count":13,"license":{"key":"isc","name":"ISC License","spdx_id":"ISC","url":"https://api.github.com/licenses/isc"},"forks":75,"open_issues":13,"watchers":431,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aeternity/epoch/pulls/891"},"html":{"href":"https://github.com/aeternity/epoch/pull/891"},"issue":{"href":"https://api.github.com/repos/aeternity/epoch/issues/891"},"comments":{"href":"https://api.github.com/repos/aeternity/epoch/issues/891/comments"},"review_comments":{"href":"https://api.github.com/repos/aeternity/epoch/pulls/891/comments"},"review_comment":{"href":"https://api.github.com/repos/aeternity/epoch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aeternity/epoch/pulls/891/commits"},"statuses":{"href":"https://api.github.com/repos/aeternity/epoch/statuses/6a19de605d1e394fd066d847e66990fe98502e87"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"uwiger"}}