Revert MedianTimePast / mempool-only BIP113#6928
Merged
laanwj merged 2 commits intobitcoin:masterfrom Nov 2, 2015
gmaxwell:undo_113
Merged
Revert MedianTimePast / mempool-only BIP113#6928laanwj merged 2 commits intobitcoin:masterfrom gmaxwell:undo_113
laanwj merged 2 commits intobitcoin:masterfrom
gmaxwell:undo_113
Conversation
… lock-time constraints" This reverts commit dea8d21.
… endpoint for lock-time calculations" This reverts commit 9d55050. As noted by Luke-Jr, under some conditions this will accept transactions which are invalid by the network rules. This happens when the current block time is head of the median time past and a transaction's locktime is in the middle. This could be addressed by changing the rule to MAX(this_block_time, MTP+offset) but this solution and the particular offset used deserve some consideration.
Member
|
ACK |
Member
|
Ugh. |
Member
|
utACK |
Contributor
|
So since the logic to revert in the first place was incorrect, any chance we can revert the reversion? |
Member
|
We should, but I'm still recovering from panic here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As observed by Luke-Jr, BIP113's behavior would permit some transactions which are currently invalid. E.g. when the current block time is higher than the MedianTimePast and the transaction's locktime is between the block time and the MTP.
There appears to be a straight-forward fix of using MAX(blocktime, MTP+offset) but this deserves some consideration before implementation.