{"action":"created","comment":{"url":"https://api.github.com/repos/bitcoin/bips/pulls/comments/50797707","id":50797707,"diff_hunk":"@@ -85,20 +85,20 @@ There are two cases in which witness validation logic are triggered. Each case d\n \n If the version byte is 0, and the witness program is 20 bytes:\n * It is interpreted as a pay-to-witness-public-key-hash (P2WPKH) program.\n-* The witness must consist of exactly 2 items. The first one a signature, and the second one a public key.\n+* The witness must consist of exactly 2 items (≤ 520 bytes each). The first one a signature, and the second one a public key.\n * The HASH160 of the public key must match the 20-byte witness program.\n * After normal script evaluation, the signature is verified against the public key with CHECKSIG operation. The verification must result in a single TRUE on the stack.\n \n If the version byte is 0, and the witness program is 32 bytes:\n * It is interpreted as a pay-to-witness-script-hash (P2WSH) program.\n * The witness must consist of an input stack to feed to the script, followed by a serialized script (\"witnessScript\").\n-* The witnessScript is popped off the initial witness stack. SHA256 of the witnessScript must match the 32-byte witness program.\n-* The witnessScript is deserialized, and executed after normal script evaluation with the remaining witness stack.\n+* The witnessScript (≤ 10,000 bytes) is popped off the initial witness stack. SHA256 of the witnessScript must match the 32-byte witness program.\n+* The witnessScript is deserialized, and executed after normal script evaluation with the remaining witness stack (≤ 520 bytes for each stack item).\n * The script must not fail, and result in exactly a single TRUE on the stack.\n \n If the version byte is 0, but the witness program is neither 20 nor 32 bytes, the script must fail.\n \n-If the version byte is 1 to 16, no further interpretation of the witness program or witness happens.\n+If the version byte is 1 to 16, no further interpretation of the witness program or witness happens, and there is no size restriction for the witness. These versions are reserved for future extensions.","path":"bip-0141.mediawiki","position":30,"original_position":30,"commit_id":"4bf562569e43e7521d3bf3c91cb4cb11f5365bd4","original_commit_id":"4bf562569e43e7521d3bf3c91cb4cb11f5365bd4","user":{"login":"jl2012","id":8403418,"avatar_url":"https://avatars.githubusercontent.com/u/8403418?v=3","gravatar_id":"","url":"https://api.github.com/users/jl2012","html_url":"https://github.com/jl2012","followers_url":"https://api.github.com/users/jl2012/followers","following_url":"https://api.github.com/users/jl2012/following{/other_user}","gists_url":"https://api.github.com/users/jl2012/gists{/gist_id}","starred_url":"https://api.github.com/users/jl2012/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jl2012/subscriptions","organizations_url":"https://api.github.com/users/jl2012/orgs","repos_url":"https://api.github.com/users/jl2012/repos","events_url":"https://api.github.com/users/jl2012/events{/privacy}","received_events_url":"https://api.github.com/users/jl2012/received_events","type":"User","site_admin":false},"body":"@sipa, I am talking about the witness stack here, not scriptPubKey nor scriptSig. There is no size limit for the witness stack if the witness program is v1 or above","created_at":"2016-01-26T05:50:05Z","updated_at":"2016-01-26T05:50:05Z","html_url":"https://github.com/bitcoin/bips/pull/303#discussion_r50797707","pull_request_url":"https://api.github.com/repos/bitcoin/bips/pulls/303","_links":{"self":{"href":"https://api.github.com/repos/bitcoin/bips/pulls/comments/50797707"},"html":{"href":"https://github.com/bitcoin/bips/pull/303#discussion_r50797707"},"pull_request":{"href":"https://api.github.com/repos/bitcoin/bips/pulls/303"}}},"pull_request":{"url":"https://api.github.com/repos/bitcoin/bips/pulls/303","id":57167185,"html_url":"https://github.com/bitcoin/bips/pull/303","diff_url":"https://github.com/bitcoin/bips/pull/303.diff","patch_url":"https://github.com/bitcoin/bips/pull/303.patch","issue_url":"https://api.github.com/repos/bitcoin/bips/issues/303","number":303,"state":"open","locked":false,"title":"BIP141: Add 520 bytes witness stack limit","user":{"login":"jl2012","id":8403418,"avatar_url":"https://avatars.githubusercontent.com/u/8403418?v=3","gravatar_id":"","url":"https://api.github.com/users/jl2012","html_url":"https://github.com/jl2012","followers_url":"https://api.github.com/users/jl2012/followers","following_url":"https://api.github.com/users/jl2012/following{/other_user}","gists_url":"https://api.github.com/users/jl2012/gists{/gist_id}","starred_url":"https://api.github.com/users/jl2012/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jl2012/subscriptions","organizations_url":"https://api.github.com/users/jl2012/orgs","repos_url":"https://api.github.com/users/jl2012/repos","events_url":"https://api.github.com/users/jl2012/events{/privacy}","received_events_url":"https://api.github.com/users/jl2012/received_events","type":"User","site_admin":false},"body":"@sipa","created_at":"2016-01-26T03:48:51Z","updated_at":"2016-01-26T05:50:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"07a05f01cd631849d5cfae96f4abda9130a0dd79","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bitcoin/bips/pulls/303/commits","review_comments_url":"https://api.github.com/repos/bitcoin/bips/pulls/303/comments","review_comment_url":"https://api.github.com/repos/bitcoin/bips/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bitcoin/bips/issues/303/comments","statuses_url":"https://api.github.com/repos/bitcoin/bips/statuses/4bf562569e43e7521d3bf3c91cb4cb11f5365bd4","head":{"label":"jl2012:patch-10","ref":"patch-10","sha":"4bf562569e43e7521d3bf3c91cb4cb11f5365bd4","user":{"login":"jl2012","id":8403418,"avatar_url":"https://avatars.githubusercontent.com/u/8403418?v=3","gravatar_id":"","url":"https://api.github.com/users/jl2012","html_url":"https://github.com/jl2012","followers_url":"https://api.github.com/users/jl2012/followers","following_url":"https://api.github.com/users/jl2012/following{/other_user}","gists_url":"https://api.github.com/users/jl2012/gists{/gist_id}","starred_url":"https://api.github.com/users/jl2012/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jl2012/subscriptions","organizations_url":"https://api.github.com/users/jl2012/orgs","repos_url":"https://api.github.com/users/jl2012/repos","events_url":"https://api.github.com/users/jl2012/events{/privacy}","received_events_url":"https://api.github.com/users/jl2012/received_events","type":"User","site_admin":false},"repo":{"id":34785021,"name":"bips","full_name":"jl2012/bips","owner":{"login":"jl2012","id":8403418,"avatar_url":"https://avatars.githubusercontent.com/u/8403418?v=3","gravatar_id":"","url":"https://api.github.com/users/jl2012","html_url":"https://github.com/jl2012","followers_url":"https://api.github.com/users/jl2012/followers","following_url":"https://api.github.com/users/jl2012/following{/other_user}","gists_url":"https://api.github.com/users/jl2012/gists{/gist_id}","starred_url":"https://api.github.com/users/jl2012/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jl2012/subscriptions","organizations_url":"https://api.github.com/users/jl2012/orgs","repos_url":"https://api.github.com/users/jl2012/repos","events_url":"https://api.github.com/users/jl2012/events{/privacy}","received_events_url":"https://api.github.com/users/jl2012/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jl2012/bips","description":"Bitcoin Improvement Proposals","fork":true,"url":"https://api.github.com/repos/jl2012/bips","forks_url":"https://api.github.com/repos/jl2012/bips/forks","keys_url":"https://api.github.com/repos/jl2012/bips/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jl2012/bips/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jl2012/bips/teams","hooks_url":"https://api.github.com/repos/jl2012/bips/hooks","issue_events_url":"https://api.github.com/repos/jl2012/bips/issues/events{/number}","events_url":"https://api.github.com/repos/jl2012/bips/events","assignees_url":"https://api.github.com/repos/jl2012/bips/assignees{/user}","branches_url":"https://api.github.com/repos/jl2012/bips/branches{/branch}","tags_url":"https://api.github.com/repos/jl2012/bips/tags","blobs_url":"https://api.github.com/repos/jl2012/bips/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jl2012/bips/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jl2012/bips/git/refs{/sha}","trees_url":"https://api.github.com/repos/jl2012/bips/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jl2012/bips/statuses/{sha}","languages_url":"https://api.github.com/repos/jl2012/bips/languages","stargazers_url":"https://api.github.com/repos/jl2012/bips/stargazers","contributors_url":"https://api.github.com/repos/jl2012/bips/contributors","subscribers_url":"https://api.github.com/repos/jl2012/bips/subscribers","subscription_url":"https://api.github.com/repos/jl2012/bips/subscription","commits_url":"https://api.github.com/repos/jl2012/bips/commits{/sha}","git_commits_url":"https://api.github.com/repos/jl2012/bips/git/commits{/sha}","comments_url":"https://api.github.com/repos/jl2012/bips/comments{/number}","issue_comment_url":"https://api.github.com/repos/jl2012/bips/issues/comments{/number}","contents_url":"https://api.github.com/repos/jl2012/bips/contents/{+path}","compare_url":"https://api.github.com/repos/jl2012/bips/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jl2012/bips/merges","archive_url":"https://api.github.com/repos/jl2012/bips/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jl2012/bips/downloads","issues_url":"https://api.github.com/repos/jl2012/bips/issues{/number}","pulls_url":"https://api.github.com/repos/jl2012/bips/pulls{/number}","milestones_url":"https://api.github.com/repos/jl2012/bips/milestones{/number}","notifications_url":"https://api.github.com/repos/jl2012/bips/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jl2012/bips/labels{/name}","releases_url":"https://api.github.com/repos/jl2012/bips/releases{/id}","deployments_url":"https://api.github.com/repos/jl2012/bips/deployments","created_at":"2015-04-29T09:31:22Z","updated_at":"2016-01-11T09:56:18Z","pushed_at":"2016-01-26T03:48:30Z","git_url":"git://github.com/jl2012/bips.git","ssh_url":"git@github.com:jl2012/bips.git","clone_url":"https://github.com/jl2012/bips.git","svn_url":"https://github.com/jl2012/bips","homepage":"bitcoin.org","size":1473,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"bitcoin:master","ref":"master","sha":"94cdf36797a1bc6ad4c5b0035e22621bf630d3a1","user":{"login":"bitcoin","id":528860,"avatar_url":"https://avatars.githubusercontent.com/u/528860?v=3","gravatar_id":"","url":"https://api.github.com/users/bitcoin","html_url":"https://github.com/bitcoin","followers_url":"https://api.github.com/users/bitcoin/followers","following_url":"https://api.github.com/users/bitcoin/following{/other_user}","gists_url":"https://api.github.com/users/bitcoin/gists{/gist_id}","starred_url":"https://api.github.com/users/bitcoin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitcoin/subscriptions","organizations_url":"https://api.github.com/users/bitcoin/orgs","repos_url":"https://api.github.com/users/bitcoin/repos","events_url":"https://api.github.com/users/bitcoin/events{/privacy}","received_events_url":"https://api.github.com/users/bitcoin/received_events","type":"Organization","site_admin":false},"repo":{"id":14531737,"name":"bips","full_name":"bitcoin/bips","owner":{"login":"bitcoin","id":528860,"avatar_url":"https://avatars.githubusercontent.com/u/528860?v=3","gravatar_id":"","url":"https://api.github.com/users/bitcoin","html_url":"https://github.com/bitcoin","followers_url":"https://api.github.com/users/bitcoin/followers","following_url":"https://api.github.com/users/bitcoin/following{/other_user}","gists_url":"https://api.github.com/users/bitcoin/gists{/gist_id}","starred_url":"https://api.github.com/users/bitcoin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bitcoin/subscriptions","organizations_url":"https://api.github.com/users/bitcoin/orgs","repos_url":"https://api.github.com/users/bitcoin/repos","events_url":"https://api.github.com/users/bitcoin/events{/privacy}","received_events_url":"https://api.github.com/users/bitcoin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bitcoin/bips","description":"Bitcoin Improvement Proposals","fork":false,"url":"https://api.github.com/repos/bitcoin/bips","forks_url":"https://api.github.com/repos/bitcoin/bips/forks","keys_url":"https://api.github.com/repos/bitcoin/bips/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bitcoin/bips/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bitcoin/bips/teams","hooks_url":"https://api.github.com/repos/bitcoin/bips/hooks","issue_events_url":"https://api.github.com/repos/bitcoin/bips/issues/events{/number}","events_url":"https://api.github.com/repos/bitcoin/bips/events","assignees_url":"https://api.github.com/repos/bitcoin/bips/assignees{/user}","branches_url":"https://api.github.com/repos/bitcoin/bips/branches{/branch}","tags_url":"https://api.github.com/repos/bitcoin/bips/tags","blobs_url":"https://api.github.com/repos/bitcoin/bips/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bitcoin/bips/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bitcoin/bips/git/refs{/sha}","trees_url":"https://api.github.com/repos/bitcoin/bips/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bitcoin/bips/statuses/{sha}","languages_url":"https://api.github.com/repos/bitcoin/bips/languages","stargazers_url":"https://api.github.com/repos/bitcoin/bips/stargazers","contributors_url":"https://api.github.com/repos/bitcoin/bips/contributors","subscribers_url":"https://api.github.com/repos/bitcoin/bips/subscribers","subscription_url":"https://api.github.com/repos/bitcoin/bips/subscription","commits_url":"https://api.github.com/repos/bitcoin/bips/commits{/sha}","git_commits_url":"https://api.github.com/repos/bitcoin/bips/git/commits{/sha}","comments_url":"https://api.github.com/repos/bitcoin/bips/comments{/number}","issue_comment_url":"https://api.github.com/repos/bitcoin/bips/issues/comments{/number}","contents_url":"https://api.github.com/repos/bitcoin/bips/contents/{+path}","compare_url":"https://api.github.com/repos/bitcoin/bips/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bitcoin/bips/merges","archive_url":"https://api.github.com/repos/bitcoin/bips/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bitcoin/bips/downloads","issues_url":"https://api.github.com/repos/bitcoin/bips/issues{/number}","pulls_url":"https://api.github.com/repos/bitcoin/bips/pulls{/number}","milestones_url":"https://api.github.com/repos/bitcoin/bips/milestones{/number}","notifications_url":"https://api.github.com/repos/bitcoin/bips/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bitcoin/bips/labels{/name}","releases_url":"https://api.github.com/repos/bitcoin/bips/releases{/id}","deployments_url":"https://api.github.com/repos/bitcoin/bips/deployments","created_at":"2013-11-19T17:18:41Z","updated_at":"2016-01-20T20:58:40Z","pushed_at":"2016-01-26T03:48:52Z","git_url":"git://github.com/bitcoin/bips.git","ssh_url":"git@github.com:bitcoin/bips.git","clone_url":"https://github.com/bitcoin/bips.git","svn_url":"https://github.com/bitcoin/bips","homepage":"bitcoin.org","size":2383,"stargazers_count":478,"watchers_count":478,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":316,"mirror_url":null,"open_issues_count":16,"forks":316,"open_issues":16,"watchers":478,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bitcoin/bips/pulls/303"},"html":{"href":"https://github.com/bitcoin/bips/pull/303"},"issue":{"href":"https://api.github.com/repos/bitcoin/bips/issues/303"},"comments":{"href":"https://api.github.com/repos/bitcoin/bips/issues/303/comments"},"review_comments":{"href":"https://api.github.com/repos/bitcoin/bips/pulls/303/comments"},"review_comment":{"href":"https://api.github.com/repos/bitcoin/bips/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bitcoin/bips/pulls/303/commits"},"statuses":{"href":"https://api.github.com/repos/bitcoin/bips/statuses/4bf562569e43e7521d3bf3c91cb4cb11f5365bd4"}}}}