{"action":"created","comment":{"url":"https://api.github.com/repos/nknorg/nkn/pulls/comments/235317029","pull_request_review_id":177152265,"id":235317029,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNTMxNzAyOQ==","diff_hunk":"@@ -178,6 +181,12 @@ func VerifyTransactionWithLedger(Tx *Transaction) ErrCode {\n \treturn ErrNoError\n }\n \n+// CheckInputOutputLen validate len(inputs/outputs) less than MAX of ReferTxOutputIndex\n+func CheckInputOutputTooLong(tx *Transaction) bool {\n+\t// FIXME: assume count of Inputs in a Transaction never over 2147483648","path":"core/transaction/validator.go","position":16,"original_position":16,"commit_id":"73fa799918768d118697dc0567940cffe80ef281","original_commit_id":"73fa799918768d118697dc0567940cffe80ef281","user":{"login":"gdmmx","id":31470624,"node_id":"MDQ6VXNlcjMxNDcwNjI0","avatar_url":"https://avatars2.githubusercontent.com/u/31470624?v=4","gravatar_id":"","url":"https://api.github.com/users/gdmmx","html_url":"https://github.com/gdmmx","followers_url":"https://api.github.com/users/gdmmx/followers","following_url":"https://api.github.com/users/gdmmx/following{/other_user}","gists_url":"https://api.github.com/users/gdmmx/gists{/gist_id}","starred_url":"https://api.github.com/users/gdmmx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdmmx/subscriptions","organizations_url":"https://api.github.com/users/gdmmx/orgs","repos_url":"https://api.github.com/users/gdmmx/repos","events_url":"https://api.github.com/users/gdmmx/events{/privacy}","received_events_url":"https://api.github.com/users/gdmmx/received_events","type":"User","site_admin":false},"body":"I mean that len(tx.Inputs) will return a negative cause bool ( len(tx.Inputs) > 65535 ) as false.","created_at":"2018-11-21T09:49:48Z","updated_at":"2018-11-21T09:49:48Z","html_url":"https://github.com/nknorg/nkn/pull/381#discussion_r235317029","pull_request_url":"https://api.github.com/repos/nknorg/nkn/pulls/381","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/nknorg/nkn/pulls/comments/235317029"},"html":{"href":"https://github.com/nknorg/nkn/pull/381#discussion_r235317029"},"pull_request":{"href":"https://api.github.com/repos/nknorg/nkn/pulls/381"}},"in_reply_to_id":235280851},"pull_request":{"url":"https://api.github.com/repos/nknorg/nkn/pulls/381","id":232523078,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMyNTIzMDc4","html_url":"https://github.com/nknorg/nkn/pull/381","diff_url":"https://github.com/nknorg/nkn/pull/381.diff","patch_url":"https://github.com/nknorg/nkn/pull/381.patch","issue_url":"https://api.github.com/repos/nknorg/nkn/issues/381","number":381,"state":"open","locked":false,"title":"Limit transaction inputs/outputs NOT over MaxRefIndex","user":{"login":"gdmmx","id":31470624,"node_id":"MDQ6VXNlcjMxNDcwNjI0","avatar_url":"https://avatars2.githubusercontent.com/u/31470624?v=4","gravatar_id":"","url":"https://api.github.com/users/gdmmx","html_url":"https://github.com/gdmmx","followers_url":"https://api.github.com/users/gdmmx/followers","following_url":"https://api.github.com/users/gdmmx/following{/other_user}","gists_url":"https://api.github.com/users/gdmmx/gists{/gist_id}","starred_url":"https://api.github.com/users/gdmmx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdmmx/subscriptions","organizations_url":"https://api.github.com/users/gdmmx/orgs","repos_url":"https://api.github.com/users/gdmmx/repos","events_url":"https://api.github.com/users/gdmmx/events{/privacy}","received_events_url":"https://api.github.com/users/gdmmx/received_events","type":"User","site_admin":false},"body":"### Proposed changes in this pull request\r\n- Limit transaction inputs/outputs NOT over max of ReferTxOutputIndex\r\n- Complemented ErrCode String\r\n- Refine code of IsDoubleSpend routine\r\n\r\n### Type (put an `x` where ever applicable)\r\n- [ ] Bug fix: Link to the issue\r\n- [x] Feature (Non-breaking change)\r\n- [ ] Feature (Breaking change)\r\n- [ ] Documentation Improvement\r\n\r\n### Checklist\r\nPlease put an `x` against the checkboxes. Write a small comment explaining if its `N/A` (not applicable)\r\n\r\n- [x] Read the [CONTRIBUTION guidelines](https://github.com/nknorg/nkn#contributing).\r\n- [x] All the tests are passing after the introduction of new changes.\r\n- [ ] Added tests respective to the part of code I have written.\r\n- [ ] Added proper documentation where ever applicable (in code and README.md).\r\n- [x] Code has been written according to [NKN-Golang-Style-Guide](https://github.com/nknorg/nkn/wiki/NKN-Golang-Style-Guide)\r\n\r\n### Extra information\r\nAny extra information related to this pull request.","created_at":"2018-11-21T02:52:58Z","updated_at":"2018-11-21T09:49:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"531182faf416885517ede0169d0694f4c6b36df7","assignee":null,"assignees":[],"requested_reviewers":[{"login":"dreamfly281","id":3970595,"node_id":"MDQ6VXNlcjM5NzA1OTU=","avatar_url":"https://avatars2.githubusercontent.com/u/3970595?v=4","gravatar_id":"","url":"https://api.github.com/users/dreamfly281","html_url":"https://github.com/dreamfly281","followers_url":"https://api.github.com/users/dreamfly281/followers","following_url":"https://api.github.com/users/dreamfly281/following{/other_user}","gists_url":"https://api.github.com/users/dreamfly281/gists{/gist_id}","starred_url":"https://api.github.com/users/dreamfly281/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dreamfly281/subscriptions","organizations_url":"https://api.github.com/users/dreamfly281/orgs","repos_url":"https://api.github.com/users/dreamfly281/repos","events_url":"https://api.github.com/users/dreamfly281/events{/privacy}","received_events_url":"https://api.github.com/users/dreamfly281/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/nknorg/nkn/pulls/381/commits","review_comments_url":"https://api.github.com/repos/nknorg/nkn/pulls/381/comments","review_comment_url":"https://api.github.com/repos/nknorg/nkn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nknorg/nkn/issues/381/comments","statuses_url":"https://api.github.com/repos/nknorg/nkn/statuses/73fa799918768d118697dc0567940cffe80ef281","head":{"label":"gdmmx:dev","ref":"dev","sha":"73fa799918768d118697dc0567940cffe80ef281","user":{"login":"gdmmx","id":31470624,"node_id":"MDQ6VXNlcjMxNDcwNjI0","avatar_url":"https://avatars2.githubusercontent.com/u/31470624?v=4","gravatar_id":"","url":"https://api.github.com/users/gdmmx","html_url":"https://github.com/gdmmx","followers_url":"https://api.github.com/users/gdmmx/followers","following_url":"https://api.github.com/users/gdmmx/following{/other_user}","gists_url":"https://api.github.com/users/gdmmx/gists{/gist_id}","starred_url":"https://api.github.com/users/gdmmx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdmmx/subscriptions","organizations_url":"https://api.github.com/users/gdmmx/orgs","repos_url":"https://api.github.com/users/gdmmx/repos","events_url":"https://api.github.com/users/gdmmx/events{/privacy}","received_events_url":"https://api.github.com/users/gdmmx/received_events","type":"User","site_admin":false},"repo":{"id":137098939,"node_id":"MDEwOlJlcG9zaXRvcnkxMzcwOTg5Mzk=","name":"nkn","full_name":"gdmmx/nkn","private":false,"owner":{"login":"gdmmx","id":31470624,"node_id":"MDQ6VXNlcjMxNDcwNjI0","avatar_url":"https://avatars2.githubusercontent.com/u/31470624?v=4","gravatar_id":"","url":"https://api.github.com/users/gdmmx","html_url":"https://github.com/gdmmx","followers_url":"https://api.github.com/users/gdmmx/followers","following_url":"https://api.github.com/users/gdmmx/following{/other_user}","gists_url":"https://api.github.com/users/gdmmx/gists{/gist_id}","starred_url":"https://api.github.com/users/gdmmx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdmmx/subscriptions","organizations_url":"https://api.github.com/users/gdmmx/orgs","repos_url":"https://api.github.com/users/gdmmx/repos","events_url":"https://api.github.com/users/gdmmx/events{/privacy}","received_events_url":"https://api.github.com/users/gdmmx/received_events","type":"User","site_admin":false},"html_url":"https://github.com/gdmmx/nkn","description":"NKN blockchain system in Golang","fork":true,"url":"https://api.github.com/repos/gdmmx/nkn","forks_url":"https://api.github.com/repos/gdmmx/nkn/forks","keys_url":"https://api.github.com/repos/gdmmx/nkn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gdmmx/nkn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gdmmx/nkn/teams","hooks_url":"https://api.github.com/repos/gdmmx/nkn/hooks","issue_events_url":"https://api.github.com/repos/gdmmx/nkn/issues/events{/number}","events_url":"https://api.github.com/repos/gdmmx/nkn/events","assignees_url":"https://api.github.com/repos/gdmmx/nkn/assignees{/user}","branches_url":"https://api.github.com/repos/gdmmx/nkn/branches{/branch}","tags_url":"https://api.github.com/repos/gdmmx/nkn/tags","blobs_url":"https://api.github.com/repos/gdmmx/nkn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gdmmx/nkn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gdmmx/nkn/git/refs{/sha}","trees_url":"https://api.github.com/repos/gdmmx/nkn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gdmmx/nkn/statuses/{sha}","languages_url":"https://api.github.com/repos/gdmmx/nkn/languages","stargazers_url":"https://api.github.com/repos/gdmmx/nkn/stargazers","contributors_url":"https://api.github.com/repos/gdmmx/nkn/contributors","subscribers_url":"https://api.github.com/repos/gdmmx/nkn/subscribers","subscription_url":"https://api.github.com/repos/gdmmx/nkn/subscription","commits_url":"https://api.github.com/repos/gdmmx/nkn/commits{/sha}","git_commits_url":"https://api.github.com/repos/gdmmx/nkn/git/commits{/sha}","comments_url":"https://api.github.com/repos/gdmmx/nkn/comments{/number}","issue_comment_url":"https://api.github.com/repos/gdmmx/nkn/issues/comments{/number}","contents_url":"https://api.github.com/repos/gdmmx/nkn/contents/{+path}","compare_url":"https://api.github.com/repos/gdmmx/nkn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gdmmx/nkn/merges","archive_url":"https://api.github.com/repos/gdmmx/nkn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gdmmx/nkn/downloads","issues_url":"https://api.github.com/repos/gdmmx/nkn/issues{/number}","pulls_url":"https://api.github.com/repos/gdmmx/nkn/pulls{/number}","milestones_url":"https://api.github.com/repos/gdmmx/nkn/milestones{/number}","notifications_url":"https://api.github.com/repos/gdmmx/nkn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gdmmx/nkn/labels{/name}","releases_url":"https://api.github.com/repos/gdmmx/nkn/releases{/id}","deployments_url":"https://api.github.com/repos/gdmmx/nkn/deployments","created_at":"2018-06-12T16:23:50Z","updated_at":"2018-11-15T08:44:43Z","pushed_at":"2018-11-21T02:37:20Z","git_url":"git://github.com/gdmmx/nkn.git","ssh_url":"git@github.com:gdmmx/nkn.git","clone_url":"https://github.com/gdmmx/nkn.git","svn_url":"https://github.com/gdmmx/nkn","homepage":"https://www.nkn.org","size":8030,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"nknorg:master","ref":"master","sha":"de25fb5e53a1ec363e7a1f3b4b45d6005bc54d00","user":{"login":"nknorg","id":35023685,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1MDIzNjg1","avatar_url":"https://avatars0.githubusercontent.com/u/35023685?v=4","gravatar_id":"","url":"https://api.github.com/users/nknorg","html_url":"https://github.com/nknorg","followers_url":"https://api.github.com/users/nknorg/followers","following_url":"https://api.github.com/users/nknorg/following{/other_user}","gists_url":"https://api.github.com/users/nknorg/gists{/gist_id}","starred_url":"https://api.github.com/users/nknorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nknorg/subscriptions","organizations_url":"https://api.github.com/users/nknorg/orgs","repos_url":"https://api.github.com/users/nknorg/repos","events_url":"https://api.github.com/users/nknorg/events{/privacy}","received_events_url":"https://api.github.com/users/nknorg/received_events","type":"Organization","site_admin":false},"repo":{"id":119047243,"node_id":"MDEwOlJlcG9zaXRvcnkxMTkwNDcyNDM=","name":"nkn","full_name":"nknorg/nkn","private":false,"owner":{"login":"nknorg","id":35023685,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM1MDIzNjg1","avatar_url":"https://avatars0.githubusercontent.com/u/35023685?v=4","gravatar_id":"","url":"https://api.github.com/users/nknorg","html_url":"https://github.com/nknorg","followers_url":"https://api.github.com/users/nknorg/followers","following_url":"https://api.github.com/users/nknorg/following{/other_user}","gists_url":"https://api.github.com/users/nknorg/gists{/gist_id}","starred_url":"https://api.github.com/users/nknorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nknorg/subscriptions","organizations_url":"https://api.github.com/users/nknorg/orgs","repos_url":"https://api.github.com/users/nknorg/repos","events_url":"https://api.github.com/users/nknorg/events{/privacy}","received_events_url":"https://api.github.com/users/nknorg/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/nknorg/nkn","description":"NKN blockchain system in Golang","fork":false,"url":"https://api.github.com/repos/nknorg/nkn","forks_url":"https://api.github.com/repos/nknorg/nkn/forks","keys_url":"https://api.github.com/repos/nknorg/nkn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nknorg/nkn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nknorg/nkn/teams","hooks_url":"https://api.github.com/repos/nknorg/nkn/hooks","issue_events_url":"https://api.github.com/repos/nknorg/nkn/issues/events{/number}","events_url":"https://api.github.com/repos/nknorg/nkn/events","assignees_url":"https://api.github.com/repos/nknorg/nkn/assignees{/user}","branches_url":"https://api.github.com/repos/nknorg/nkn/branches{/branch}","tags_url":"https://api.github.com/repos/nknorg/nkn/tags","blobs_url":"https://api.github.com/repos/nknorg/nkn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nknorg/nkn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nknorg/nkn/git/refs{/sha}","trees_url":"https://api.github.com/repos/nknorg/nkn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nknorg/nkn/statuses/{sha}","languages_url":"https://api.github.com/repos/nknorg/nkn/languages","stargazers_url":"https://api.github.com/repos/nknorg/nkn/stargazers","contributors_url":"https://api.github.com/repos/nknorg/nkn/contributors","subscribers_url":"https://api.github.com/repos/nknorg/nkn/subscribers","subscription_url":"https://api.github.com/repos/nknorg/nkn/subscription","commits_url":"https://api.github.com/repos/nknorg/nkn/commits{/sha}","git_commits_url":"https://api.github.com/repos/nknorg/nkn/git/commits{/sha}","comments_url":"https://api.github.com/repos/nknorg/nkn/comments{/number}","issue_comment_url":"https://api.github.com/repos/nknorg/nkn/issues/comments{/number}","contents_url":"https://api.github.com/repos/nknorg/nkn/contents/{+path}","compare_url":"https://api.github.com/repos/nknorg/nkn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nknorg/nkn/merges","archive_url":"https://api.github.com/repos/nknorg/nkn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nknorg/nkn/downloads","issues_url":"https://api.github.com/repos/nknorg/nkn/issues{/number}","pulls_url":"https://api.github.com/repos/nknorg/nkn/pulls{/number}","milestones_url":"https://api.github.com/repos/nknorg/nkn/milestones{/number}","notifications_url":"https://api.github.com/repos/nknorg/nkn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nknorg/nkn/labels{/name}","releases_url":"https://api.github.com/repos/nknorg/nkn/releases{/id}","deployments_url":"https://api.github.com/repos/nknorg/nkn/deployments","created_at":"2018-01-26T12:07:15Z","updated_at":"2018-11-17T23:59:01Z","pushed_at":"2018-11-21T02:52:59Z","git_url":"git://github.com/nknorg/nkn.git","ssh_url":"git@github.com:nknorg/nkn.git","clone_url":"https://github.com/nknorg/nkn.git","svn_url":"https://github.com/nknorg/nkn","homepage":"https://www.nkn.org","size":8051,"stargazers_count":143,"watchers_count":143,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":64,"mirror_url":null,"archived":false,"open_issues_count":17,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":64,"open_issues":17,"watchers":143,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nknorg/nkn/pulls/381"},"html":{"href":"https://github.com/nknorg/nkn/pull/381"},"issue":{"href":"https://api.github.com/repos/nknorg/nkn/issues/381"},"comments":{"href":"https://api.github.com/repos/nknorg/nkn/issues/381/comments"},"review_comments":{"href":"https://api.github.com/repos/nknorg/nkn/pulls/381/comments"},"review_comment":{"href":"https://api.github.com/repos/nknorg/nkn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nknorg/nkn/pulls/381/commits"},"statuses":{"href":"https://api.github.com/repos/nknorg/nkn/statuses/73fa799918768d118697dc0567940cffe80ef281"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"gdmmx"}}