No description provided.
[WIP] sync mempool after new block #7955
pull pstratem wants to merge 1 commits into bitcoin:master from pstratem:2016-04-26-mempoolsync changing 1 files +8 −0-
pstratem commented at 5:23 AM on April 27, 2016: contributor
-
Attempt to sync mempool after new block with nodes that support feefilter command. e8aa85dd11
-
gmaxwell commented at 5:47 AM on April 27, 2016: contributor
Alas, I like this a lot but I think we can't use the existing mempool command for it: It's not filtered by set inventory known. (it's also computationally expensive even when fee filter is used).
What I'd like is a "TOPMEMPSYNC", which is functionally equal to mempool but considers only the top 2*BLK_SIZE txn in 'fee-rate' order (actual order can be implementation defined but should approximate mining preferences), and also filters its output through setinventoryknown. Then you can pick a peer and keep pulling from it every block and get one more block worth of transactions one block ahead of needing them.
-
gmaxwell commented at 8:33 AM on April 27, 2016: contributor
Go make a pass at actually implementing what I described? w/ the indexes in place it should take less than a half hour to give it a shot. (also, I'd like it for the block relay testing I'm doing... having to wait hours after it starts to get good stats is lame).
-
gmaxwell commented at 9:04 AM on April 27, 2016: contributor
To bad, so sad. -- it doesn't need to be perfect, ... otherwise the overhead of sending 2 blocks worth where it would end up sending the same txn over and over again makes it less attractive. With the filtering it would add basically no protocol overhead to run this with a single peer for the first 24 hours that you're up or so.
-
gmaxwell commented at 9:42 AM on April 27, 2016: contributor
Overhead equal to 1/4 a maximum size block, every block.. vs no overhead compared to regular relay (only sending IDs you haven't seen before)... it's not even comparable. The short ID stuff works much better in the context of blocks because you don't need them for fetching and can salt with the block hash.
- MarcoFalke added the label P2P on Apr 27, 2016
-
gmaxwell commented at 6:16 AM on April 28, 2016: contributor
Not to write the code and begin testing with it! It would be such a simple spec, there would be no reason to not go write a BIP for it right away too...
Though I also think it would get subsumed by a greater mempool sync BIP later. But that is going to take a while, this can easily be done now and would be useful now.
-
pstratem commented at 1:21 AM on May 17, 2016: contributor
Moving to issue
- pstratem closed this on May 17, 2016
- MarcoFalke locked this on Sep 8, 2021