public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@exmulti.com>
To: Bitcoin Development <bitcoin-development@lists.sourceforge.net>
Subject: [Bitcoin-development] BIP 35: add mempool message
Date: Thu, 16 Aug 2012 13:32:04 -0400	[thread overview]
Message-ID: <CA+8xBpcfxdpg-z4OQab3379amznM30Ae-Kurko0BKuySwfBy+Q@mail.gmail.com> (raw)

Consensus was we should do a BIP for all P2P changes, so here it is...
 feedback requested.

https://en.bitcoin.it/wiki/BIP_0035

Abstract
-------------------------------------------
Make a network node's transaction memory pool accessible via a new
"mempool" message.  Extend the existing "getdata" message behavior to permit
accessing the transaction memory pool.


Motivation
-------------------------------------------
Several use cases make it desireable to expore a network node's transaction
memory pool:
* SPV clients, wishing to obtain zero-confirmation transactions sent or
  received.
* Miners, downloading existing network transactions after a restart.
* Remote network diagnostics.


Specification
-------------------------------------------
1) Upon receipt of a "mempool" message, the node will respond
   with an "inv" message containing MSG_TX hashes of all the
   transactions in the node's transaction memory pool.

   An "inv" message is always returned, even if empty.

2) The typical node behavior in response to an "inv" is "getdata".

   However, the reference Satoshi implementation ignores requests
   for transaction hashes outside that which is recently relayed.

   To support "mempool", an implementation must extend its "getdata"
   message support to querying the memory pool.

3) Feature discovery is enabled by checking two "version" message attributes:

   a) Protocol version >= 60002
   b) NODE_NETWORK bit set in nServices


Backwards compatibility
-------------------------------------------
Older clients remain 100% compatible and interoperable after this change.


Implementation
-------------------------------------------
See https://github.com/bitcoin/bitcoin/pull/1641

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



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

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-16 17:32 Jeff Garzik [this message]
2012-08-16 17:40 ` [Bitcoin-development] BIP 35: add mempool message 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

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+8xBpcfxdpg-z4OQab3379amznM30Ae-Kurko0BKuySwfBy+Q@mail.gmail.com \
    --to=jgarzik@exmulti.com \
    --cc=bitcoin-development@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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