public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Antoine Riard <antoine.riard@gmail.com>
To: Bitcoin Development Mailing List <bitcoindev@googlegroups.com>
Subject: Re: [bitcoindev] Update on the Great Consensus Cleanup Revival
Date: Sat, 15 Feb 2025 13:13:24 -0800 (PST)	[thread overview]
Message-ID: <97c36a7a-fe4d-4e24-8bbb-a55b7284fe71n@googlegroups.com> (raw)
In-Reply-To: <Z6-AD12xTqxCxjqf@petertodd.org>


[-- Attachment #1.1: Type: text/plain, Size: 2125 bytes --]

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.

We still return SCRIPT_ERR_SIG_PUSHONLY for P2SH spends, verifying the 
scriptSig is push-only.

All the unit tests (i.e `script_tests.cpp`) are manually setting the 
SCRIPT_VERIFY_SIGPUSHONLY flag
to verify the logic correctness, even it appears as never being set for 
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évrier 2025 à 17:45:54 UTC, Peter Todd a écrit :

> 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 
> code 
> > today implemented
> > check in the script interpreter right in the crux of consensus code 
> paths 
> > 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?
>
> -- 
> 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 bitcoindev+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/bitcoindev/97c36a7a-fe4d-4e24-8bbb-a55b7284fe71n%40googlegroups.com.

[-- Attachment #1.2: Type: text/html, Size: 3206 bytes --]

  reply	other threads:[~2025-02-16 11:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-05 18:09 [bitcoindev] Update on the Great Consensus Cleanup Revival 'Antoine Poinsot' via Bitcoin Development Mailing List
2025-02-06 21:34 ` Murch
2025-02-06 22:03   ` 'Antoine Poinsot' via Bitcoin Development Mailing List
2025-02-07 13:02   ` Antoine Riard
2025-02-10 16:28     ` 'Antoine Poinsot' via Bitcoin Development Mailing List
2025-02-14 17:40     ` Peter Todd
2025-02-15 21:13       ` Antoine Riard [this message]
2025-02-26 11:02         ` Peter Todd
2025-02-10 21:21 ` Chris Stewart
2025-02-11 21:20   ` Antoine Riard
2025-02-21  1:22 ` Matt Corallo
2025-02-23 22:35   ` 'Antoine Poinsot' via Bitcoin Development Mailing List
2025-02-26 19:11     ` Matt Corallo
2025-02-27 17:23       ` 'Antoine Poinsot' via Bitcoin Development Mailing List

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=97c36a7a-fe4d-4e24-8bbb-a55b7284fe71n@googlegroups.com \
    --to=antoine.riard@gmail.com \
    --cc=bitcoindev@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox