public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
* [bitcoin-dev] Mempool "Expected Byte Stay" policy
@ 2015-07-15  0:24 Tom Harding
  2015-07-15 19:18 ` Thomas Zander
  0 siblings, 1 reply; 5+ messages in thread
From: Tom Harding @ 2015-07-15  0:24 UTC (permalink / raw)
  To: Bitcoin Dev

Spammers out there are being very disrepectful of my fullnode resources 
these days!  I'm making some changes. In case others are interested, 
here's a description:

There is now a maximum size for the memory pool.  Space is allocated 
with a pretty simple rule.  For each tx, I calculate MY COST of 
continuing to hold it in the mempool.  I measure the cost to me by 
"expected byte stay":

expectedByteStay = sizeBytes * expectedBlocksToConfirm(feeRate)


Rule 1: When there's not enough space for a new tx, I try to make space 
by evicting txes with expectedByteStay higher than tx.

I'm NOT worrying about
  - Fees
    EXCEPT via their effect on confirmation time

  - Coin age
    You already made money on your old coins.  Pay up.

  - CPFP
    Child's expectedBlocksToConfirm is max'ed with its
    parent, then parent expectedByteStay is ADDED to child's

  - Replacement
    You'll get another chance in 2 hours (see below).


Rule 2: A transaction and its dependents are evicted on its 2-hour 
anniversary, whether space is required or not


The latest expectedBlocksToConfirm(feeRate) table is applied to the 
entire mempool periodically.

What do you think?  I'll let you know how it works out.  I'm putting a 
lot of faith in the new fee estimation (particularly its size 
independence).  Another possibility is clog-ups by transactions that 
look like they'll confirm next block, but don't because of factors other 
than fees (other people's blacklists?)



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-07-16 16:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-15  0:24 [bitcoin-dev] Mempool "Expected Byte Stay" policy Tom Harding
2015-07-15 19:18 ` Thomas Zander
2015-07-15 23:15   ` Tom Harding
2015-07-16  9:38     ` Thomas Zander
2015-07-16 16:50       ` Tom Harding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox