In the thread
https://bitcointalk.org/index.php?topic=307211.0 I propose a method to protect users money from attackers by creating 2-step transactions, so users can roll-back if an attacker attempts to do step 1. The first step can be reverted using cold storage keys. I called it the "Tick method".
I realized that the same method could be implemented much more easily if transactions could specify a time/block number after they are unable to be accepted in the block chain.
Currently nLockTime has a threshold:
int LOCKTIME_THRESHOLD = 500000000; // Tue Nov 5 00:53:20 1985 UTC
Values lower than LOCKTIME_THRESHOLD are considered block numbers and values higher than LOCKTIME_THRESHOLD they are considered unix timestamps.
Since Bitcoin didn't existed from 1985 to 2009, I propose a soft-fork where nLockTime in ranges:
nLockTime in (LOCKTIME_THRESHOLD to 510000000): Valid before block (nLockTime- LOCKTIME_THRESHOLD+262634) (190 years avail, upto 2203)
nLockTime in (510000000 to 1230000000): Valid before time (nLockTime-510000000+1230000000): 22.8 years avail (up to 2036)
Code change should look something like: (note: I'm not taking into account txin.IsFinal(), this is just an example)
bool IsFinal(int nBlockHeight=0, int64 nBlockTime=0) const
{
....
if ((int64)nLockTime < LOCKTIME_THRESHOLD ) {
if ((int64)nLockTime < (int64)nBlockHeight)
return true;
}
else
if ( (int64)nLockTime <510000000) {
if ((int64)nLockTime- LOCKTIME_THRESHOLD+262634 >= (int64)nBlockHeight)
return true;
}
else
if ( (int64)nLockTime <1230000000) {
if ((int64)nLockTime-510000000+1230000000 >= (int64)nBlockTime)
return true;
}
else
if ((int64)nLockTime > (int64)nBlockTime)
return true;
...
}
There may be many more use case (Mike Hearn?)
Best regards,
Sergio.