Return-Path: <dev@jonasschnelli.ch> Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 10FE3C002D for <bitcoin-dev@lists.linuxfoundation.org>; Thu, 3 Nov 2022 22:37:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id D890C41869 for <bitcoin-dev@lists.linuxfoundation.org>; Thu, 3 Nov 2022 22:36:59 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org D890C41869 X-Virus-Scanned: amavisd-new at osuosl.org X-Spam-Flag: NO X-Spam-Score: -1.9 X-Spam-Level: X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Z6hvzelbTjBb for <bitcoin-dev@lists.linuxfoundation.org>; Thu, 3 Nov 2022 22:36:58 +0000 (UTC) X-Greylist: delayed 00:09:54 by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org A645641844 Received: from sokrates7.ch-meta.net (sokrates7.ch-meta.net [80.74.145.97]) by smtp4.osuosl.org (Postfix) with ESMTPS id A645641844 for <bitcoin-dev@lists.linuxfoundation.org>; Thu, 3 Nov 2022 22:36:58 +0000 (UTC) Received: from smtpclient.apple (localhost [127.0.0.1]) by sokrates7.ch-meta.net (Postfix) with ESMTPSA id 312C380403BA; Thu, 3 Nov 2022 23:26:59 +0100 (CET) Authentication-Results: sokrates.metanet.ch; spf=pass (sender IP is 98.150.163.224) smtp.mailfrom=dev@jonasschnelli.ch smtp.helo=smtpclient.apple Received-SPF: pass (sokrates.metanet.ch: connection is authenticated) From: Jonas Schnelli <dev@jonasschnelli.ch> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Date: Thu, 3 Nov 2022 12:26:54 -1000 References: <56677685-619a-691f-d5bc-54b69fdb6ed2@bip324.com> <zxv58iXZ73hf9ge8S0QLTanW-uLzaWjNtMHuKONP9hrqS5RhwitxzfVaMH8hbi3yImgNrKme3lCuDcHYKkpxEQHyGZZHJ8xtReOcnAx3o4g=@wuille.net> <d4272a20-b2a7-4ad8-9b41-8ce2b7ce827d@murch.one> To: Murch <murch@murch.one>, Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org> In-Reply-To: <d4272a20-b2a7-4ad8-9b41-8ce2b7ce827d@murch.one> Message-Id: <87FFCF31-946A-44AE-8AAE-6FA3E6465C89@jonasschnelli.ch> X-Mailer: Apple Mail (2.3696.120.41.1.1) Subject: Re: [bitcoin-dev] Refreshed BIP324 X-BeenThere: bitcoin-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Bitcoin Protocol Discussion <bitcoin-dev.lists.linuxfoundation.org> List-Unsubscribe: <https://lists.linuxfoundation.org/mailman/options/bitcoin-dev>, <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=unsubscribe> List-Archive: <http://lists.linuxfoundation.org/pipermail/bitcoin-dev/> List-Post: <mailto:bitcoin-dev@lists.linuxfoundation.org> List-Help: <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=help> List-Subscribe: <https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev>, <mailto:bitcoin-dev-request@lists.linuxfoundation.org?subject=subscribe> X-List-Received-Date: Thu, 03 Nov 2022 22:37:00 -0000 > =46rom what I understand we'll have about 35 message types on the = network with the addition of BIP324. 256 possible IDs sounds like plenty = room to grow, but perhaps we can be a bit more conservative: >=20 > We could use the first bit to signal a 2-byte message ID. That allows = us to express 128 IDs with 1 byte, but if we need more, we get a total = of 2^15 IDs across 2 bytes. Could make sense. There would be an alternative to preserve more 1 byte IDs on the cost of = a (much) smaller 2 byte ID space: Reserve the short ID 0xFF as an indication for a 2 bytes short ID = (additional 256 short IDs with 2 bytes). That could be done later outside BIP324. The 0xFF approach would lead to approx. 207 unused 1 byte short IDs = (while Murchs approach would give us approx. 79 unused 1 byte short = IDs). The signal bit two byte approach would however lead to ~32k more two = byte message IDs. The main (and only?) benefit of short IDs is bandwidth. Short ID 1-12 are reserved for string based IDs and thus, new and rarely = sent message types must not always use a short ID. Maybe the BIP should state that only frequent sent messages should = reserve a short ID, though, the BIP itself assigns short IDs to all(?) = message types (including low frequent messages like SENDHEADERS). Maybe exclude message types that expected to be only sent once from = assigning a short ID? /j=