{"action":"created","comment":{"url":"https://api.github.com/repos/raiden-network/raiden/pulls/comments/193127349","pull_request_review_id":126037966,"id":193127349,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MzEyNzM0OQ==","diff_hunk":"@@ -258,30 +256,34 @@ def start(self):\n                 block_number,\n             )\n             self.wal.log_and_dispatch(state_change, block_number)\n+\n+            # On first run Raiden needs to fetch all events for the payment\n+            # network, to reconstruct all token network graphs and find opened\n+            # channels\n+            last_log_block_number = None\n         else:\n-            # Get the last known block number after reapplying all the state changes from the log\n+            # The `Block` state change is dispatch only after all the events\n+            # for that given block have been processed, filters can be safely\n+            # installed starting from this position without losing events.\n             last_log_block_number = views.block_number(self.wal.state_manager.current_state)\n \n         # The alarm task must be started after the snapshot is loaded or the\n-        # state is primed, the callbacks assume the node is initialized.\n-        self.alarm.start()\n+        # state is primed, otherwise the state changes won't have effect.","path":"raiden/raiden_service.py","position":28,"original_position":28,"commit_id":"49441bec532d50dac37baba01e1f3c478a6d5450","original_commit_id":"49441bec532d50dac37baba01e1f3c478a6d5450","user":{"login":"hackaugusto","id":310139,"node_id":"MDQ6VXNlcjMxMDEzOQ==","avatar_url":"https://avatars0.githubusercontent.com/u/310139?v=4","gravatar_id":"","url":"https://api.github.com/users/hackaugusto","html_url":"https://github.com/hackaugusto","followers_url":"https://api.github.com/users/hackaugusto/followers","following_url":"https://api.github.com/users/hackaugusto/following{/other_user}","gists_url":"https://api.github.com/users/hackaugusto/gists{/gist_id}","starred_url":"https://api.github.com/users/hackaugusto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hackaugusto/subscriptions","organizations_url":"https://api.github.com/users/hackaugusto/orgs","repos_url":"https://api.github.com/users/hackaugusto/repos","events_url":"https://api.github.com/users/hackaugusto/events{/privacy}","received_events_url":"https://api.github.com/users/hackaugusto/received_events","type":"User","site_admin":false},"body":"Actually, this is not really correct. It doesn't really matter when the alarm task is installed, what matters is that we install the event filters after the state is primed.","created_at":"2018-06-05T15:54:57Z","updated_at":"2018-06-05T15:54:57Z","html_url":"https://github.com/raiden-network/raiden/pull/1512#discussion_r193127349","pull_request_url":"https://api.github.com/repos/raiden-network/raiden/pulls/1512","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/raiden-network/raiden/pulls/comments/193127349"},"html":{"href":"https://github.com/raiden-network/raiden/pull/1512#discussion_r193127349"},"pull_request":{"href":"https://api.github.com/repos/raiden-network/raiden/pulls/1512"}}},"pull_request":{"url":"https://api.github.com/repos/raiden-network/raiden/pulls/1512","id":192753762,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyNzUzNzYy","html_url":"https://github.com/raiden-network/raiden/pull/1512","diff_url":"https://github.com/raiden-network/raiden/pull/1512.diff","patch_url":"https://github.com/raiden-network/raiden/pull/1512.patch","issue_url":"https://api.github.com/repos/raiden-network/raiden/issues/1512","number":1512,"state":"open","locked":false,"title":"Unified alarm callbacks","user":{"login":"hackaugusto","id":310139,"node_id":"MDQ6VXNlcjMxMDEzOQ==","avatar_url":"https://avatars0.githubusercontent.com/u/310139?v=4","gravatar_id":"","url":"https://api.github.com/users/hackaugusto","html_url":"https://github.com/hackaugusto","followers_url":"https://api.github.com/users/hackaugusto/followers","following_url":"https://api.github.com/users/hackaugusto/following{/other_user}","gists_url":"https://api.github.com/users/hackaugusto/gists{/gist_id}","starred_url":"https://api.github.com/users/hackaugusto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hackaugusto/subscriptions","organizations_url":"https://api.github.com/users/hackaugusto/orgs","repos_url":"https://api.github.com/users/hackaugusto/repos","events_url":"https://api.github.com/users/hackaugusto/events{/privacy}","received_events_url":"https://api.github.com/users/hackaugusto/received_events","type":"User","site_admin":false},"body":"The dispatch of the Block state changed must guarantee the block has\r\nbeen fully processed for restarts, where fully processed means all the\r\nevents have been handled, for this reason the Block state change is only\r\ndispatch after all filters have been handled.\r\n\r\nreview after: #1505 ","created_at":"2018-06-05T15:45:26Z","updated_at":"2018-06-05T15:54:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"03f10cd0d1fd6bd1dff934e41503c5d1cfaa87f3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":456350195,"node_id":"MDU6TGFiZWw0NTYzNTAxOTU=","url":"https://api.github.com/repos/raiden-network/raiden/labels/dev:%20Please%20Review","name":"dev: Please Review","color":"006b75","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/raiden-network/raiden/pulls/1512/commits","review_comments_url":"https://api.github.com/repos/raiden-network/raiden/pulls/1512/comments","review_comment_url":"https://api.github.com/repos/raiden-network/raiden/pulls/comments{/number}","comments_url":"https://api.github.com/repos/raiden-network/raiden/issues/1512/comments","statuses_url":"https://api.github.com/repos/raiden-network/raiden/statuses/49441bec532d50dac37baba01e1f3c478a6d5450","head":{"label":"hackaugusto:alarm_task_fix","ref":"alarm_task_fix","sha":"49441bec532d50dac37baba01e1f3c478a6d5450","user":{"login":"hackaugusto","id":310139,"node_id":"MDQ6VXNlcjMxMDEzOQ==","avatar_url":"https://avatars0.githubusercontent.com/u/310139?v=4","gravatar_id":"","url":"https://api.github.com/users/hackaugusto","html_url":"https://github.com/hackaugusto","followers_url":"https://api.github.com/users/hackaugusto/followers","following_url":"https://api.github.com/users/hackaugusto/following{/other_user}","gists_url":"https://api.github.com/users/hackaugusto/gists{/gist_id}","starred_url":"https://api.github.com/users/hackaugusto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hackaugusto/subscriptions","organizations_url":"https://api.github.com/users/hackaugusto/orgs","repos_url":"https://api.github.com/users/hackaugusto/repos","events_url":"https://api.github.com/users/hackaugusto/events{/privacy}","received_events_url":"https://api.github.com/users/hackaugusto/received_events","type":"User","site_admin":false},"repo":{"id":52306496,"node_id":"MDEwOlJlcG9zaXRvcnk1MjMwNjQ5Ng==","name":"raiden","full_name":"hackaugusto/raiden","owner":{"login":"hackaugusto","id":310139,"node_id":"MDQ6VXNlcjMxMDEzOQ==","avatar_url":"https://avatars0.githubusercontent.com/u/310139?v=4","gravatar_id":"","url":"https://api.github.com/users/hackaugusto","html_url":"https://github.com/hackaugusto","followers_url":"https://api.github.com/users/hackaugusto/followers","following_url":"https://api.github.com/users/hackaugusto/following{/other_user}","gists_url":"https://api.github.com/users/hackaugusto/gists{/gist_id}","starred_url":"https://api.github.com/users/hackaugusto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hackaugusto/subscriptions","organizations_url":"https://api.github.com/users/hackaugusto/orgs","repos_url":"https://api.github.com/users/hackaugusto/repos","events_url":"https://api.github.com/users/hackaugusto/events{/privacy}","received_events_url":"https://api.github.com/users/hackaugusto/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hackaugusto/raiden","description":"Raiden Network","fork":true,"url":"https://api.github.com/repos/hackaugusto/raiden","forks_url":"https://api.github.com/repos/hackaugusto/raiden/forks","keys_url":"https://api.github.com/repos/hackaugusto/raiden/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hackaugusto/raiden/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hackaugusto/raiden/teams","hooks_url":"https://api.github.com/repos/hackaugusto/raiden/hooks","issue_events_url":"https://api.github.com/repos/hackaugusto/raiden/issues/events{/number}","events_url":"https://api.github.com/repos/hackaugusto/raiden/events","assignees_url":"https://api.github.com/repos/hackaugusto/raiden/assignees{/user}","branches_url":"https://api.github.com/repos/hackaugusto/raiden/branches{/branch}","tags_url":"https://api.github.com/repos/hackaugusto/raiden/tags","blobs_url":"https://api.github.com/repos/hackaugusto/raiden/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hackaugusto/raiden/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hackaugusto/raiden/git/refs{/sha}","trees_url":"https://api.github.com/repos/hackaugusto/raiden/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hackaugusto/raiden/statuses/{sha}","languages_url":"https://api.github.com/repos/hackaugusto/raiden/languages","stargazers_url":"https://api.github.com/repos/hackaugusto/raiden/stargazers","contributors_url":"https://api.github.com/repos/hackaugusto/raiden/contributors","subscribers_url":"https://api.github.com/repos/hackaugusto/raiden/subscribers","subscription_url":"https://api.github.com/repos/hackaugusto/raiden/subscription","commits_url":"https://api.github.com/repos/hackaugusto/raiden/commits{/sha}","git_commits_url":"https://api.github.com/repos/hackaugusto/raiden/git/commits{/sha}","comments_url":"https://api.github.com/repos/hackaugusto/raiden/comments{/number}","issue_comment_url":"https://api.github.com/repos/hackaugusto/raiden/issues/comments{/number}","contents_url":"https://api.github.com/repos/hackaugusto/raiden/contents/{+path}","compare_url":"https://api.github.com/repos/hackaugusto/raiden/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hackaugusto/raiden/merges","archive_url":"https://api.github.com/repos/hackaugusto/raiden/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hackaugusto/raiden/downloads","issues_url":"https://api.github.com/repos/hackaugusto/raiden/issues{/number}","pulls_url":"https://api.github.com/repos/hackaugusto/raiden/pulls{/number}","milestones_url":"https://api.github.com/repos/hackaugusto/raiden/milestones{/number}","notifications_url":"https://api.github.com/repos/hackaugusto/raiden/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hackaugusto/raiden/labels{/name}","releases_url":"https://api.github.com/repos/hackaugusto/raiden/releases{/id}","deployments_url":"https://api.github.com/repos/hackaugusto/raiden/deployments","created_at":"2016-02-22T21:17:14Z","updated_at":"2018-06-01T09:13:49Z","pushed_at":"2018-06-05T15:48:29Z","git_url":"git://github.com/hackaugusto/raiden.git","ssh_url":"git@github.com:hackaugusto/raiden.git","clone_url":"https://github.com/hackaugusto/raiden.git","svn_url":"https://github.com/hackaugusto/raiden","homepage":null,"size":6893,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"raiden-network:master","ref":"master","sha":"745a85b26604283c436f53083e306dbe8a77b4d1","user":{"login":"raiden-network","id":19666847,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NjY2ODQ3","avatar_url":"https://avatars1.githubusercontent.com/u/19666847?v=4","gravatar_id":"","url":"https://api.github.com/users/raiden-network","html_url":"https://github.com/raiden-network","followers_url":"https://api.github.com/users/raiden-network/followers","following_url":"https://api.github.com/users/raiden-network/following{/other_user}","gists_url":"https://api.github.com/users/raiden-network/gists{/gist_id}","starred_url":"https://api.github.com/users/raiden-network/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raiden-network/subscriptions","organizations_url":"https://api.github.com/users/raiden-network/orgs","repos_url":"https://api.github.com/users/raiden-network/repos","events_url":"https://api.github.com/users/raiden-network/events{/privacy}","received_events_url":"https://api.github.com/users/raiden-network/received_events","type":"Organization","site_admin":false},"repo":{"id":50646767,"node_id":"MDEwOlJlcG9zaXRvcnk1MDY0Njc2Nw==","name":"raiden","full_name":"raiden-network/raiden","owner":{"login":"raiden-network","id":19666847,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NjY2ODQ3","avatar_url":"https://avatars1.githubusercontent.com/u/19666847?v=4","gravatar_id":"","url":"https://api.github.com/users/raiden-network","html_url":"https://github.com/raiden-network","followers_url":"https://api.github.com/users/raiden-network/followers","following_url":"https://api.github.com/users/raiden-network/following{/other_user}","gists_url":"https://api.github.com/users/raiden-network/gists{/gist_id}","starred_url":"https://api.github.com/users/raiden-network/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raiden-network/subscriptions","organizations_url":"https://api.github.com/users/raiden-network/orgs","repos_url":"https://api.github.com/users/raiden-network/repos","events_url":"https://api.github.com/users/raiden-network/events{/privacy}","received_events_url":"https://api.github.com/users/raiden-network/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/raiden-network/raiden","description":"Raiden Network","fork":false,"url":"https://api.github.com/repos/raiden-network/raiden","forks_url":"https://api.github.com/repos/raiden-network/raiden/forks","keys_url":"https://api.github.com/repos/raiden-network/raiden/keys{/key_id}","collaborators_url":"https://api.github.com/repos/raiden-network/raiden/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/raiden-network/raiden/teams","hooks_url":"https://api.github.com/repos/raiden-network/raiden/hooks","issue_events_url":"https://api.github.com/repos/raiden-network/raiden/issues/events{/number}","events_url":"https://api.github.com/repos/raiden-network/raiden/events","assignees_url":"https://api.github.com/repos/raiden-network/raiden/assignees{/user}","branches_url":"https://api.github.com/repos/raiden-network/raiden/branches{/branch}","tags_url":"https://api.github.com/repos/raiden-network/raiden/tags","blobs_url":"https://api.github.com/repos/raiden-network/raiden/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/raiden-network/raiden/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/raiden-network/raiden/git/refs{/sha}","trees_url":"https://api.github.com/repos/raiden-network/raiden/git/trees{/sha}","statuses_url":"https://api.github.com/repos/raiden-network/raiden/statuses/{sha}","languages_url":"https://api.github.com/repos/raiden-network/raiden/languages","stargazers_url":"https://api.github.com/repos/raiden-network/raiden/stargazers","contributors_url":"https://api.github.com/repos/raiden-network/raiden/contributors","subscribers_url":"https://api.github.com/repos/raiden-network/raiden/subscribers","subscription_url":"https://api.github.com/repos/raiden-network/raiden/subscription","commits_url":"https://api.github.com/repos/raiden-network/raiden/commits{/sha}","git_commits_url":"https://api.github.com/repos/raiden-network/raiden/git/commits{/sha}","comments_url":"https://api.github.com/repos/raiden-network/raiden/comments{/number}","issue_comment_url":"https://api.github.com/repos/raiden-network/raiden/issues/comments{/number}","contents_url":"https://api.github.com/repos/raiden-network/raiden/contents/{+path}","compare_url":"https://api.github.com/repos/raiden-network/raiden/compare/{base}...{head}","merges_url":"https://api.github.com/repos/raiden-network/raiden/merges","archive_url":"https://api.github.com/repos/raiden-network/raiden/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/raiden-network/raiden/downloads","issues_url":"https://api.github.com/repos/raiden-network/raiden/issues{/number}","pulls_url":"https://api.github.com/repos/raiden-network/raiden/pulls{/number}","milestones_url":"https://api.github.com/repos/raiden-network/raiden/milestones{/number}","notifications_url":"https://api.github.com/repos/raiden-network/raiden/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/raiden-network/raiden/labels{/name}","releases_url":"https://api.github.com/repos/raiden-network/raiden/releases{/id}","deployments_url":"https://api.github.com/repos/raiden-network/raiden/deployments","created_at":"2016-01-29T07:40:47Z","updated_at":"2018-06-05T15:38:38Z","pushed_at":"2018-06-05T15:48:31Z","git_url":"git://github.com/raiden-network/raiden.git","ssh_url":"git@github.com:raiden-network/raiden.git","clone_url":"https://github.com/raiden-network/raiden.git","svn_url":"https://github.com/raiden-network/raiden","homepage":null,"size":6808,"stargazers_count":1429,"watchers_count":1429,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":276,"mirror_url":null,"archived":false,"open_issues_count":143,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":276,"open_issues":143,"watchers":1429,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/raiden-network/raiden/pulls/1512"},"html":{"href":"https://github.com/raiden-network/raiden/pull/1512"},"issue":{"href":"https://api.github.com/repos/raiden-network/raiden/issues/1512"},"comments":{"href":"https://api.github.com/repos/raiden-network/raiden/issues/1512/comments"},"review_comments":{"href":"https://api.github.com/repos/raiden-network/raiden/pulls/1512/comments"},"review_comment":{"href":"https://api.github.com/repos/raiden-network/raiden/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/raiden-network/raiden/pulls/1512/commits"},"statuses":{"href":"https://api.github.com/repos/raiden-network/raiden/statuses/49441bec532d50dac37baba01e1f3c478a6d5450"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"hackaugusto"}}