{"action":"created","comment":{"url":"https://api.github.com/repos/aeternity/epoch/pulls/comments/231853025","pull_request_review_id":172911271,"id":231853025,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMTg1MzAyNQ==","diff_hunk":"@@ -373,17 +379,147 @@ test_block_publishing() ->\n     ?assertEqual([], flush_gproc()),\n     ok.\n \n+%%%===================================================================\n+%%% Micro block signing tests\n+%%%===================================================================\n+\n+generation_test_() ->\n+    {foreach,\n+     fun() ->\n+             TmpKeysDir = setup_common(),\n+             {ok, _} = ?TEST_MODULE:start_link([{autostart, false}]),\n+             meck:new(aec_headers, [passthrough]),\n+             meck:new(aec_blocks, [passthrough]),\n+             meck:expect(aec_headers, validate_key_block_header, fun(_) -> ok end),\n+             meck:expect(aec_headers, validate_micro_block_header, fun(_) -> ok end),\n+             meck:expect(aec_blocks, validate_key_block, fun(_) -> ok end),\n+             meck:expect(aec_blocks, validate_micro_block, fun(_) -> ok end),\n+             TmpKeysDir\n+     end,\n+     fun(TmpKeysDir) ->\n+             teardown_common(TmpKeysDir),\n+             meck:unload(aec_headers),\n+             meck:unload(aec_blocks),\n+             ok\n+     end,\n+     [\n+        {\"Start signing after mined block\", fun test_mined_block_signing/0},\n+        {\"Start signing after two mined block\", fun test_two_mined_block_signing/0},\n+        {\"Start signing after received block\", fun test_received_block_signing/0}\n+     ]}.\n+\n+test_mined_block_signing() ->\n+    Keys = beneficiary_keys(),\n+    true = aec_events:subscribe(block_created),\n+    true = aec_events:subscribe(micro_block_created),\n+\n+    ?TEST_MODULE:start_mining(),\n+    assert_leader(false),\n+    assert_generation_state(stopped),\n+    KeyBlock = wait_for_block_created(),\n+    assert_leader(true),\n+    assert_generation_state(running),\n+\n+    ok = aec_tx_pool:push(tx(Keys)),\n+\n+    MicroBlock = wait_for_micro_block_created(),\n+    {ok, KeyHash} = aec_blocks:hash_internal_representation(KeyBlock),\n+    ?assertEqual(KeyHash, aec_blocks:prev_key_hash(MicroBlock)),","path":"apps/aecore/test/aec_conductor_tests.erl","position":182,"original_position":149,"commit_id":"008bfca3f2b517e39efb9616fb7c0c0cdc78e6d2","original_commit_id":"1d1f05412412d93f06b3b031ba822a73f17e9220","user":{"login":"lucafavatella","id":1344255,"node_id":"MDQ6VXNlcjEzNDQyNTU=","avatar_url":"https://avatars0.githubusercontent.com/u/1344255?v=4","gravatar_id":"","url":"https://api.github.com/users/lucafavatella","html_url":"https://github.com/lucafavatella","followers_url":"https://api.github.com/users/lucafavatella/followers","following_url":"https://api.github.com/users/lucafavatella/following{/other_user}","gists_url":"https://api.github.com/users/lucafavatella/gists{/gist_id}","starred_url":"https://api.github.com/users/lucafavatella/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lucafavatella/subscriptions","organizations_url":"https://api.github.com/users/lucafavatella/orgs","repos_url":"https://api.github.com/users/lucafavatella/repos","events_url":"https://api.github.com/users/lucafavatella/events{/privacy}","received_events_url":"https://api.github.com/users/lucafavatella/received_events","type":"User","site_admin":false},"body":"Who guarantees that no new keyblock after `KeyBlock` but before `MicroBlock` was mined? This seems a test potentially failing intermittently.","created_at":"2018-11-08T11:28:57Z","updated_at":"2018-11-08T11:50:09Z","html_url":"https://github.com/aeternity/epoch/pull/1742#discussion_r231853025","pull_request_url":"https://api.github.com/repos/aeternity/epoch/pulls/1742","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/aeternity/epoch/pulls/comments/231853025"},"html":{"href":"https://github.com/aeternity/epoch/pull/1742#discussion_r231853025"},"pull_request":{"href":"https://api.github.com/repos/aeternity/epoch/pulls/1742"}}},"pull_request":{"url":"https://api.github.com/repos/aeternity/epoch/pulls/1742","id":228954160,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4OTU0MTYw","html_url":"https://github.com/aeternity/epoch/pull/1742","diff_url":"https://github.com/aeternity/epoch/pull/1742.diff","patch_url":"https://github.com/aeternity/epoch/pull/1742.patch","issue_url":"https://api.github.com/repos/aeternity/epoch/issues/1742","number":1742,"state":"open","locked":false,"title":"Fix microblock signing for `block_received` ","user":{"login":"fabiankrol","id":51267,"node_id":"MDQ6VXNlcjUxMjY3","avatar_url":"https://avatars3.githubusercontent.com/u/51267?v=4","gravatar_id":"","url":"https://api.github.com/users/fabiankrol","html_url":"https://github.com/fabiankrol","followers_url":"https://api.github.com/users/fabiankrol/followers","following_url":"https://api.github.com/users/fabiankrol/following{/other_user}","gists_url":"https://api.github.com/users/fabiankrol/gists{/gist_id}","starred_url":"https://api.github.com/users/fabiankrol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fabiankrol/subscriptions","organizations_url":"https://api.github.com/users/fabiankrol/orgs","repos_url":"https://api.github.com/users/fabiankrol/repos","events_url":"https://api.github.com/users/fabiankrol/events{/privacy}","received_events_url":"https://api.github.com/users/fabiankrol/received_events","type":"User","site_admin":false},"body":"[#161715282](https://www.pivotaltracker.com/n/projects/2124891/stories/161715282)\r\n\r\nGithub issue: #1730\r\n\r\n_...rebased..._","created_at":"2018-11-07T08:46:05Z","updated_at":"2018-11-08T11:50:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f862def76081b7330fb355e2ed8b82588bf83167","assignee":null,"assignees":[],"requested_reviewers":[{"login":"jur0","id":1114009,"node_id":"MDQ6VXNlcjExMTQwMDk=","avatar_url":"https://avatars1.githubusercontent.com/u/1114009?v=4","gravatar_id":"","url":"https://api.github.com/users/jur0","html_url":"https://github.com/jur0","followers_url":"https://api.github.com/users/jur0/followers","following_url":"https://api.github.com/users/jur0/following{/other_user}","gists_url":"https://api.github.com/users/jur0/gists{/gist_id}","starred_url":"https://api.github.com/users/jur0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jur0/subscriptions","organizations_url":"https://api.github.com/users/jur0/orgs","repos_url":"https://api.github.com/users/jur0/repos","events_url":"https://api.github.com/users/jur0/events{/privacy}","received_events_url":"https://api.github.com/users/jur0/received_events","type":"User","site_admin":false},{"login":"sennui","id":16958765,"node_id":"MDQ6VXNlcjE2OTU4NzY1","avatar_url":"https://avatars3.githubusercontent.com/u/16958765?v=4","gravatar_id":"","url":"https://api.github.com/users/sennui","html_url":"https://github.com/sennui","followers_url":"https://api.github.com/users/sennui/followers","following_url":"https://api.github.com/users/sennui/following{/other_user}","gists_url":"https://api.github.com/users/sennui/gists{/gist_id}","starred_url":"https://api.github.com/users/sennui/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sennui/subscriptions","organizations_url":"https://api.github.com/users/sennui/orgs","repos_url":"https://api.github.com/users/sennui/repos","events_url":"https://api.github.com/users/sennui/events{/privacy}","received_events_url":"https://api.github.com/users/sennui/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/aeternity/epoch/pulls/1742/commits","review_comments_url":"https://api.github.com/repos/aeternity/epoch/pulls/1742/comments","review_comment_url":"https://api.github.com/repos/aeternity/epoch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aeternity/epoch/issues/1742/comments","statuses_url":"https://api.github.com/repos/aeternity/epoch/statuses/008bfca3f2b517e39efb9616fb7c0c0cdc78e6d2","head":{"label":"aeternity:PT-161715282-post-key_block","ref":"PT-161715282-post-key_block","sha":"008bfca3f2b517e39efb9616fb7c0c0cdc78e6d2","user":{"login":"aeternity","id":21989234,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxOTg5MjM0","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,"node_id":"MDEwOlJlcG9zaXRvcnk5OTgwMjAzNg==","name":"epoch","full_name":"aeternity/epoch","private":false,"owner":{"login":"aeternity","id":21989234,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxOTg5MjM0","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},"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-11-08T08:51:40Z","pushed_at":"2018-11-08T11:10:45Z","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":11269,"stargazers_count":678,"watchers_count":678,"language":"Erlang","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":125,"mirror_url":null,"archived":false,"open_issues_count":14,"license":{"key":"isc","name":"ISC License","spdx_id":"ISC","url":"https://api.github.com/licenses/isc","node_id":"MDc6TGljZW5zZTEw"},"forks":125,"open_issues":14,"watchers":678,"default_branch":"master"}},"base":{"label":"aeternity:master","ref":"master","sha":"8d69cfd24d4a3bd5490523c1d82919a987a18cc0","user":{"login":"aeternity","id":21989234,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxOTg5MjM0","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,"node_id":"MDEwOlJlcG9zaXRvcnk5OTgwMjAzNg==","name":"epoch","full_name":"aeternity/epoch","private":false,"owner":{"login":"aeternity","id":21989234,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxOTg5MjM0","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},"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-11-08T08:51:40Z","pushed_at":"2018-11-08T11:10:45Z","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":11269,"stargazers_count":678,"watchers_count":678,"language":"Erlang","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":125,"mirror_url":null,"archived":false,"open_issues_count":14,"license":{"key":"isc","name":"ISC License","spdx_id":"ISC","url":"https://api.github.com/licenses/isc","node_id":"MDc6TGljZW5zZTEw"},"forks":125,"open_issues":14,"watchers":678,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aeternity/epoch/pulls/1742"},"html":{"href":"https://github.com/aeternity/epoch/pull/1742"},"issue":{"href":"https://api.github.com/repos/aeternity/epoch/issues/1742"},"comments":{"href":"https://api.github.com/repos/aeternity/epoch/issues/1742/comments"},"review_comments":{"href":"https://api.github.com/repos/aeternity/epoch/pulls/1742/comments"},"review_comment":{"href":"https://api.github.com/repos/aeternity/epoch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aeternity/epoch/pulls/1742/commits"},"statuses":{"href":"https://api.github.com/repos/aeternity/epoch/statuses/008bfca3f2b517e39efb9616fb7c0c0cdc78e6d2"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"lucafavatella"}}