Subject: Re: [bitcoindev] Update on the Great Consensus Cleanup Revival

From: Greg Sanders <[email-masked]>
Date: Fri, 7 Mar 2025 13:45:50 -0800 (PST)

I opened an issue a while ago on this 
topic: https://github.com/bitcoin/bitcoin/issues/26113

On Wednesday, February 26, 2025 at 7:29:23 AM UTC-5 Peter Todd wrote:

> On Sat, Feb 15, 2025 at 01:13:24PM -0800, Antoine Riard wrote:
> > Hi Peter,
> > 
> > I'm talking about this check in VerifyScript as of commit 43e71f74 in 
> > bitcoin core.
> > 
> > ```
> > if ((flags & SCRIPT_VERIFY_SIGPUSHONLY) != 0 && 
> > !scriptSig.IsPushOnly()) {
> > return set_error(serror, SCRIPT_ERR_SIG_PUSHONLY);
> > }
> > ```
> > 
> > In my understanding, we never set SCRIPT_VERIFY_SIGPUSHONLY, neither in 
> > MANDATORY_SCRIPT_VERIFY_FLAGS,
> > nor in STANDARD_SCRIPT_VERIFY_FLAGS, and this sounds okay as it's a 
> script 
> > check pertaining to BIP62
> > rule 2, and BIP62 was never activated. As far as I can tell, that's more 
> a 
> > stale check just right 
> > there in the interpreter code paths.
>
> Right. So the unused code is just those three lines and the single line
> defining SCRIPT_VERIFY_SIGPUSHONLY in script (plus four lines of test
> code); IsPushOnly() itself *is* used elsewhere in consensus.
>
> You could opena pull-req to remove that if you want. But the tests of
> SCRIPT_VERIFY_SIGPUSHONLY indirectly test IsPushOnly(), so not
> immediately clear if that's actually a good idea.
>
> -- 
> https://petertodd.org 'peter'[:-1]@petertodd.org
>

-- 
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 email to [email-masked].
To view this discussion visit https://groups.google.com/d/msgid/bitcoindev/fb040d17-e79f-4442-b906-a6fca7d8970cn%40googlegroups.com.