summaryrefslogtreecommitdiff
path: root/57/5a2097c3593c2b227da5331d09455193bc01d1
blob: c40563fdc45effbbb6d59b1933ce9eaf7d34fd05 (plain)
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
Delivery-date: Tue, 18 Feb 2025 19:42:25 -0800
Received: from mail-yb1-f185.google.com ([209.85.219.185])
	by mail.fairlystable.org with esmtps  (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
	(Exim 4.94.2)
	(envelope-from <bitcoindev+bncBCY63SPQWMORBFVG2W6QMGQEATDWQTI@googlegroups.com>)
	id 1tkaye-0001Cn-Cx
	for bitcoindev@gnusha.org; Tue, 18 Feb 2025 19:42:25 -0800
Received: by mail-yb1-f185.google.com with SMTP id 3f1490d57ef6-e575f472438sf8368480276.1
        for <bitcoindev@gnusha.org>; Tue, 18 Feb 2025 19:42:23 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=googlegroups.com; s=20230601; t=1739936537; x=1740541337; 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:message-id:to:from:date:sender:from:to:cc:subject:date
         :message-id:reply-to;
        bh=KxbDMn7Tar2gxYq6j2uy7Pjfvf2Yji+aJgEQVvyxo0A=;
        b=PN7x/WvTD5yHZJpvggav/bv41OaznALyztmx8BkksOajRA12mZuOilkCLhVWw2EX7n
         f89B3YkV5paAcWA/b2ua3hrAAD3s8tQis9L4S1v3/FDdKS4A0Y4gayzju6LGyd9tFOpH
         H2NfOCMlUEYteW6opY4P5FdH5QmO+YiD4OxiDWnwkF+lN1i50PiWUGNQBI+sqxEoA0dN
         Hp821SdGBIBnAYUNHemYvUQYLHJWh4VJk3+aFD4uRmpO8YUKqRsn/jfVGYTGHlgtdZXi
         gANAHXgEpkGZpNWdY3VqXA142KdUFG6jH1zhtWvJvzokKwxmu1imaB/EVBDd/iH/eK6p
         mrHw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20230601; t=1739936537; x=1740541337; 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:message-id:to:from:date:from:to:cc:subject:date:message-id
         :reply-to;
        bh=KxbDMn7Tar2gxYq6j2uy7Pjfvf2Yji+aJgEQVvyxo0A=;
        b=I2GvqC9NYfwtHUbmk6zfw55hZTLNkvuIVSFXEpu8RMjy26Qyhr8yXRzXpl3DtI5+iF
         nZiKWnuQENznQ2uCcnI8oilxJHS4y65rVRnYvmi/uAIuEemfdl6kQI4hGD0FrvnqFlkl
         /+zPT0xmjbrbmUVZU0ZpbdvK/A3PgFD1PoJDTEkfn6IfxvuWEnJ6dyU69wafEtWLLuJQ
         Pq6Ovs7dihLLA0rWMlVUcRZa4NlmTLlb9KpLFinW/QeMcT1G0sA67A1WkBUOXuGMU7ni
         t+j4GPZpjqgSmXtQF6KLb8OiQsdvpsvyDCA6qyf/iOQRubpLa4VJJ5QDNWnJT2rkovRA
         Dmrg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20230601; t=1739936537; x=1740541337;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:x-original-sender:mime-version
         :subject:message-id:to:from:date:x-beenthere:x-gm-message-state
         :sender:from:to:cc:subject:date:message-id:reply-to;
        bh=KxbDMn7Tar2gxYq6j2uy7Pjfvf2Yji+aJgEQVvyxo0A=;
        b=TFrQ3QRnsLcbyYcnZjYfHp3mW8MpGsNFUcDGOQwkYyNMABAIwH21bPbeARg9BwoVs0
         cx8c20GdCouu4MBmVZES1QzI1ocFLq2mq7Jdu8iR0DzspuhIJRll01KF2SdqmayGnWc2
         qOixkOBYKVx1x8vtOM1x/nQNO/LtsUFoe73cwA4dAYWAO6ACbMORoZOYPbwOq78INvdj
         cw7VHME2cD9uZwNod3ZgdB+R+WqZF/2hUvp6FGqxNH6stOFXoAZG3p4AKjc4MgEuhNX0
         iexJYSL6u9FW6jkF4JWCcMSg3qTLbQjup8H7ORerJCtSE7CwTxgVfTQqxrtRdzdjowo7
         8JTw==
Sender: bitcoindev@googlegroups.com
X-Forwarded-Encrypted: i=1; AJvYcCUcJK/qAx6qyNqdxv3dKj/6YPj6TTEJRijcY9Lz9v6IPWRLhu799wqFZlrz3BbkIN50BLMagSSrhGE0@gnusha.org
X-Gm-Message-State: AOJu0YwjOPI4CG3iIl6R8e4U5iQyUQ1lLoHQy3ABcL4gPGhciglCRs4D
	1onBZSO+F0X+wLwcr93MiSZv4LhmDTimzoDAE1Kz/W7Fuxlfmg77
X-Google-Smtp-Source: AGHT+IGpof1onEDJ6UNpRkwgUiBTW57uA1+3BZ+7CcK4EN67g8QuQVmFWXxjmqZm9sw3mpeIhZGz3A==
X-Received: by 2002:a05:6902:2982:b0:e5a:e3ef:2b06 with SMTP id 3f1490d57ef6-e5dc906f3e2mr9886268276.24.1739936537540;
        Tue, 18 Feb 2025 19:42:17 -0800 (PST)
X-BeenThere: bitcoindev@googlegroups.com; h=Adn5yVGbviYz5jhmZxKYqa9Mywg0aeczWbK7+/5bKCR+K8QNow==
Received: by 2002:a5b:20d:0:b0:e5b:3447:bb06 with SMTP id 3f1490d57ef6-e5da79f1a8bls74438276.1.-pod-prod-01-us;
 Tue, 18 Feb 2025 19:42:13 -0800 (PST)
X-Received: by 2002:a05:690c:810d:b0:6fb:a0b6:5f8a with SMTP id 00721157ae682-6fba0b664dcmr25296757b3.0.1739936533832;
        Tue, 18 Feb 2025 19:42:13 -0800 (PST)
Received: by 2002:a05:690c:4786:b0:6fb:3e32:1a09 with SMTP id 00721157ae682-6fb44927276ms7b3;
        Tue, 18 Feb 2025 07:22:46 -0800 (PST)
X-Received: by 2002:a05:690c:6bc3:b0:6fb:933d:3aa6 with SMTP id 00721157ae682-6fb933d4088mr24320897b3.12.1739892165055;
        Tue, 18 Feb 2025 07:22:45 -0800 (PST)
Date: Tue, 18 Feb 2025 07:22:44 -0800 (PST)
From: John <csdarkcounter@gmail.com>
To: Bitcoin Development Mailing List <bitcoindev@googlegroups.com>
Message-Id: <3c2b1e7a-ffcd-41da-a533-2d9224fc016fn@googlegroups.com>
Subject: [bitcoindev] Transaction Validation Optimization
MIME-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_382960_1728209973.1739892164423"
X-Original-Sender: csdarkcounter@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_382960_1728209973.1739892164423
Content-Type: multipart/alternative; 
	boundary="----=_Part_382961_252778595.1739892164423"

------=_Part_382961_252778595.1739892164423
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable



Hi everyone,

While analyzing the codebase, I observed what seems to be duplicate=20
validation steps for transactions that already exist in the mempool when=20
they appear in new blocks. Specifically, I'm curious if the secondary=20
validation performed during block acceptance could be safely optimized for=
=20
SegWit-verified transactions using their wtxid hashes.=EF=BC=88I'm still wo=
rking on=20
the source code, and I'm not sure if the source code was validated twice=EF=
=BC=89

I'm particularly seeking clarification on two aspects: First, does the=20
current implementation indeed perform full re-validation of mempool=20
transactions during block processing? Second, if such optimization is=20
theoretically possible, what subtle risks might emerge regarding=20
transaction propagation timing or node synchronization that a newcomer like=
=20
myself might overlook?

I'd be grateful for any insights about historical design decisions in this=
=20
area, critical code sections I should study more deeply, or potential=20
pitfalls in this line of thinking.=20

Thanks in advance for sharing your expertise,
John

--=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/=
3c2b1e7a-ffcd-41da-a533-2d9224fc016fn%40googlegroups.com.

------=_Part_382961_252778595.1739892164423
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<p style=3D"box-sizing: border-box; margin-top: 0px; margin-bottom: 20px; c=
olor: rgba(6, 8, 31, 0.88); font-family: D-DINExp, &quot;DM Sans&quot;, -ap=
ple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, &quot;Helveti=
ca Neue&quot;, Arial, &quot;Noto Sans&quot;, sans-serif, &quot;Apple Color =
Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot=
;Noto Color Emoji&quot;; background-color: rgb(255, 255, 255);">Hi everyone=
,</p><p style=3D"box-sizing: border-box; margin-top: 0px; margin-bottom: 20=
px; color: rgba(6, 8, 31, 0.88); font-family: D-DINExp, &quot;DM Sans&quot;=
, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, &quot;He=
lvetica Neue&quot;, Arial, &quot;Noto Sans&quot;, sans-serif, &quot;Apple C=
olor Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, =
&quot;Noto Color Emoji&quot;; background-color: rgb(255, 255, 255);">While =
analyzing the codebase, I observed what seems to be duplicate validation st=
eps for transactions that already exist in the mempool when they appear in =
new blocks. Specifically, I'm curious if the secondary validation performed=
 during block acceptance could be safely optimized for SegWit-verified tran=
sactions using their wtxid hashes.=EF=BC=88I'm still working on the source =
code, and I'm not sure if the source code was validated twice=EF=BC=89</p><=
p style=3D"box-sizing: border-box; margin-top: 0px; margin-bottom: 20px; co=
lor: rgba(6, 8, 31, 0.88); font-family: D-DINExp, &quot;DM Sans&quot;, -app=
le-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, &quot;Helvetic=
a Neue&quot;, Arial, &quot;Noto Sans&quot;, sans-serif, &quot;Apple Color E=
moji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;=
Noto Color Emoji&quot;; background-color: rgb(255, 255, 255);">I'm particul=
arly seeking clarification on two aspects: First, does the current implemen=
tation indeed perform full re-validation of mempool transactions during blo=
ck processing? Second, if such optimization is theoretically possible, what=
 subtle risks might emerge regarding transaction propagation timing or node=
 synchronization that a newcomer like myself might overlook?</p><p style=3D=
"box-sizing: border-box; margin-top: 0px; margin-bottom: 20px; color: rgba(=
6, 8, 31, 0.88); font-family: D-DINExp, &quot;DM Sans&quot;, -apple-system,=
 BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, &quot;Helvetica Neue&quo=
t;, Arial, &quot;Noto Sans&quot;, sans-serif, &quot;Apple Color Emoji&quot;=
, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Symbol&quot;, &quot;Noto Color=
 Emoji&quot;; background-color: rgb(255, 255, 255);">I'd be grateful for an=
y insights about historical design decisions in this area, critical code se=
ctions I should study more deeply, or potential pitfalls in this line of th=
inking.=C2=A0</p><p style=3D"box-sizing: border-box; margin-top: 0px; margi=
n-bottom: 20px; color: rgba(6, 8, 31, 0.88); font-family: D-DINExp, &quot;D=
M Sans&quot;, -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Robo=
to, &quot;Helvetica Neue&quot;, Arial, &quot;Noto Sans&quot;, sans-serif, &=
quot;Apple Color Emoji&quot;, &quot;Segoe UI Emoji&quot;, &quot;Segoe UI Sy=
mbol&quot;, &quot;Noto Color Emoji&quot;; background-color: rgb(255, 255, 2=
55);">Thanks in advance for sharing your expertise,<br style=3D"box-sizing:=
 border-box;" />John</p>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;Bitcoin Development Mailing List&quot; 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/3c2b1e7a-ffcd-41da-a533-2d9224fc016fn%40googlegroups.com?utm_med=
ium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/msgid/bitcoind=
ev/3c2b1e7a-ffcd-41da-a533-2d9224fc016fn%40googlegroups.com</a>.<br />

------=_Part_382961_252778595.1739892164423--

------=_Part_382960_1728209973.1739892164423--