Send 'mempool' P2P command at the start of each P2P session #1833

pull jgarzik wants to merge 1 commits into bitcoin:master from jgarzik:mempool-query changing 2 files +18 −1
  1. jgarzik commented at 11:44 PM on September 18, 2012: contributor

    to query remote node mempool contents.

    NOTE: It is expected behavior that this will pump up the orphan pool initially, before dependencies resolve themselves.

  2. sipa commented at 11:47 PM on September 18, 2012: member

    Good idea. I'd disable such behavior during IBD.

  3. jgarzik commented at 2:04 AM on September 19, 2012: contributor

    Updated to avoid sending "mempool" while in IBD.

  4. gmaxwell commented at 5:09 AM on September 19, 2012: contributor

    Each seems a little excessive. Perhaps only do it on outbound ones and/or only if the node's uptime is low? It's potentially a lot of extra data when you've got a hundred peers, and most of the data is redundant.

  5. BitcoinPullTester commented at 9:12 AM on September 19, 2012: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/1fa4c04b1db831283157c54ef4e100f3420a219a for binaries and test log.

  6. darkhosis commented at 11:07 AM on September 19, 2012: none

    I had approx. 3200 transactions in pool when I updated my bitcoind to the new git version. I decided to include this in the build... got back up to ~3100 transactions in pool immediately. The only ones I lost were the ones with the large orphans (I'll probably modify that and make it 20k or 30k). A tad more load at the very start, but it only takes a few minutes to get up to 600 or 700 peers.. after that, I haven't noticed any difference (except more errors about how Tx is already used at x)

  7. jgarzik commented at 6:51 PM on September 19, 2012: contributor

    Restricting "mempool" queries to outbound connections seems like a reasonable compromise ... change updated.

    I imagine hardcore miners would want to remove this condition, to guarantee they do not miss anything.

    But it seems like outbound-only should get 99%, while saving bandwidth.

  8. BitcoinPullTester commented at 1:47 PM on September 20, 2012: none

    Automatic sanity-testing: FAILED MERGE, see http://jenkins.bluematt.me/pull-tester/2533a62f6dc69d26b1e17b1240d17f3a26382106 for test log.

    This pull does not merge cleanly onto current master

  9. BitcoinPullTester commented at 5:09 AM on September 21, 2012: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/e3183085f33877e06cc04ff310ab6db3c59c8464 for binaries and test log.

  10. sipa commented at 12:38 PM on September 21, 2012: member

    ACK

  11. mikehearn commented at 12:07 PM on September 24, 2012: contributor

    Cool. Restricting to outbound connections also means you won't send this command to SPV clients that don't track the entire mempool. It may be worth a comment that makes this explicit rather than a side-effect of checking for outbound-ness.

  12. gmaxwell commented at 12:13 PM on September 24, 2012: contributor

    Hm. How do we prevent this from violating the (probably soon to be implemented) expectation that transactions will live in the mempools of the network for a particular amount of time? Esp once peer rotation is implemented?

  13. Send 'mempool' P2P command at the start of each P2P session
    to query remote node mempool contents.
    22f9b06903
  14. jgarzik commented at 5:56 PM on September 24, 2012: contributor

    Two more added conditions:

    1. Should have checked NODE_NETWORK (pfrom->fClient), which the BIP states, and @mikehearn unintentionally hinted at.
    2. Only do this for the first two hours after node startup.
  15. BitcoinPullTester commented at 4:42 AM on September 25, 2012: none

    Automatic sanity-testing: FAILED BUILD/TEST, see http://jenkins.bluematt.me/pull-tester/22f9b069035c9ba0416a62714db167eea5ba762f for binaries and test log.

    This could happen for one of several reasons:

    1. It chanages paths in makefile.linux-mingw or otherwise changes build scripts in a way that made them incompatible with the automated testing scripts
    2. It does not build on either Linux i386 or Win32 (via MinGW cross compile)
    3. The test suite fails on either Linux i386 or Win32
    4. The block test-cases failed (lookup the first bNN identifier which failed in https://github.com/TheBlueMatt/test-scripts/blob/master/FullBlockTestGenerator.java)
  16. darkhosis commented at 3:54 AM on September 28, 2012: none

    I'm guessing this might be related, Not sure what else it could be, as outside of testing this I haven't modified the transaction code at all (I was planning on it, but...).. I've changed the misbehaving threshold to 102 to avoid situations like this, which is why I didn't disconnect those two peers.... but, seems like nobody else has, as I was left with about 50 peers (though it gradually started increasing, up to 150'ish, but I decided to restart bitcoind anyway). After that it only took about 10 minutes to get back up to ~800 (after restarting bitcoind), although about 80% of my addnodes were instantly disconnecting me.

    http://5.9.24.81/lollercopter.txt

    As the only reason I initially started running bitcoind on the server was for p2pool and I no longer use p2pool, I guess now is as good a time as any to shut it down. I'd rather use that server for video encoding & torrenting anyway (gbit connection and all). Maybe mess around on my kimsufi pos.

    But, yeah... (oh, and I just included that first second... there were about 50 disconnects a second for another 10 seconds or so)

  17. sipa commented at 2:08 PM on October 7, 2012: member

    @jgarzik PullTester gives a compile error; can you look into that?

  18. jgarzik referenced this in commit 56caa38a67 on Oct 8, 2012
  19. jgarzik merged this on Oct 8, 2012
  20. jgarzik closed this on Oct 8, 2012

  21. owlhooter referenced this in commit d261575b4f on Oct 10, 2018
  22. KolbyML referenced this in commit 9c06e5d7ce on Dec 5, 2020
  23. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-20 00:16 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me