Access to Mempool

Access to Mempool
2013-12-28 14:46 ` Mike Hearn
  
From: Jeremy Spilman @ 2013-12-28  7:29 UTC (permalink / raw)
  To: bitcoin-development

I was reading there are some commands to access a peer's mempool state.  
The purpose being to allow miners to recover faster after a reboot, I  
think?

Reading peer mempool definitely allows recovering faster after a reboot.  
So does persisting mempool in a database locally. But what can you learn  
about a node from its mempool? Basically, are there distinguishing  
features in the mempool, or could there be?

Are there transactions you can receive which go into your own mempool but  
which you don't forward? How about 'nLockTime' transactions?

Is this new feature off by default? Which clients support it?

By the way, are there recommended places to go to compare features  
implemented by different wallet software?

Sorry, so many questions...




 permalink raw reply	[|nested]
2013-12-28  7:29 [Bitcoin-development] Access to Mempool Jeremy Spilman

  
From: Mike Hearn @ 2013-12-28 14:46 UTC ( / )
  To: Jeremy Spilman;  bitcoin-development



>
> I was reading there are some commands to access a peer's mempool state.
> The purpose being to allow miners to recover faster after a reboot, I
> think?
>

The "mempool" command allows nodes to request the contents of a peers
memory pool, yes.

It is currently used by SPV clients to find transactions that were
broadcast before they were started up (but not yet confirmed).


> Reading peer mempool definitely allows recovering faster after a reboot.
> So does persisting mempool in a database locally.


0.9 has code to save the mempool to disk.


> But what can you learn about a node from its mempool? Basically, are there
> distinguishing
> features in the mempool, or could there be?
>

Er, you mean, distinguishing features beyond the nodes IP address?

The contents of the mempool may vary depending on when the node was started
and what it saw at what times. I guess it's distinguishing in a way, but
not in any important way. Nodes are not intended to be completely
indistinguishable, just indistinguishable enough that it doesn't matter
which you connect to.


> Are there transactions you can receive which go into your own mempool but
> which you don't forward?


I don't think so, unless there are quirks to do with sendrawtransaction
RPCs or strangely crafted wallet spends. Normally if a tx is in the mempool
it will be relayed.


> By the way, are there recommended places to go to compare features
> implemented by different wallet software?
>

I don't know of any such place, but I'm sure people have compiled tables
somewhere.