public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@exmulti•com>
To: Pieter Wuille <pieter.wuille@gmail•com>
Cc: Bitcoin Development <bitcoin-development@lists•sourceforge.net>
Subject: Re: [Bitcoin-development] BIP 35: add mempool message
Date: Fri, 17 Aug 2012 12:51:33 -0400	[thread overview]
Message-ID: <CA+8xBpcLk04m8pX3bA14H4MBamT1-1Exd6EyxOZqER8u9C0WAA@mail.gmail.com> (raw)
In-Reply-To: <20120817134000.GA30465@vps7135.xlshosting.net>

On Fri, Aug 17, 2012 at 9:40 AM, Pieter Wuille <pieter.wuille@gmail•com> wrote:
> On Thu, Aug 16, 2012 at 05:05:58PM -0400, Jeff Garzik wrote:
>> On MSG_MEMTX:  The current version has a much higher Just Works value.
>>
>> On empty "inv":  It is generally better to do something
>> unconditionally, than have a response generated only under certain
>> conditions.
>>
>> And Alan is correct to note that unknown messages are ignored
>> (intentionally, for expansion).  However, unconditionally returning a
>> response has little to do with feature probing/discovery.  It is
>> simply a clear, deterministic indication that processing is complete,
>> for each invocation.
>
> I disagree. Returning an empty "inv" is a very strange way of replying
> "empty mempool". Bitcoin P2P is not a request-response protocol, and
> "inv" messages are sent where there are inventory items to send. The
> reaction to a request (for example "getblocks") can be nothing, or one
> or more "inv" messages if necessary. Special casing an empty "inv" to
> mean empty mempool is trying to hack a request-response system on top
> of the asynchronous system.

OK, just updated 'mempool' branch to not return "inv" if mempool is empty.


> If there is need for confirming the transmission of the mempool is
> complete, the proposal to use a MSG_MEMTX sounds good to me. No client
> will ever receive such an inv without requesting the mempool, and
> implementing handling MSG_MEMTX is trivial.

MSG_MEMTX is not a good idea for this use case.  Just sent a ping(nonce).

Bitcoin P2P processes requests in-order, and responds accordingly.
The remote end may insert asynchronous messages into the response
stream, certainly, but responses to queries are processed and returned
in-order.  A 'getdata' response is fully sent before a 'ping' response
is sent, etc.

-- 
Jeff Garzik
exMULTI, Inc.
jgarzik@exmulti•com



      reply	other threads:[~2012-08-17 16:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-16 17:32 Jeff Garzik
2012-08-16 17:40 ` Amir Taaki
2012-08-16 17:43   ` Jeff Garzik
2012-08-16 17:56 ` Pieter Wuille
2012-08-16 18:04   ` Jeff Garzik
2012-08-16 19:36     ` Alan Reiner
2012-08-16 18:20   ` Amir Taaki
2012-08-16 19:21   ` Stefan Thomas
2012-08-16 20:57     ` Amir Taaki
2012-08-16 21:05       ` Jeff Garzik
2012-08-17 12:27         ` Mike Hearn
2012-08-17 13:40         ` Pieter Wuille
2012-08-17 16:51           ` Jeff Garzik [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+8xBpcLk04m8pX3bA14H4MBamT1-1Exd6EyxOZqER8u9C0WAA@mail.gmail.com \
    --to=jgarzik@exmulti$(echo .)com \
    --cc=bitcoin-development@lists$(echo .)sourceforge.net \
    --cc=pieter.wuille@gmail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox