public inbox for bitcoindev@googlegroups.com
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@bitpay.com>
To: Mike Hearn <mike@plan99.net>
Cc: Bitcoin Dev <bitcoin-development@lists.sourceforge.net>
Subject: Re: [Bitcoin-development] deterministic transaction expiration
Date: Tue, 5 Aug 2014 15:08:14 -0400	[thread overview]
Message-ID: <CAJHLa0PTCRZL5PzrQYehRKG5G_D1i9zRdoqy4EN2ooMf7rh_8A@mail.gmail.com> (raw)
In-Reply-To: <CANEZrP0AXvF5EYvsdpYxGUi5yV9eD_8qUge80XCoaeyekfd67Q@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1091 bytes --]

I feel like a lot of this will be driven by implementation, and costs of
changing the implementation.  Additional look-backs are of course doable,
but they incur some disk I/O costs.  The fields available in memory for
each mempool TX are

    uint256 tx_hash; // hash of next field
    CTransaction tx;
    int64_t nFee; // Cached to avoid expensive parent-transaction lookups
    size_t nTxSize; // ... and avoid recomputing tx size
    int64_t nTime; // Local time when entering the mempool
    double dPriority; // Priority when entering the mempool
    unsigned int nHeight; // Chain height when entering the mempool

As a first pass, we may prune the mempool without additional db lookups
quite easily based on time criteria.  Or, additional in-memory indexes may
be constructed to maintain hashes ordered by priority/fees.

Those techniques seem likely to be attempted before resorting to looking
back two or three TXs deep at coin age -- which I admit is an interesting
metric.

-- 
Jeff Garzik
Bitcoin core developer and open source evangelist
BitPay, Inc.      https://bitpay.com/

[-- Attachment #2: Type: text/html, Size: 1378 bytes --]

  reply	other threads:[~2014-08-05 19:08 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-01  0:58 [Bitcoin-development] deterministic transaction expiration Kaz Wesley
2014-08-01  1:06 ` Peter Todd
2014-08-01  1:37   ` Kaz Wesley
2014-08-01  1:38 ` Matt Whitlock
2014-08-01  2:28   ` Gregory Maxwell
2014-08-01  3:26     ` Matt Whitlock
2014-08-01  3:31       ` Gregory Maxwell
2014-08-05 18:01         ` Alex Mizrahi
2014-08-02  0:36 ` Tom Harding
2014-08-05 17:02   ` Flavien Charlon
2014-08-05 17:48 ` Jeff Garzik
2014-08-05 18:54   ` Mike Hearn
2014-08-05 19:08     ` Jeff Garzik [this message]
2014-08-05 19:10   ` Kaz Wesley
2014-08-05 19:36     ` Jeff Garzik
2014-08-06  4:01     ` Tom Harding
2014-08-06 12:55       ` Jeff Garzik
2014-08-06 13:54         ` Mike Hearn
2014-08-06 14:44           ` Tom Harding
2014-08-06 15:08             ` Jeff Garzik
2014-08-06 15:17               ` Christian Decker
2014-08-06 15:42                 ` Peter Todd
2014-08-06 16:15                   ` Jeff Garzik
2014-08-06 17:02                     ` Tom Harding
2014-08-06 17:21                       ` Mark Friedenbach
2014-08-06 17:34                         ` Peter Todd
2014-08-06 17:24                       ` Jeff Garzik
2014-08-06 16:31                   ` Mark Friedenbach
2014-08-06 17:20                     ` Peter Todd
2014-08-06 17:30                       ` Mark Friedenbach
2014-08-06 17:38                         ` Peter Todd
2014-08-08 17:38                 ` Tom Harding
2014-08-08 18:13                   ` Jeff Garzik
2014-08-08 18:42                     ` Kaz Wesley

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=CAJHLa0PTCRZL5PzrQYehRKG5G_D1i9zRdoqy4EN2ooMf7rh_8A@mail.gmail.com \
    --to=jgarzik@bitpay.com \
    --cc=bitcoin-development@lists.sourceforge.net \
    --cc=mike@plan99.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