Delivery-date: Sat, 29 Jun 2024 13:39:32 -0700 Received: from mail-yb1-f183.google.com ([209.85.219.183]) by mail.fairlystable.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sNer6-0006qk-Am for bitcoindev@gnusha.org; Sat, 29 Jun 2024 13:39:32 -0700 Received: by mail-yb1-f183.google.com with SMTP id 3f1490d57ef6-e034be92526sf363504276.0 for ; Sat, 29 Jun 2024 13:39:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1719693566; x=1720298366; 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:references:in-reply-to:message-id:to:from:date:sender:from :to:cc:subject:date:message-id:reply-to; bh=AbLrhw6POGUY+8WY+lD/O1bnMaxNZ6K0elynwNEZ+W0=; b=JKsDxSqQoZgzYZ2HXMDMQsdzi+sbuyu3v5VA4Whla6GTnTmvg8h8bMv/w4+cW8P4Nf /Xee2tPwfYARg2f7CU0h4VJoFlSRHbY+U7IKgSHts7eWYU6ZKsU7U+NN6R2gnyV6MBzd /4qANnHXJmd+L/EWkZj7/WzPlnt5847Pki8VvZNR8lYve9v0yh/t3EbrsbCS+XpOSg8d 5UHGPOGjK5f0NdRMUnIIsGhgW5tjt80HLbbzcfHG/ASfH/gIkwtTTQxyLpU1fRhHXva9 lUsUf9NYhyw4ziEiLgtvoIYoqAAJvvB0QWbv0Djl8ByhoLIm/u97Z2PyB0O6ZrhRPhqV YJ+g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups-com.20230601.gappssmtp.com; s=20230601; t=1719693566; x=1720298366; 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:references:in-reply-to:message-id:to:from:date:from:to:cc :subject:date:message-id:reply-to; bh=AbLrhw6POGUY+8WY+lD/O1bnMaxNZ6K0elynwNEZ+W0=; b=UgGBm2CknD/xoxebC5YzRP844/7W1Nl7TTYjp3c7aF7K/35Ij5Au0dX1X3Txl4eRwO vWjGWWWAzmi/AF1BJ9K22H95G46M7RLlRAhTSLcW/F3zS/0h571lZy++BwjKlZbWf3a+ rCfxZCZ4+FkENO0vb3dZKoWsNhVEuJ7cvkvOO1qSSzDGaBOpPFBVBw7ahfqtnxnbLRT+ /1SDFsNjw9VvnHbsiCkPpzMlAzEFmexW97ZUgVW+8diDKKmD5j17HYotTlGP7w3nl23z rlymq6r9TFetrcXWYoOcURAxdgLZn3kiK2w2mx+DrzfgUWjMJSFJDS9GFL2or0qMGOlV 7hsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719693566; x=1720298366; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-sender:mime-version :subject:references:in-reply-to:message-id:to:from:date:x-beenthere :x-gm-message-state:sender:from:to:cc:subject:date:message-id :reply-to; bh=AbLrhw6POGUY+8WY+lD/O1bnMaxNZ6K0elynwNEZ+W0=; b=E8WJDogbtvirkTX19usGRGRQxuVGlyEWCwRnxGgLeSR2ZgtSrCGKl6MWU8G0HYE9ok SADtOCn/S2twF4/26w/VYfB5kFZDSiVwKHlO80wd9q8i1WuLRi+JhDCBTE3lPcNfqyKB cBTZtihBA1R5mbpHabdXm4b+YmYXQcRPngVoydkWbzRb1F35BvFN/PdrumHzOzch/Q6l kz/KKbg2G+AVVW6wbKoBt6VlTXjntjE9AkADbBPTybUxjGc1C0afSWHCGCFPYD5iSKB9 fR2W2cSutYOTAtbgWfJzGL6ay6g0KFhhvWvpUu4nCUUN3vH1ecCPagjWc1PfSKeRdBas l32w== Sender: bitcoindev@googlegroups.com X-Forwarded-Encrypted: i=1; AJvYcCUt+CCspYQSaTzknaodxlezukSDOB3UR2f2dnigLSKbHMWBduJgtT3r/Jx/nQsrVojsbFo/s3LaGe7xP5aaMCwngSwuMik= X-Gm-Message-State: AOJu0YwvdoqL8TNHy99UroPgBG5kF0EkLvsdzlMaowkxYgCfW6QrtbqE 5/l5qmSwNViXf6xyFtlw6S/qJ3FGuatofSo/86q8It56+UKC/zm9 X-Google-Smtp-Source: AGHT+IEZ3LU7wb1ZXwpEJPjbYTTdT9LcZnr8+cZyifBR7daLeIW/O/h29ES2RSKKXj/Un/SRvu49Tg== X-Received: by 2002:a25:df86:0:b0:e02:bde3:3166 with SMTP id 3f1490d57ef6-e036eb383c7mr953067276.1.1719693565925; Sat, 29 Jun 2024 13:39:25 -0700 (PDT) X-BeenThere: bitcoindev@googlegroups.com Received: by 2002:a05:6902:1547:b0:e03:3d23:3957 with SMTP id 3f1490d57ef6-e0356278842ls2687658276.2.-pod-prod-05-us; Sat, 29 Jun 2024 13:39:24 -0700 (PDT) X-Received: by 2002:a05:6902:1108:b0:dff:4c99:915 with SMTP id 3f1490d57ef6-e036ec42dd1mr110860276.10.1719693564322; Sat, 29 Jun 2024 13:39:24 -0700 (PDT) Received: by 2002:a05:690c:4501:b0:63b:c3b0:e1c with SMTP id 00721157ae682-64d3374ecffms7b3; Sat, 29 Jun 2024 13:29:09 -0700 (PDT) X-Received: by 2002:a05:6902:124b:b0:e03:3c8c:e82c with SMTP id 3f1490d57ef6-e036ec2fc74mr143331276.9.1719692948602; Sat, 29 Jun 2024 13:29:08 -0700 (PDT) Date: Sat, 29 Jun 2024 13:29:08 -0700 (PDT) From: Eric Voskuil To: Bitcoin Development Mailing List Message-Id: <607a2233-ac12-4a80-ae4a-08341b3549b3n@googlegroups.com> In-Reply-To: References: <72e83c31-408f-4c13-bff5-bf0789302e23n@googlegroups.com> <5b0331a5-4e94-465d-a51d-02166e2c1937n@googlegroups.com> <9a4c4151-36ed-425a-a535-aa2837919a04n@googlegroups.com> <3f0064f9-54bd-46a7-9d9a-c54b99aca7b2n@googlegroups.com> <26b7321b-cc64-44b9-bc95-a4d8feb701e5n@googlegroups.com> Subject: Re: [bitcoindev] Re: Great Consensus Cleanup Revival MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_652037_1712594775.1719692948373" X-Original-Sender: eric@voskuil.org 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.7 (/) ------=_Part_652037_1712594775.1719692948373 Content-Type: multipart/alternative; boundary="----=_Part_652038_1807174148.1719692948373" ------=_Part_652038_1807174148.1719692948373 Content-Type: text/plain; charset="UTF-8" > I meant C pointer and by "more robust" any kind of memory / CPU DoS arising due to memory management (e.g. hypothetical rule checking the 64 bytes size for all block transactions). Ok, thanks for clarifying. I'm still not making the connection to "checking a non-null [C] pointer" but that's prob on me. > In my understanding, the validation logic equivalent of core's CheckBlock is libbitcoin's block::check(): https://github.com/libbitcoin/libbitcoin-system/blob/master/src/chain/block.cpp#L751 Yes, a rough correlation but not necessarily equivalence. Note that block.check has context free and contextual overrides. The 'bypass' parameter indicates a block under checkpoint or milestone ("assume valid"). In this case we must check Merkle root, witness commitment, and both types of malleation - as the purpose is to establish identity. Absent 'bypass' the typical checks are performed, and therefore a malleation check is not required here. The "type64" malleation is subsumed by the is_first_non_coinbase check and the "type32" malleation is subsumed by the is_internal_double_spend check. I have some other thoughts on this that I'll post separately. Best, Eric -- 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 on the web visit https://groups.google.com/d/msgid/bitcoindev/607a2233-ac12-4a80-ae4a-08341b3549b3n%40googlegroups.com. ------=_Part_652038_1807174148.1719692948373 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > I meant C pointer and by "more robust" any kind of memory / CPU DoS ar= ising due to memory management (e.g. hypothetical rule checking the 64 byte= s size for all block transactions).

Ok, thanks for clarifying. I= 'm still not making the connection to "checking a non-null [C] pointer" but= that's prob on me.

> In my understanding, the validation log= ic equivalent of core's CheckBlock is libbitcoin's block::check():
ht= tps://github.com/libbitcoin/libbitcoin-system/blob/master/src/chain/block.c= pp#L751

Yes, a rough correlation but not necessarily equivalence= . Note that block.check has context free and contextual overrides.
The 'bypass' parameter indicates a block under checkpoint or milestone (= "assume valid"). In this case we must check Merkle root, witness commitment= , and both types of malleation - as the purpose is to establish identity. A= bsent 'bypass' the typical checks are performed, and therefore a malleation= check is not required here. The "type64" malleation is subsumed by the is_= first_non_coinbase check and the "type32" malleation is subsumed by the is_= internal_double_spend check.

I have some other thoughts on this = that I'll post separately.

Best,
Eric

--
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 on the web visit https://groups.google.com/d/msg= id/bitcoindev/607a2233-ac12-4a80-ae4a-08341b3549b3n%40googlegroups.com.=
------=_Part_652038_1807174148.1719692948373-- ------=_Part_652037_1712594775.1719692948373--