Fee estimate patch #6618

pull morcos wants to merge 2 commits into bitcoin:master from morcos:fee_estimate_patch changing 3 files +55 −23
  1. morcos commented at 4:29 AM on September 2, 2015: member

    Fee estimation uses a threshold for the fraction of recent transactions of a given fee rate that must have been confirmed within the target number of blocks in order for that fee rate to be considered high enough such that a new transaction with that fee rate will be likely to be confirmed within the target.

    This patch changes the threshold to 95% (from 85%) for all targets other than 1 block.

    85% was previously used because higher thresholds were too hard to meet for a target of 1. However the recent stress test has shown that 85% is not conservative enough, so a target of 1 is special cased and a higher threshold is used. This is a simple change that is meant to be backported to 0.11. Further improvements for fee estimation will hopefully be possible for 0.12.

    EDIT: Please note that this will in general cause higher fee estimates to be returned.

  2. Modify success threshold to 95% unless target is 1. b10b2a1808
  3. laanwj added the label TX fees and policy on Sep 4, 2015
  4. morcos closed this on Sep 9, 2015

  5. morcos deleted the branch on Sep 9, 2015
  6. morcos restored the branch on Sep 9, 2015
  7. morcos reopened this on Sep 9, 2015

  8. morcos commented at 5:33 PM on September 9, 2015: member

    oops, was trying to bump travis

  9. MarcoFalke commented at 11:05 PM on September 10, 2015: member

    the recent stress test has shown that 85% is not conservative enough

    Are you aware of anyone reporting missed targets? (Haven't searched, excuse my laziness)

  10. Fix unit test for fee estimation.
    Unfortunately the unit test for fee estimation depends on the success threshold (and the decay) chosen.  Modify the unit test for the new default success thresholds.
    f84fd7d584
  11. morcos force-pushed on Sep 14, 2015
  12. morcos commented at 10:20 PM on September 15, 2015: member

    @MarcoFalke Yes. During the mid-July stress tests I had several reports of people placing transactions in accordance with fees returned by the estimation algo and waiting much longer than the expected number of blocks. This patch is not going to completely solve the problem that the current fee estimation logic can only provide a rough answer of what has happened historically, but its actually a very simple change and is worth it for the improvement. Better logic is waiting for a sorted mempool (and ideas about what to do with it).

  13. dcousens commented at 8:32 AM on September 16, 2015: contributor

    concept ACK if some data can be provided to demonstrate tip-over points

  14. morcos commented at 10:06 PM on September 17, 2015: member

    @dcousens sorry, what's a tip-over point?

  15. dcousens commented at 8:51 AM on September 19, 2015: contributor

    @morcos good question!

    I meant to ask if you had any data related to the quote:

    Yes. During the mid-July stress tests I had several reports of people placing transactions in accordance with fees returned by the estimation algo and waiting much longer than the expected number of blocks.

  16. morcos commented at 5:41 PM on September 21, 2015: member

    @dcousens This is the kind of data analysis I've looked at. Here's some data showing fee estimates in early July when one of the spam attacks started. The green line represents a much more recent history of transaction confirmation times (half-life of 36 blocks or so). You can see from the green line that once the attack starts around block 364130, you pretty immediately need a significantly higher fee to be confirmed within 5 blocks. However the old fee estimates don't really start increasing for about 50 blocks. The new fee estimates react much quicker. This is because if, historically, close to 100% of your transactions were being confirmed within the target, even if the number all of a sudden becomes 0%, it can take some time for the moving history to drop below 85% over the time horizon we use. Dropping below 95% happens much more quickly. I experimented with using a shorter time horizon but there was a lot of noise in the data. In the absence of this effect, I think its kind of an arbitrary choice as to what percentage of recent transactions should have been confirmed within the target number of blocks is the right answer to the fee estimate question. fee estimation changes

  17. dcousens commented at 1:37 AM on September 22, 2015: contributor

    I assume the bottom axis is the block height, and the left is the fee estimate? Why is the new 95% fee estimate higher before the peak (assumed peak at ~364140)? Or is there a subset of the data that I am not aware of?

    edit: thanks for going into detail on this

  18. MarcoFalke commented at 12:28 PM on September 22, 2015: member

    Concept ACK.

  19. morcos commented at 1:26 PM on September 22, 2015: member

    @dcousens Correct on the axes. It's not surprising that the estimate can be higher even in the "steady state". It's answering a slightly different question. It may be that at block 364050 about 86% of transactions of feerate around 14K are being confirmed within 2 blocks. Passes the old test and not the new.

  20. dcousens commented at 1:58 PM on September 22, 2015: contributor

    @morcos thanks for the explanation. However I feel the "steady state" being higher to start with doesn't agree with the statement you made earlier:

    I think its kind of an arbitrary choice as to what percentage of recent transactions should have been confirmed

    I don't necessarily have a strong opinion on this, as the intent seems to be to improve UX, but noticeably at the cost of higher fees by default.

  21. morcos commented at 3:18 PM on September 22, 2015: member

    @dcousens Fair enough, perhaps that is worth pointing out. I edited the initial PR comment. By arbitrary I just meant it's not clear what more closely maps to what people expect the answer for fee estimation to mean.

  22. morcos commented at 2:58 PM on October 15, 2015: member

    I'd like this to be merged, but I'm going to include it in a new and improved #6134

  23. morcos closed this on Oct 15, 2015

  24. 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-17 09:15 UTC

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