6

The wiki article on contracts talks about the best stuff you can do with delays and replacement. (Lock time and sequence numbers, respectively.) But according to the documentation, replacement isn't supported yet. Why not?

(If the answer is "it's not implemented yet", why hasn't it been?)

6

That's not correct. The nLockTime field is implemented. It was deliberately switched off some time ago in order to reduce the complexity of the protocol. The reason was a series of protocol-based attacks that had compromised the integrity of the system.

At some point the feature will be re-activated. Probably, after someone has written a comprehensive test suite and technical analysis showing that it's not risky to re-enable.

  • Presumably by "That's not correct" you mean Thomas' answer, but the Stackexchange format does not make the context at all clear and immutable. – Meni Rosenfeld Dec 16 '12 at 10:12
  • 2
    Is nLockTime really deactivated? Could somebody provide a source? – kermit Mar 15 '13 at 8:31
3

You can do almost everything on that Contracts page without needing transaction replacement. Lock time does work today (as of Dec 2013), transactions with lock_time can't go into the blockchain until the time is reached.

Transaction Replacement is not supported because the developers have said that the whole idea of nSequence-based replacement is problematic, and may never be enabled apparently it causes potential denial of service problems. They discuss it here:

https://bitcointalk.org/index.php?topic=131443.0

However, I don't think transaction replacement is really needed because sometime recently the developers made so transactions using lock_time and version < UINT_MAX are "non-standard". What this means is that transactions using lock_time won't be relayed on the peer-to-peer network until the lock_time is reached, at which point you can push the transaction for relaying and it will be considered standard and able to go into the blockchain.

The reason I think this takes care of most use cases is because replacement was only needed when the locked transactions were being relayed, and stored in the memory pools, so if a transaction came along that wasn't locked, it wouldn't be accepted because replacement wasn't implemented, and the locked transaction was already in the mempool. Since the locked transactions won't relay and store in the mempools now until lock_time is reached, I believe replacement is far less important, so the fact that it doesn't look like it will be implemented anytime soon is not a problem.

1

it's not implemented yet.

The protocol has these feature defined so they can be implemented in the future, but currently more important features are being worked on.

Fork the repo and create a patch to add support :p

0

Heres a site that shows nLockTime code implementation whether it works or not I have no idea Some say its implemented, others say its not

http://brainwallet.org/#tx

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.