1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
|
Delivery-date: Mon, 17 Mar 2025 10:01:23 -0700
Received: from mail-qt1-f187.google.com ([209.85.160.187])
by mail.fairlystable.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
(Exim 4.94.2)
(envelope-from <bitcoindev+bncBDRYHVHZTUGRBWNK4G7AMGQEPYL44FA@googlegroups.com>)
id 1tuDq6-0001u4-Ds
for bitcoindev@gnusha.org; Mon, 17 Mar 2025 10:01:23 -0700
Received: by mail-qt1-f187.google.com with SMTP id d75a77b69052e-47685de2945sf84270881cf.0
for <bitcoindev@gnusha.org>; Mon, 17 Mar 2025 10:01:22 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1742230876; cv=pass;
d=google.com; s=arc-20240605;
b=SVgtBP8HgdhIn+8442RYrZ8YP3FFsA9G8eaCwApDwdZTHhXdxqDXZSIKBksXrpBr/u
CkwmoqUpbnpR3O/+tBYL8Aknob1l1R8OvK0VSDMdshG96fCYJ806ZCqZWoMpOjB6gvIn
GTo8ILBZQUCwpDOUrHz/saI7on3rZz4f8OtR4kq9X4jFAjBvczZSd6r72Ga3KnJIj/5J
VGd9uSNzvxSdPJ++aQtr36w/cgEO8+ssEElqqnbOxcm6bx3g2WEbCBiSx/JUc3kjrr5k
4BSRQqEQGLwzZarGru8Em/CbHZq2+SZOwuAO5pkWWb3uHbTYtu63Mmt6lm9eEo+ISE/X
fMCw==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605;
h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
:list-id:mailing-list:precedence:in-reply-to:content-disposition
:mime-version:references:message-id:subject:cc:to:from:date
:feedback-id:sender:dkim-signature;
bh=I6mnXpySvj4UndC+e5Gr1lArIY7ZZB6rZdkSRr19S5I=;
fh=fR6kPqHeLFMz+aB6/Lm2E9W7t4uKAzi6/1vLfi2NNTY=;
b=G6MXKzrzM1FCdTpH9pJGS6QS4IyWKUPVQsS9ExOKLLIUC8drrqo/2U6nLDkjrqCb8l
Y4eQA0HsF9ZPYkpQ3k5cV+sKWjPgvx5qyTlrn0tAFTFFp/eM+v85g03uYgx7MNQt/XsK
2Wk/Ox+Cx8MXEExnX5oPgsN4ZJ8bJ9vK+yHV5O9fXjE+IWZSTsb0+fqj45+BRnniz2Wo
/AYBX7YlCv1RdjVB93HzWAWdOg4w2SMX2e2bmb/xE5QjW/7Mgb/JZRdhYvNu4TW1tOVF
HYHKEZHmq8tA4250Ak5h6YZofqnQ+Fw5m9ltM54pBK7QcO7SwbamxYwL+RbqrcM5+Prs
hflQ==;
darn=gnusha.org
ARC-Authentication-Results: i=2; gmr-mx.google.com;
dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=af7JHlXE;
spf=pass (google.com: domain of pete@petertodd.org designates 103.168.172.148 as permitted sender) smtp.mailfrom=pete@petertodd.org
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=googlegroups.com; s=20230601; t=1742230876; x=1742835676; darn=gnusha.org;
h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
:list-id:mailing-list:precedence:x-original-authentication-results
:x-original-sender:in-reply-to:content-disposition:mime-version
:references:message-id:subject:cc:to:from:date:feedback-id:sender
:from:to:cc:subject:date:message-id:reply-to;
bh=I6mnXpySvj4UndC+e5Gr1lArIY7ZZB6rZdkSRr19S5I=;
b=NFKlLTlNX5Jb2t3OBsmt1RZ6msO8M1vAo45OIXlhg1tQEDdGGod0U59jWU+Ssm+HOE
q2BjdbuD/hdM8EcvhsFKcaQjjx/eGPUQL5zTsXOq+QUrS1hhzjN1gTPX83XRmIn94HrO
nBSAXlocZ9xJZ3iHHsuIpnFUxzPTjqdrc4spcjHqH2RmIrX+q4ARKLhsy4OMAsoK8wIi
t47GQ2vBH3jR3cCAKdl6IxVs13XAGH+RL1JlvEZrw/FCyUC/R9bly4Eb/c1ws+y2ldmV
Iuecpuf24hcuI67LU6hFf19zwn4CVzqMl1r3Xq413ynXppH2lrbtHOsTyIXxkNmZLdbg
c1rw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1742230876; x=1742835676;
h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
:list-id:mailing-list:precedence:x-original-authentication-results
:x-original-sender:in-reply-to:content-disposition:mime-version
:references:message-id:subject:cc:to:from:date:feedback-id
:x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date
:message-id:reply-to;
bh=I6mnXpySvj4UndC+e5Gr1lArIY7ZZB6rZdkSRr19S5I=;
b=Fkuj0QJSPY0IKAS6I4CuZ0ZDQnevCmzKR0bBx4FldFWJr6J1xJ1fxYQnAjbVeGGCOY
sTV5ryq9zVfGKnTyleOKtJpxqgisD74ki8k7jwiPVkD+RKTCwC9HBBbJY3YjFKzCbbsr
G0bEBhB9OIf4f/aeiRatdzpo2GihVZRIyovG+PV1mvZCZ6OKMRMbrTgmuCC0lECjlyOq
M/9mRsC4fANcjz49sGR+ePqNZ4m/zLBFQ5wfaI3ALkSBGtX9QBJD/rnR3Dvhy5uS1Pjm
XI8SK/sD5TqNxOIGubwRvjzNoYy9BVMIlkJ85fZO6v7Kh0Mo6fakVTjPbtCBLTVlpOIl
Op5w==
Sender: bitcoindev@googlegroups.com
X-Forwarded-Encrypted: i=2; AJvYcCWz3yWy1Lw56/hgb47YH+P0loxt7L9j7Y3I4FwRXn8pnJgElru/59Mazv33w6ifR4Vt+IAXXJRAH9uB@gnusha.org
X-Gm-Message-State: AOJu0Ywo+WX763G0I4TN/up/wT8oSE98McQhh8D+sVcETqDZks64m8Dt
ayqkGDTTmCqaWLYpkHvb8+hpr10QG2XcEC7Ab8CheSS3Op25XDWO
X-Google-Smtp-Source: AGHT+IFFbqy/mcGWKUIRST6wBWBO8SKBFj52+50FaUd4RzjQlDUAqSk2EEyRvMzJwHstoilvaIdoUQ==
X-Received: by 2002:ac8:5d89:0:b0:476:b3f0:a910 with SMTP id d75a77b69052e-476c8039477mr173054261cf.0.1742230876003;
Mon, 17 Mar 2025 10:01:16 -0700 (PDT)
X-BeenThere: bitcoindev@googlegroups.com; h=ARLLPAIz8fl5qarY+FrjQHfsh6RlMqb+/UIHPx1i/B8ST83ePw==
Received: by 2002:a05:622a:7706:b0:476:9c9c:1a5d with SMTP id
d75a77b69052e-476b7e02b17ls11495781cf.2.-pod-prod-05-us; Mon, 17 Mar 2025
10:01:12 -0700 (PDT)
X-Received: by 2002:a05:620a:318a:b0:7c5:4913:500a with SMTP id af79cd13be357-7c57c79be6dmr1482692485a.19.1742230872843;
Mon, 17 Mar 2025 10:01:12 -0700 (PDT)
Received: by 2002:a05:620a:530e:b0:7c5:495f:5415 with SMTP id af79cd13be357-7c57bd9074bms85a;
Mon, 17 Mar 2025 09:54:22 -0700 (PDT)
X-Received: by 2002:a05:620a:2992:b0:7c5:7a04:ef04 with SMTP id af79cd13be357-7c57c7d7ffdmr1962224285a.30.1742230461353;
Mon, 17 Mar 2025 09:54:21 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1742230461; cv=none;
d=google.com; s=arc-20240605;
b=NDmY/sP5B8gP1pTrZl5qnjFOr1lMQ0NLG2/Uf01AISdfvRcd/pUn4rVD1gQuo05xaI
wESVsvU+ScCK2x34z8ci24IysipA/GSVIHYOK58Nxm0jyLW3gEd2u+Kzc2PYOYKL0HPQ
jxzpxAicDsCwxKYqm7/19MhWTDpxtHuu+IUsKjgX26FKAdFeHeW9orRN1SlT0q2h+PQK
DKC7MjycMTT0mndx/G4I5ujdFcaksnPhHQRdmA5TLCUH08xLXF+3VqMgwjhvvQe5dkak
yRjiFLTuas98BCH46o4dTDFpvnFT2C3l1LbcLR2xmDQ+w3Q+QlUnWlkdGvvWShZWFdnf
OlWg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605;
h=in-reply-to:content-disposition:mime-version:references:message-id
:subject:cc:to:from:date:feedback-id:dkim-signature;
bh=QR4kyMyBLIiGhKK84ogRCmirpx0PHHiwjNZuuFXOBNw=;
fh=ZezIQ4DPobkbkSLZGiZg2aqbrl+dlXwRCknPDPYULyQ=;
b=KktpIfbMNhM0I0TyUXjXpuFBzSMipCmRFOY/6bO0jZEmU7rFQeUQq2NglSotoUZE/L
uukfzh7zACpeh4/VZGxL+lluF8BNANFzf+MaiwrO/2p3Wx/IhMQAzD9TofAYmzbobBuQ
Ac9qutgHzKawVqXa1RLNUBl8/SVa/Uhs0qkOqK02YBnpiESN9zz0KGgmZuRHw41zd2nF
R+FTWmYoRHRpTc5EQXvukXIRkuuCZN8jf9FTWL0Qn0OYCh6mZPNot7YQIBQhxLQ0UpUT
oybLzvVrx/0rGN3yGtgPlulBC04FthwuOzzB0d+gBvyG+lwrE4fD0TGogwCD5voQKKo+
cJsQ==;
dara=google.com
ARC-Authentication-Results: i=1; gmr-mx.google.com;
dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=af7JHlXE;
spf=pass (google.com: domain of pete@petertodd.org designates 103.168.172.148 as permitted sender) smtp.mailfrom=pete@petertodd.org
Received: from fout-a5-smtp.messagingengine.com (fout-a5-smtp.messagingengine.com. [103.168.172.148])
by gmr-mx.google.com with ESMTPS id af79cd13be357-7c573b58f63si40783385a.1.2025.03.17.09.54.21
for <bitcoindev@googlegroups.com>
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Mon, 17 Mar 2025 09:54:21 -0700 (PDT)
Received-SPF: pass (google.com: domain of pete@petertodd.org designates 103.168.172.148 as permitted sender) client-ip=103.168.172.148;
Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45])
by mailfout.phl.internal (Postfix) with ESMTP id 12DD813833C2;
Mon, 17 Mar 2025 12:54:21 -0400 (EDT)
Received: from phl-mailfrontend-01 ([10.202.2.162])
by phl-compute-05.internal (MEProxy); Mon, 17 Mar 2025 12:54:21 -0400
X-ME-Sender: <xms:vFPYZ8_ZYoWqicdba64opwu_MefCNfCC3Xu-Gwtc-DLfuzNDmKUz4w>
<xme:vFPYZ0vTkC8XVw21vegTwNFGqUcI7yBacQeaNRFAQ4gOg2KTATLCDRRUkGlR2Tm08
6ZAP1j5HH-S4GMsppY>
X-ME-Received: <xmr:vFPYZyCxAykEIgzvSv9kJEZIDpVpVMAXBLF_6KD4K2MeQt8UievBQcsCuxJm8oZtJ7Ox-llEyaCrP_7hCpRSXXnpUuQcHA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddugedttdeiucetufdoteggodetrf
dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv
pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih
gvnhhtshculddquddttddmnecujfgurhepfffhvfevuffkfhggtggujgesghdtreertddt
vdenucfhrhhomheprfgvthgvrhcuvfhougguuceophgvthgvsehpvghtvghrthhouggurd
horhhgqeenucggtffrrghtthgvrhhnpeelvdellefftddukeduffejgfefjeeuheeileef
tdfgteduteeggeevueethfejtdenucffohhmrghinhepphgvthgvrhhtohguugdrohhrgh
enucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvght
vgesphgvthgvrhhtohguugdrohhrghdpnhgspghrtghpthhtohepvddpmhhouggvpehsmh
htphhouhhtpdhrtghpthhtohepsghithgtohhinhguvghvsehgohhoghhlvghgrhhouhhp
shdrtghomhdprhgtphhtthhopeifvghitghhuhguvghnghesshhtuhdvtddvgedrjhhnuh
drvgguuhdrtghn
X-ME-Proxy: <xmx:vFPYZ8eWGBZeNaqgDspQ5D-zWiAz3ChDq-OHhMJmqPDEmo_OgGtLpw>
<xmx:vFPYZxPBpk3mfS0yfawl6XZPLxFv9kqLJOW8gLH0GrlyLmSfSncz-g>
<xmx:vFPYZ2nj4dnfmRq9vNzKd2Aos0BooJ7_BJKicaEDJAfQQXShI5Te3A>
<xmx:vFPYZzu759wyPRxCw0bQKa6q5d-RndBdOH68WwBkKrB7-uH-m5kVcQ>
<xmx:vVPYZ039VbJP4JoLIdgjZz5Vqjbr0UoAxPUakwmTYFzzbVE8xBAVXkEI>
Feedback-ID: i525146e8:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon,
17 Mar 2025 12:54:20 -0400 (EDT)
Received: by localhost (Postfix, from userid 1000)
id 9C8629FCCB; Mon, 17 Mar 2025 16:54:19 +0000 (UTC)
Date: Mon, 17 Mar 2025 16:54:19 +0000
From: Peter Todd <pete@petertodd.org>
To: weichu deng <weichudeng@stu2024.jnu.edu.cn>
Cc: Bitcoin Development Mailing List <bitcoindev@googlegroups.com>
Subject: =?UTF-8?Q?Re=3A_=5Bbitcoindev=5D_New_Proposal=EF=BC=9AString_Substring_Sea?=
=?UTF-8?Q?rch_in_Bitcoin_Script_=2D_OP=5FISSUBSTR?=
Message-ID: <Z9hTu2TjMlLr5-Eg@petertodd.org>
References: <f844a85e-8be8-4429-8687-bc19dd4b96ffn@googlegroups.com>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512;
protocol="application/pgp-signature"; boundary="DskUQjcAFGsQIBbh"
Content-Disposition: inline
In-Reply-To: <f844a85e-8be8-4429-8687-bc19dd4b96ffn@googlegroups.com>
X-Original-Sender: pete@petertodd.org
X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass
header.i=@messagingengine.com header.s=fm1 header.b=af7JHlXE; spf=pass
(google.com: domain of pete@petertodd.org designates 103.168.172.148 as
permitted sender) smtp.mailfrom=pete@petertodd.org
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.8 (/)
--DskUQjcAFGsQIBbh
Content-Type: text/plain; charset="UTF-8"
Content-Disposition: inline
On Mon, Mar 17, 2025 at 09:14:05AM -0700, weichu deng wrote:
>
>
> Dear fellow Bitcoin developers,
>
>
>
> I am pleased to present a new BIP proposal. This proposal introduces a new
> opcode for Bitcoin scripts: OP_ISSUBSTR.
>
>
> *Abstract*
>
> This BIP introduces two string opcodes, OP_ISSUBSTR and OP_ISSUBSTRVERIFY
> (similar to the relationship between OP_EQUAL and OP_EQUALVERIFY), to
> determine whether one string is a substring of another. As these opcodes do
> not alter any blockchain state, they are secure.
Bitcoin scripts are about validation. Not computation.
This means that substring search and concatenation are equivalent. For
every script that validates a substring search, you can instead
concatenate the substring with the rest of the string, and validate
equality instead.
Basically speaking:
foobar foo IsSubStr
is equivalent to:
foobar foo bar Cat Equal
A real-world example would be more complex. But I hope that illustrates
my point sufficiently.
--
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/Z9hTu2TjMlLr5-Eg%40petertodd.org.
--DskUQjcAFGsQIBbh
Content-Type: application/pgp-signature; name="signature.asc"
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEE0RcYcKRzsEwFZ3N5Lly11TVRLzcFAmfYU7kACgkQLly11TVR
LzdpuhAAgCyg/6AltuHu1D63xsn9ZVLUcwkYRSU2JFc/KJyB+9QOOFwESQ6tE9C5
1HUA5QRvL9+QVGtLzecI360LTpQCF+vB3cE5GQI/taEGgZyQGn8mHLlzOgqY/qDX
RRRc5mFFKV4/Y8d7/CHRYe5HiyDmMyvSgfgO5DN4LlZBqSs9BtVL01OmHdf3k2fO
tyuic8FIVk9Ay7AOOulgG1ovS6iq+9SbjXjB4Lahg+xUHVM/3T7wF+fkJJ33In2V
jgbnIbTU7TFUgfW6Nm58wHl/bFwIsq5TbMj/BrkCfpVwfr1K0krzEk7XksUZ5Yt6
4J1k85lWdvb0ooTPdXL60tplxKtPAxFteJjSGZS68srGAiVi0Z+TpedHIUrZx/0v
hQwYONkxTcHj+ig8jJEAyasyRU3NS7IAXxc60c7jsv3HOf7EfzL+cqgje/iaUfY4
kor7tuWU5IIJQ+X/h4qyXysuVsGYHchfxDbqs1JPdJYO1hFdl99FLebPcocXauYW
UNMtDJkIc0jT0MaGRbKYQrjy06jSjhe5YJ5//zTX0mEMyBYSMMQ0OIlAyq+4/k+n
S95hJ9czV8I5E2E0QR98gBALYIQKzbEEyPocnkXp2GrWjeKNkXuJmjGxrUV77SwN
ONl354nARDVuyGNhcGW0cSSznZX2RNpjJwUD/CElOW6tZ22Jimc=
=aPwk
-----END PGP SIGNATURE-----
--DskUQjcAFGsQIBbh--
|