{"action":"created","comment":{"url":"https://api.github.com/repos/nervosnetwork/ckb/pulls/comments/245228056","pull_request_review_id":189280057,"id":245228056,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0NTIyODA1Ng==","diff_hunk":"@@ -447,26 +448,30 @@ impl<P: ChainProvider + CellProvider> TransactionsVerifier<P> {\n         };\n \n         let parent_hash = block.header().parent_hash();\n+        let max_cycles = self.provider.consensus().max_block_cycles();\n         // make verifiers orthogonal\n         // skip first tx, assume the first is cellbase, other verifier will verify cellbase\n-        let err: Vec<(usize, TransactionError)> = block\n+        let results: Vec<Result<Cycle, TransactionError>> = block\n             .commit_transactions()\n             .par_iter()\n             .skip(1)\n             .map(|x| wrapper.resolve_transaction_at(x, &parent_hash))\n+            .map(|tx| TransactionVerifier::new(&tx).verify(max_cycles))\n+            .collect();","path":"verification/src/block_verifier.rs","position":null,"original_position":22,"commit_id":"46181cdda78aed6b1f3f099f10d222f280eb851d","original_commit_id":"6e103115131119194e8c52bb898b7e1ff9f250ab","user":{"login":"xxuejie","id":340446,"node_id":"MDQ6VXNlcjM0MDQ0Ng==","avatar_url":"https://avatars1.githubusercontent.com/u/340446?v=4","gravatar_id":"","url":"https://api.github.com/users/xxuejie","html_url":"https://github.com/xxuejie","followers_url":"https://api.github.com/users/xxuejie/followers","following_url":"https://api.github.com/users/xxuejie/following{/other_user}","gists_url":"https://api.github.com/users/xxuejie/gists{/gist_id}","starred_url":"https://api.github.com/users/xxuejie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xxuejie/subscriptions","organizations_url":"https://api.github.com/users/xxuejie/orgs","repos_url":"https://api.github.com/users/xxuejie/repos","events_url":"https://api.github.com/users/xxuejie/events{/privacy}","received_events_url":"https://api.github.com/users/xxuejie/received_events","type":"User","site_admin":false},"body":"@doitian @zhangsoledad How about now?","created_at":"2019-01-04T07:38:19Z","updated_at":"2019-01-04T07:38:19Z","html_url":"https://github.com/nervosnetwork/ckb/pull/157#discussion_r245228056","pull_request_url":"https://api.github.com/repos/nervosnetwork/ckb/pulls/157","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/nervosnetwork/ckb/pulls/comments/245228056"},"html":{"href":"https://github.com/nervosnetwork/ckb/pull/157#discussion_r245228056"},"pull_request":{"href":"https://api.github.com/repos/nervosnetwork/ckb/pulls/157"}},"in_reply_to_id":245221049},"pull_request":{"url":"https://api.github.com/repos/nervosnetwork/ckb/pulls/157","id":242177217,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQyMTc3MjE3","html_url":"https://github.com/nervosnetwork/ckb/pull/157","diff_url":"https://github.com/nervosnetwork/ckb/pull/157.diff","patch_url":"https://github.com/nervosnetwork/ckb/pull/157.patch","issue_url":"https://api.github.com/repos/nervosnetwork/ckb/issues/157","number":157,"state":"open","locked":false,"title":"feat: Add block level script cycle limit","user":{"login":"xxuejie","id":340446,"node_id":"MDQ6VXNlcjM0MDQ0Ng==","avatar_url":"https://avatars1.githubusercontent.com/u/340446?v=4","gravatar_id":"","url":"https://api.github.com/users/xxuejie","html_url":"https://github.com/xxuejie","followers_url":"https://api.github.com/users/xxuejie/followers","following_url":"https://api.github.com/users/xxuejie/following{/other_user}","gists_url":"https://api.github.com/users/xxuejie/gists{/gist_id}","starred_url":"https://api.github.com/users/xxuejie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xxuejie/subscriptions","organizations_url":"https://api.github.com/users/xxuejie/orgs","repos_url":"https://api.github.com/users/xxuejie/repos","events_url":"https://api.github.com/users/xxuejie/events{/privacy}","received_events_url":"https://api.github.com/users/xxuejie/received_events","type":"User","site_admin":false},"body":"RFC: https://github.com/nervosnetwork/rfcs/pull/60","created_at":"2019-01-04T05:19:31Z","updated_at":"2019-01-04T07:38:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dabbc94b22bff28fd48b8743d696f2c0d5336d4a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/nervosnetwork/ckb/pulls/157/commits","review_comments_url":"https://api.github.com/repos/nervosnetwork/ckb/pulls/157/comments","review_comment_url":"https://api.github.com/repos/nervosnetwork/ckb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nervosnetwork/ckb/issues/157/comments","statuses_url":"https://api.github.com/repos/nervosnetwork/ckb/statuses/46181cdda78aed6b1f3f099f10d222f280eb851d","head":{"label":"nervosnetwork:xxuejie/add-block-cycle-limit","ref":"xxuejie/add-block-cycle-limit","sha":"46181cdda78aed6b1f3f099f10d222f280eb851d","user":{"login":"nervosnetwork","id":35361817,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1MzYxODE3","avatar_url":"https://avatars3.githubusercontent.com/u/35361817?v=4","gravatar_id":"","url":"https://api.github.com/users/nervosnetwork","html_url":"https://github.com/nervosnetwork","followers_url":"https://api.github.com/users/nervosnetwork/followers","following_url":"https://api.github.com/users/nervosnetwork/following{/other_user}","gists_url":"https://api.github.com/users/nervosnetwork/gists{/gist_id}","starred_url":"https://api.github.com/users/nervosnetwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nervosnetwork/subscriptions","organizations_url":"https://api.github.com/users/nervosnetwork/orgs","repos_url":"https://api.github.com/users/nervosnetwork/repos","events_url":"https://api.github.com/users/nervosnetwork/events{/privacy}","received_events_url":"https://api.github.com/users/nervosnetwork/received_events","type":"Organization","site_admin":false},"repo":{"id":158225088,"node_id":"MDEwOlJlcG9zaXRvcnkxNTgyMjUwODg=","name":"ckb","full_name":"nervosnetwork/ckb","private":false,"owner":{"login":"nervosnetwork","id":35361817,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1MzYxODE3","avatar_url":"https://avatars3.githubusercontent.com/u/35361817?v=4","gravatar_id":"","url":"https://api.github.com/users/nervosnetwork","html_url":"https://github.com/nervosnetwork","followers_url":"https://api.github.com/users/nervosnetwork/followers","following_url":"https://api.github.com/users/nervosnetwork/following{/other_user}","gists_url":"https://api.github.com/users/nervosnetwork/gists{/gist_id}","starred_url":"https://api.github.com/users/nervosnetwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nervosnetwork/subscriptions","organizations_url":"https://api.github.com/users/nervosnetwork/orgs","repos_url":"https://api.github.com/users/nervosnetwork/repos","events_url":"https://api.github.com/users/nervosnetwork/events{/privacy}","received_events_url":"https://api.github.com/users/nervosnetwork/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/nervosnetwork/ckb","description":"Nervos CKB is a public permissionless blockchain, the common knowledge layer of Nervos network.","fork":false,"url":"https://api.github.com/repos/nervosnetwork/ckb","forks_url":"https://api.github.com/repos/nervosnetwork/ckb/forks","keys_url":"https://api.github.com/repos/nervosnetwork/ckb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nervosnetwork/ckb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nervosnetwork/ckb/teams","hooks_url":"https://api.github.com/repos/nervosnetwork/ckb/hooks","issue_events_url":"https://api.github.com/repos/nervosnetwork/ckb/issues/events{/number}","events_url":"https://api.github.com/repos/nervosnetwork/ckb/events","assignees_url":"https://api.github.com/repos/nervosnetwork/ckb/assignees{/user}","branches_url":"https://api.github.com/repos/nervosnetwork/ckb/branches{/branch}","tags_url":"https://api.github.com/repos/nervosnetwork/ckb/tags","blobs_url":"https://api.github.com/repos/nervosnetwork/ckb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nervosnetwork/ckb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nervosnetwork/ckb/git/refs{/sha}","trees_url":"https://api.github.com/repos/nervosnetwork/ckb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nervosnetwork/ckb/statuses/{sha}","languages_url":"https://api.github.com/repos/nervosnetwork/ckb/languages","stargazers_url":"https://api.github.com/repos/nervosnetwork/ckb/stargazers","contributors_url":"https://api.github.com/repos/nervosnetwork/ckb/contributors","subscribers_url":"https://api.github.com/repos/nervosnetwork/ckb/subscribers","subscription_url":"https://api.github.com/repos/nervosnetwork/ckb/subscription","commits_url":"https://api.github.com/repos/nervosnetwork/ckb/commits{/sha}","git_commits_url":"https://api.github.com/repos/nervosnetwork/ckb/git/commits{/sha}","comments_url":"https://api.github.com/repos/nervosnetwork/ckb/comments{/number}","issue_comment_url":"https://api.github.com/repos/nervosnetwork/ckb/issues/comments{/number}","contents_url":"https://api.github.com/repos/nervosnetwork/ckb/contents/{+path}","compare_url":"https://api.github.com/repos/nervosnetwork/ckb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nervosnetwork/ckb/merges","archive_url":"https://api.github.com/repos/nervosnetwork/ckb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nervosnetwork/ckb/downloads","issues_url":"https://api.github.com/repos/nervosnetwork/ckb/issues{/number}","pulls_url":"https://api.github.com/repos/nervosnetwork/ckb/pulls{/number}","milestones_url":"https://api.github.com/repos/nervosnetwork/ckb/milestones{/number}","notifications_url":"https://api.github.com/repos/nervosnetwork/ckb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nervosnetwork/ckb/labels{/name}","releases_url":"https://api.github.com/repos/nervosnetwork/ckb/releases{/id}","deployments_url":"https://api.github.com/repos/nervosnetwork/ckb/deployments","created_at":"2018-11-19T13:11:16Z","updated_at":"2019-01-04T06:55:46Z","pushed_at":"2019-01-04T07:33:02Z","git_url":"git://github.com/nervosnetwork/ckb.git","ssh_url":"git@github.com:nervosnetwork/ckb.git","clone_url":"https://github.com/nervosnetwork/ckb.git","svn_url":"https://github.com/nervosnetwork/ckb","homepage":"https://www.nervos.org","size":3187,"stargazers_count":311,"watchers_count":311,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":37,"mirror_url":null,"archived":false,"open_issues_count":18,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":37,"open_issues":18,"watchers":311,"default_branch":"develop"}},"base":{"label":"nervosnetwork:develop","ref":"develop","sha":"373a662d898db8391c2ffd89f0c6e71f8463e28e","user":{"login":"nervosnetwork","id":35361817,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1MzYxODE3","avatar_url":"https://avatars3.githubusercontent.com/u/35361817?v=4","gravatar_id":"","url":"https://api.github.com/users/nervosnetwork","html_url":"https://github.com/nervosnetwork","followers_url":"https://api.github.com/users/nervosnetwork/followers","following_url":"https://api.github.com/users/nervosnetwork/following{/other_user}","gists_url":"https://api.github.com/users/nervosnetwork/gists{/gist_id}","starred_url":"https://api.github.com/users/nervosnetwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nervosnetwork/subscriptions","organizations_url":"https://api.github.com/users/nervosnetwork/orgs","repos_url":"https://api.github.com/users/nervosnetwork/repos","events_url":"https://api.github.com/users/nervosnetwork/events{/privacy}","received_events_url":"https://api.github.com/users/nervosnetwork/received_events","type":"Organization","site_admin":false},"repo":{"id":158225088,"node_id":"MDEwOlJlcG9zaXRvcnkxNTgyMjUwODg=","name":"ckb","full_name":"nervosnetwork/ckb","private":false,"owner":{"login":"nervosnetwork","id":35361817,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1MzYxODE3","avatar_url":"https://avatars3.githubusercontent.com/u/35361817?v=4","gravatar_id":"","url":"https://api.github.com/users/nervosnetwork","html_url":"https://github.com/nervosnetwork","followers_url":"https://api.github.com/users/nervosnetwork/followers","following_url":"https://api.github.com/users/nervosnetwork/following{/other_user}","gists_url":"https://api.github.com/users/nervosnetwork/gists{/gist_id}","starred_url":"https://api.github.com/users/nervosnetwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nervosnetwork/subscriptions","organizations_url":"https://api.github.com/users/nervosnetwork/orgs","repos_url":"https://api.github.com/users/nervosnetwork/repos","events_url":"https://api.github.com/users/nervosnetwork/events{/privacy}","received_events_url":"https://api.github.com/users/nervosnetwork/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/nervosnetwork/ckb","description":"Nervos CKB is a public permissionless blockchain, the common knowledge layer of Nervos network.","fork":false,"url":"https://api.github.com/repos/nervosnetwork/ckb","forks_url":"https://api.github.com/repos/nervosnetwork/ckb/forks","keys_url":"https://api.github.com/repos/nervosnetwork/ckb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nervosnetwork/ckb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nervosnetwork/ckb/teams","hooks_url":"https://api.github.com/repos/nervosnetwork/ckb/hooks","issue_events_url":"https://api.github.com/repos/nervosnetwork/ckb/issues/events{/number}","events_url":"https://api.github.com/repos/nervosnetwork/ckb/events","assignees_url":"https://api.github.com/repos/nervosnetwork/ckb/assignees{/user}","branches_url":"https://api.github.com/repos/nervosnetwork/ckb/branches{/branch}","tags_url":"https://api.github.com/repos/nervosnetwork/ckb/tags","blobs_url":"https://api.github.com/repos/nervosnetwork/ckb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nervosnetwork/ckb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nervosnetwork/ckb/git/refs{/sha}","trees_url":"https://api.github.com/repos/nervosnetwork/ckb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nervosnetwork/ckb/statuses/{sha}","languages_url":"https://api.github.com/repos/nervosnetwork/ckb/languages","stargazers_url":"https://api.github.com/repos/nervosnetwork/ckb/stargazers","contributors_url":"https://api.github.com/repos/nervosnetwork/ckb/contributors","subscribers_url":"https://api.github.com/repos/nervosnetwork/ckb/subscribers","subscription_url":"https://api.github.com/repos/nervosnetwork/ckb/subscription","commits_url":"https://api.github.com/repos/nervosnetwork/ckb/commits{/sha}","git_commits_url":"https://api.github.com/repos/nervosnetwork/ckb/git/commits{/sha}","comments_url":"https://api.github.com/repos/nervosnetwork/ckb/comments{/number}","issue_comment_url":"https://api.github.com/repos/nervosnetwork/ckb/issues/comments{/number}","contents_url":"https://api.github.com/repos/nervosnetwork/ckb/contents/{+path}","compare_url":"https://api.github.com/repos/nervosnetwork/ckb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nervosnetwork/ckb/merges","archive_url":"https://api.github.com/repos/nervosnetwork/ckb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nervosnetwork/ckb/downloads","issues_url":"https://api.github.com/repos/nervosnetwork/ckb/issues{/number}","pulls_url":"https://api.github.com/repos/nervosnetwork/ckb/pulls{/number}","milestones_url":"https://api.github.com/repos/nervosnetwork/ckb/milestones{/number}","notifications_url":"https://api.github.com/repos/nervosnetwork/ckb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nervosnetwork/ckb/labels{/name}","releases_url":"https://api.github.com/repos/nervosnetwork/ckb/releases{/id}","deployments_url":"https://api.github.com/repos/nervosnetwork/ckb/deployments","created_at":"2018-11-19T13:11:16Z","updated_at":"2019-01-04T06:55:46Z","pushed_at":"2019-01-04T07:33:02Z","git_url":"git://github.com/nervosnetwork/ckb.git","ssh_url":"git@github.com:nervosnetwork/ckb.git","clone_url":"https://github.com/nervosnetwork/ckb.git","svn_url":"https://github.com/nervosnetwork/ckb","homepage":"https://www.nervos.org","size":3187,"stargazers_count":311,"watchers_count":311,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":37,"mirror_url":null,"archived":false,"open_issues_count":18,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":37,"open_issues":18,"watchers":311,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/nervosnetwork/ckb/pulls/157"},"html":{"href":"https://github.com/nervosnetwork/ckb/pull/157"},"issue":{"href":"https://api.github.com/repos/nervosnetwork/ckb/issues/157"},"comments":{"href":"https://api.github.com/repos/nervosnetwork/ckb/issues/157/comments"},"review_comments":{"href":"https://api.github.com/repos/nervosnetwork/ckb/pulls/157/comments"},"review_comment":{"href":"https://api.github.com/repos/nervosnetwork/ckb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nervosnetwork/ckb/pulls/157/commits"},"statuses":{"href":"https://api.github.com/repos/nervosnetwork/ckb/statuses/46181cdda78aed6b1f3f099f10d222f280eb851d"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"xxuejie"}}