From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1UpfMh-0008Ug-Sv for bitcoin-development@lists.sourceforge.net; Thu, 20 Jun 2013 13:57:31 +0000 Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of bitpay.com designates 209.85.212.180 as permitted sender) client-ip=209.85.212.180; envelope-from=jgarzik@bitpay.com; helo=mail-wi0-f180.google.com; Received: from mail-wi0-f180.google.com ([209.85.212.180]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1UpfMg-0005Wx-21 for bitcoin-development@lists.sourceforge.net; Thu, 20 Jun 2013 13:57:31 +0000 Received: by mail-wi0-f180.google.com with SMTP id c10so1728837wiw.7 for ; Thu, 20 Jun 2013 06:57:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=92t3jWXgymMt9kvF44h67I/MP60d83yF9dRgjbvpOGQ=; b=Q+SacKTFLqQaMoeD/5C4a891RnpO89YLzmjOhvM27Wg54K3zqgYUwDhr7Ls3EcGcJr iihzD5hYAnbi3ghFHTefzIIXLbf3mxj21IEWWXufmaJPS6h/IIGMNLxmpAzJir8TVn2/ PrmNQa9nkOKC0xuyCoFDFNxgDgFJkSf7/gcGVXMki88GxO3xabGX3SnfWsNejA1V0W0D gcnFQv5aXUyj2Tzo6juZ5/83fril17zPCgMXCBo5YhDqoHKDnXyLJEenDas1hCIc9pGi 1LMgkFbd1O+F1txulR61Ty1pXKkNuuYYyIkTPi+JnXFqD4t81rC2lev9rluwc70lGJ3y B3nw== MIME-Version: 1.0 X-Received: by 10.180.102.37 with SMTP id fl5mr14473891wib.52.1371735311253; Thu, 20 Jun 2013 06:35:11 -0700 (PDT) Received: by 10.194.178.69 with HTTP; Thu, 20 Jun 2013 06:35:11 -0700 (PDT) In-Reply-To: References: <1371709237.57104.YahooMailNeo@web162701.mail.bf1.yahoo.com> Date: Thu, 20 Jun 2013 09:35:11 -0400 Message-ID: From: Jeff Garzik To: Addy Yeow Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQm3u0NKxoixYe/YiBUwTPnV/qGvPHUujZZ0TJMF1ejv+dxERVhTvbS1nWLlhoiY4iHR7gev X-Spam-Score: -1.6 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Headers-End: 1UpfMg-0005Wx-21 Cc: "bitcoin-development@lists.sourceforge.net" Subject: Re: [Bitcoin-development] Missing fRelayTxes in version message X-BeenThere: bitcoin-development@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jun 2013 13:57:32 -0000 On Thu, Jun 20, 2013 at 3:13 AM, Addy Yeow wrote: > I personally don't treat the relay field as optional, i.e. it is there as > 0x01 if it is set. Otherwise, it is simply a trailing zero byte. Hence, the > right way of reading the packet as with any network packet is to first > retrieve the header information, get the actual payload length, then parse > the payload accordingly. I can also choose to include 0x00 for my relay > field in my outgoing packet and reflect that accordingly in my length field > in the header. That works until another field is added in the same manner. Implementations are expected to follow the standard logic of if (more data) parse field X if (more data) parse field X+1 if (more data) parse field X+2 etc. Ugly or not, there is no point in changing now. Updating the version message to a radically different design, for simply cleanliness reasons, is not sufficient cause to migrate the entire bitcoin universe to a new and different version/feature negotiation setup. -- Jeff Garzik Senior Software Engineer and open source evangelist BitPay, Inc. https://bitpay.com/