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 ) 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 ; 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 To: Bitcoin Development Mailing List 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: X-Google-Group-Id: 786775582512 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , 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

Hi everyone= ,

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 style=3D"box-sizing: border-box; margin-top: 0px; margin-bottom: 20px; co= lor: rgba(6, 8, 31, 0.88); font-family: D-DINExp, "DM Sans", -app= le-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetic= a Neue", Arial, "Noto Sans", sans-serif, "Apple Color E= moji", "Segoe UI Emoji", "Segoe UI Symbol", "= Noto Color Emoji"; 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?

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

Thanks in advance for sharing your expertise,
John

--
You received this message because you are subscribed to the Google Groups &= quot;Bitcoin Development Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to bitcoind= ev+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/bitcoind= ev/3c2b1e7a-ffcd-41da-a533-2d9224fc016fn%40googlegroups.com.
------=_Part_382961_252778595.1739892164423-- ------=_Part_382960_1728209973.1739892164423--