HomePhabricator

Add rules--presently disabled--for using GetMedianTimePast as endpoint for lock…
9d55050773d5Unpublished

Unpublished Commit · Learn More

Repository Importing: This repository is still importing.

Description

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.

Details

Provenance
Mark Friedenbach <mark@friedenbach.org>Authored on Jun 3 2015, 19:55
schancelPushed on Jan 5 2018, 21:58
schancelPushed on Jan 5 2018, 21:39
schancelPushed on Jan 5 2018, 21:17
Parents
rSTAGING46f74379b86b: Merge pull request #6873
Branches
Unknown
Tags
Unknown
Reverted By
rSTAGING40cd32e83509: Revert "Add rules--presently disabled--for using GetMedianTimePast as endpoint…