Backport #6566, median-past locktime, rebased against 0.11 #6884

pull btcdrak wants to merge 2 commits into bitcoin:0.11 from btcdrak:mpl-0.11 changing 5 files +58 −12
  1. btcdrak commented at 8:20 PM on October 23, 2015: contributor

    Backport of #6566

  2. Add rules--presently disabled--for using GetMedianTimePast as endpoint for lock-time calculations
    The lock-time code currently uses CBlock::nTime as the cutoff point for time based locked transactions. This has the unfortunate outcome of creating a perverse incentive for miners to lie about the time of a block in order to collect more fees by including transactions that by wall clock determination have not yet matured. By using CBlockIndex::GetMedianTimePast from the prior block instead, the self-interested miner no longer gains from generating blocks with fraudulent timestamps. Users can compensate for this change by simply adding an hour (3600 seconds) to their time-based lock times.
    
    If enforced, this would be a soft-fork change. This commit only adds the functionality on an unexecuted code path, without changing the behaviour of Bitcoin Core.
    a1d3c6fb9d
  3. Enable policy enforcing GetMedianTimePast as the end point of lock-time constraints
    Transactions are not allowed in the memory pool or selected for inclusion in a block until their lock times exceed chainActive.Tip()->GetMedianTimePast(). However blocks including transactions which are only mature under the old rules are still accepted; this is *not* the soft-fork required to actually rely on the new constraint in production.
    f720c5fc9f
  4. btcdrak force-pushed on Oct 23, 2015
  5. laanwj added the label Mempool on Oct 26, 2015
  6. btcdrak commented at 8:27 PM on November 1, 2015: contributor

    refs #6928, #6934

  7. gmaxwell commented at 12:44 AM on November 4, 2015: contributor

    ACK.

  8. gmaxwell commented at 12:45 AM on November 4, 2015: contributor

    @sipa I think you've done enough review of this code now?

  9. laanwj merged this on Nov 5, 2015
  10. laanwj closed this on Nov 5, 2015

  11. laanwj referenced this in commit df616ae43e on Nov 5, 2015
  12. btcdrak deleted the branch on Nov 5, 2015
  13. harding referenced this in commit 929b2c73df on Nov 8, 2015
  14. fanquake locked this on Jan 9, 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-14 21:15 UTC

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