diff options
author | Antoine Riard <antoine.riard@gmail.com> | 2025-02-15 13:13:24 -0800 |
---|---|---|
committer | bitcoindev <bitcoindev@googlegroups.com> | 2025-02-16 03:59:04 -0800 |
commit | be6eeeb1c6764c4d4d28f145c874db0982da40f5 (patch) | |
tree | 36a912a8cee75f66ad44199ba810a253d3741aae | |
parent | 9d9201be301207a078b46b898542ff1f188ba2c0 (diff) | |
download | pi-bitcoindev-be6eeeb1c6764c4d4d28f145c874db0982da40f5.tar.gz pi-bitcoindev-be6eeeb1c6764c4d4d28f145c874db0982da40f5.zip |
Re: [bitcoindev] Update on the Great Consensus Cleanup Revival
-rw-r--r-- | b7/43ef89358fe84dd7194c479918ba33598b849a | 229 |
1 files changed, 229 insertions, 0 deletions
diff --git a/b7/43ef89358fe84dd7194c479918ba33598b849a b/b7/43ef89358fe84dd7194c479918ba33598b849a new file mode 100644 index 000000000..f1978dc4e --- /dev/null +++ b/b7/43ef89358fe84dd7194c479918ba33598b849a @@ -0,0 +1,229 @@ +Delivery-date: Sun, 16 Feb 2025 03:59:04 -0800 +Received: from mail-yb1-f184.google.com ([209.85.219.184]) + by mail.fairlystable.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 + (Exim 4.94.2) + (envelope-from <bitcoindev+bncBC3PT7FYWAMRB7FFY66QMGQED4234CQ@googlegroups.com>) + id 1tjdId-0006im-FW + for bitcoindev@gnusha.org; Sun, 16 Feb 2025 03:59:04 -0800 +Received: by mail-yb1-f184.google.com with SMTP id 3f1490d57ef6-e54da6701d2sf5128801276.0 + for <bitcoindev@gnusha.org>; Sun, 16 Feb 2025 03:59:02 -0800 (PST) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=googlegroups.com; s=20230601; t=1739707136; x=1740311936; darn=gnusha.org; + h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post + :list-id:mailing-list:precedence:x-original-sender:mime-version + :subject:references:in-reply-to:message-id:to:from:date:sender:from + :to:cc:subject:date:message-id:reply-to; + bh=EHdMKxUqntkM6rssIOcoMxJR87HKOGXzykRXBy1Wy6c=; + b=FFCEUkFzo+ogLmNyZVWke92Uq18c4uVlvgy4FE5lx/S976MzZHliSGI9QvuX/JJngq + grBd7WtnjGYLKPxW0eVgcTebVK3AXM7Hy1G8UITITAHyVpaFb9/xsMM3TXXxaIG2tCgr + VF/HuLMkrS0Va/JwUsvuYgMRWKd659vYOJ/yvZiTcK7c0WilyUinBqr1M1wrbRQw4GTS + XfThYi1nsGrWaKWKnbqRTjCFXBbjy+crBlA/evcpJKfYZRwY9jsMg69UTmBH0Tbw7p/+ + mJP2X2iw71MAY+oG8ZtmTZ4NViXvKNaoNxkFkpMhH+hoQHnkO6zYgZs/Mq4uPu/L0+8p + sp3g== +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=gmail.com; s=20230601; t=1739707136; x=1740311936; darn=gnusha.org; + h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post + :list-id:mailing-list:precedence:x-original-sender:mime-version + :subject:references:in-reply-to:message-id:to:from:date:from:to:cc + :subject:date:message-id:reply-to; + bh=EHdMKxUqntkM6rssIOcoMxJR87HKOGXzykRXBy1Wy6c=; + b=O1+LK+1BhWaT7FeUEeYPpzgFOS6+ons27ykP0cGYTjhd7iQDJQJePKfQeKzDWos32p + lxKcBMauxzgRipQVCNlZES8/UAeYKutVv6elMWvAUg0xFnlFMLNMAKiT74+ISJau4jod + znj34+KN+tWPP9ZElImelLaxBTqqsGsCtCsCX+GKluL4CHv4YcyvY8L5yNQFIfckfrnV + +sNDCzuobH4/UoOaCQbjp6Hr+oZQhkO5n32iljtHkZDzXPOnyW+4CHSXa3y/mTnXzx6p + spzngT3wmODKUhzrSGojo795jHe/JaUou1bkKyhuGk+Zx9Yg7TrR/JdgdY/BeXeaFgHx + AKgA== +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20230601; t=1739707136; x=1740311936; + h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post + :list-id:mailing-list:precedence:x-original-sender:mime-version + :subject:references:in-reply-to:message-id:to:from:date:x-beenthere + :x-gm-message-state:sender:from:to:cc:subject:date:message-id + :reply-to; + bh=EHdMKxUqntkM6rssIOcoMxJR87HKOGXzykRXBy1Wy6c=; + b=IJexXSo5OEink21U7MhDnNWvn5zS/+ij0KNBvMT70/kPjAPF82N90k5/cpQ34Tpcnu + XvIKCQ2PU1DLtTTneqAv46jCwwrhZRoP6vmKvMHE1UjT8QsdEPBQjVwxcWSRidQ04o2c + vG3YVpmzuDQ5jb14heBvLyhLRfGMs3BdSMzygZLiiHfTx/Tv0EHZF81wYkvkKc3Sb7G/ + iSOvW11g/kLGDqlKCq36PPK2Ga2KZw6hnXEd5/g9J8X0s3Iu4SCb/g1h0cOxsaRQfqgx + 6vS/HytJtFEBKgXERuts4rzV9y+D14xORtqWYY99Aqd3j+VhxkZvRPtvLW8j9GDS0OiS + 4CKA== +Sender: bitcoindev@googlegroups.com +X-Forwarded-Encrypted: i=1; AJvYcCXaiy+3lhMJufQ6+VOHa/HOad17apRsSOD8MXbeOThm3DShgOHGuxk3U5ufkM2vySiRsBvDiO2HfZbl@gnusha.org +X-Gm-Message-State: AOJu0YwetDJCd2YSw19PefhSvR8zgsuILBxo5xuNayswUt3RmwqMUtxy + MxN5w8C+gW/Da6G0qr4XIcwuW3iQlCUnDsoEAuI9I4Y0hjYS5+C+ +X-Google-Smtp-Source: AGHT+IEoEaCZ5C9iBX1klDX3ExFDv8Hxxheuhb58SVoaJxZ3a/dCETif/z9+0jzyaeGZO/B1+E35Eg== +X-Received: by 2002:a05:6902:220f:b0:e57:8991:be4b with SMTP id 3f1490d57ef6-e5dc91ebcccmr3951059276.35.1739707136410; + Sun, 16 Feb 2025 03:58:56 -0800 (PST) +X-BeenThere: bitcoindev@googlegroups.com; h=Adn5yVFl6pDr8vrmrGdH6JGDBSdZewb4LwKIfXdIztwu+zZhDw== +Received: by 2002:a25:d852:0:b0:e58:562:680 with SMTP id 3f1490d57ef6-e5da7920908ls535352276.0.-pod-prod-08-us; + Sun, 16 Feb 2025 03:58:52 -0800 (PST) +X-Received: by 2002:a05:690c:4c10:b0:6ef:820c:a752 with SMTP id 00721157ae682-6fb582b8af8mr52027527b3.20.1739707132453; + Sun, 16 Feb 2025 03:58:52 -0800 (PST) +Received: by 2002:a05:690c:4786:b0:6fb:3e32:1a09 with SMTP id 00721157ae682-6fb44927275ms7b3; + Sat, 15 Feb 2025 13:13:26 -0800 (PST) +X-Received: by 2002:a05:690c:25c5:b0:6ef:4a1f:36d6 with SMTP id 00721157ae682-6fb5831d609mr37671797b3.23.1739654005503; + Sat, 15 Feb 2025 13:13:25 -0800 (PST) +Date: Sat, 15 Feb 2025 13:13:24 -0800 (PST) +From: Antoine Riard <antoine.riard@gmail.com> +To: Bitcoin Development Mailing List <bitcoindev@googlegroups.com> +Message-Id: <97c36a7a-fe4d-4e24-8bbb-a55b7284fe71n@googlegroups.com> +In-Reply-To: <Z6-AD12xTqxCxjqf@petertodd.org> +References: <jiyMlvTX8BnG71f75SqChQZxyhZDQ65kldcugeIDJVJsvK4hadCO3GT46xFc7_cUlWdmOCG0B_WIz0HAO5ZugqYTuX5qxnNLRBn3MopuATI=@protonmail.com> + <ff82fe21-8e02-42df-8760-c3e358a12766@murch.one> + <53c78eb9-2050-46d5-a688-be82846135a4n@googlegroups.com> + <Z6-AD12xTqxCxjqf@petertodd.org> +Subject: Re: [bitcoindev] Update on the Great Consensus Cleanup Revival +MIME-Version: 1.0 +Content-Type: multipart/mixed; + boundary="----=_Part_89316_1223663156.1739654004942" +X-Original-Sender: antoine.riard@gmail.com +Precedence: list +Mailing-list: list bitcoindev@googlegroups.com; contact bitcoindev+owners@googlegroups.com +List-ID: <bitcoindev.googlegroups.com> +X-Google-Group-Id: 786775582512 +List-Post: <https://groups.google.com/group/bitcoindev/post>, <mailto:bitcoindev@googlegroups.com> +List-Help: <https://groups.google.com/support/>, <mailto:bitcoindev+help@googlegroups.com> +List-Archive: <https://groups.google.com/group/bitcoindev +List-Subscribe: <https://groups.google.com/group/bitcoindev/subscribe>, <mailto:bitcoindev+subscribe@googlegroups.com> +List-Unsubscribe: <mailto:googlegroups-manage+786775582512+unsubscribe@googlegroups.com>, + <https://groups.google.com/group/bitcoindev/subscribe> +X-Spam-Score: -0.5 (/) + +------=_Part_89316_1223663156.1739654004942 +Content-Type: multipart/alternative; + boundary="----=_Part_89317_867889912.1739654004942" + +------=_Part_89317_867889912.1739654004942 +Content-Type: text/plain; charset="UTF-8" +Content-Transfer-Encoding: quoted-printable + +Hi Peter, + +I'm talking about this check in VerifyScript as of commit 43e71f74 in=20 +bitcoin core. + +``` + if ((flags & SCRIPT_VERIFY_SIGPUSHONLY) !=3D 0 &&=20 +!scriptSig.IsPushOnly()) { + return set_error(serror, SCRIPT_ERR_SIG_PUSHONLY); + } +``` + +In my understanding, we never set SCRIPT_VERIFY_SIGPUSHONLY, neither in=20 +MANDATORY_SCRIPT_VERIFY_FLAGS, +nor in STANDARD_SCRIPT_VERIFY_FLAGS, and this sounds okay as it's a script= +=20 +check pertaining to BIP62 +rule 2, and BIP62 was never activated. As far as I can tell, that's more a= +=20 +stale check just right=20 +there in the interpreter code paths. + +We still return SCRIPT_ERR_SIG_PUSHONLY for P2SH spends, verifying the=20 +scriptSig is push-only. + +All the unit tests (i.e `script_tests.cpp`) are manually setting the=20 +SCRIPT_VERIFY_SIGPUSHONLY flag +to verify the logic correctness, even it appears as never being set for=20 +block validation. + +The original PR is there: https://github.com/bitcoin/bitcoin/pull/5065 + +Feel free to point me out if I'm missing something obvious here. + +Best, +Antoine +OTS hash: 42e2e614fea49ec876539e28b323718df3ef734b3a4b247fcc649f0704ea1b61 +Le vendredi 14 f=C3=A9vrier 2025 =C3=A0 17:45:54 UTC, Peter Todd a =C3=A9cr= +it : + +> On Fri, Feb 07, 2025 at 05:02:46AM -0800, Antoine Riard wrote: +> > This might be a stylistic note, though I could point in bitcoin core=20 +> code=20 +> > today implemented +> > check in the script interpreter right in the crux of consensus code=20 +> paths=20 +> > that is just stale +> > due to a never-activated BIP (-- yes I'm starring at you SIGPUSHONLY). +> +> What specifically do you mean by this? You mean the +> SCRIPT_ERR_SIG_PUSHONLY error condition? +> +> --=20 +> https://petertodd.org 'peter'[:-1]@petertodd.org +> + +--=20 +You received this message because you are subscribed to the Google Groups "= +Bitcoin Development Mailing List" group. +To unsubscribe from this group and stop receiving emails from it, send an e= +mail to bitcoindev+unsubscribe@googlegroups.com. +To view this discussion visit https://groups.google.com/d/msgid/bitcoindev/= +97c36a7a-fe4d-4e24-8bbb-a55b7284fe71n%40googlegroups.com. + +------=_Part_89317_867889912.1739654004942 +Content-Type: text/html; charset="UTF-8" +Content-Transfer-Encoding: quoted-printable + +Hi Peter,<br /><br />I'm talking about this check in VerifyScript as of com= +mit 43e71f74 in bitcoin core.<br /><br />```<br />=C2=A0 =C2=A0 if ((flags = +& SCRIPT_VERIFY_SIGPUSHONLY) !=3D 0 && !scriptSig.IsPushOnly())= + {<br />=C2=A0 =C2=A0 =C2=A0 =C2=A0 return set_error(serror, SCRIPT_ERR_SIG= +_PUSHONLY);<br />=C2=A0 =C2=A0 }<br />```<br /><br />In my understanding, w= +e never set SCRIPT_VERIFY_SIGPUSHONLY, neither in MANDATORY_SCRIPT_VERIFY_F= +LAGS,<br />nor in STANDARD_SCRIPT_VERIFY_FLAGS, and this sounds okay as it'= +s a script check pertaining to BIP62<br />rule 2, and BIP62 was never activ= +ated. As far as I can tell, that's more a stale check just right <br />ther= +e in the interpreter code paths.<br /><br />We still return SCRIPT_ERR_SIG_= +PUSHONLY for P2SH spends, verifying the scriptSig is push-only.<br /><br />= +All the unit tests (i.e `script_tests.cpp`) are manually setting the SCRIPT= +_VERIFY_SIGPUSHONLY flag<br />to verify the logic correctness, even it appe= +ars as never being set for block validation.<br /><br />The original PR is = +there: https://github.com/bitcoin/bitcoin/pull/5065<br /><br />Feel free to= + point me out if I'm missing something obvious here.<br /><br />Best,<br />= +Antoine<br />OTS hash: 42e2e614fea49ec876539e28b323718df3ef734b3a4b247fcc64= +9f0704ea1b61<br /><div class=3D"gmail_quote"><div dir=3D"auto" class=3D"gma= +il_attr">Le vendredi 14 f=C3=A9vrier 2025 =C3=A0 17:45:54 UTC, Peter Todd a= + =C3=A9crit=C2=A0:<br/></div><blockquote class=3D"gmail_quote" style=3D"mar= +gin: 0 0 0 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: = +1ex;">On Fri, Feb 07, 2025 at 05:02:46AM -0800, Antoine Riard wrote: +<br>> This might be a stylistic note, though I could point in bitcoin co= +re code=20 +<br>> today implemented +<br>> check in the script interpreter right in the crux of consensus cod= +e paths=20 +<br>> that is just stale +<br>> due to a never-activated BIP (-- yes I'm starring at you SIGPU= +SHONLY). +<br> +<br>What specifically do you mean by this? You mean the +<br>SCRIPT_ERR_SIG_PUSHONLY error condition? +<br> +<br>--=20 +<br><a href=3D"https://petertodd.org" target=3D"_blank" rel=3D"nofollow" da= +ta-saferedirecturl=3D"https://www.google.com/url?hl=3Dfr&q=3Dhttps://pe= +tertodd.org&source=3Dgmail&ust=3D1739740336967000&usg=3DAOvVaw2= +R5OF6_OMmQmcP5By1hwUJ">https://petertodd.org</a> 'peter'[:-1]@<a hr= +ef=3D"http://petertodd.org" target=3D"_blank" rel=3D"nofollow" data-safered= +irecturl=3D"https://www.google.com/url?hl=3Dfr&q=3Dhttp://petertodd.org= +&source=3Dgmail&ust=3D1739740336967000&usg=3DAOvVaw3gQoNAsh87fH= +YcS42yF758">petertodd.org</a> +<br></blockquote></div> + +<p></p> + +-- <br /> +You received this message because you are subscribed to the Google Groups &= +quot;Bitcoin Development Mailing List" group.<br /> +To unsubscribe from this group and stop receiving emails from it, send an e= +mail to <a href=3D"mailto:bitcoindev+unsubscribe@googlegroups.com">bitcoind= +ev+unsubscribe@googlegroups.com</a>.<br /> +To view this discussion visit <a href=3D"https://groups.google.com/d/msgid/= +bitcoindev/97c36a7a-fe4d-4e24-8bbb-a55b7284fe71n%40googlegroups.com?utm_med= +ium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/msgid/bitcoind= +ev/97c36a7a-fe4d-4e24-8bbb-a55b7284fe71n%40googlegroups.com</a>.<br /> + +------=_Part_89317_867889912.1739654004942-- + +------=_Part_89316_1223663156.1739654004942-- + |