原始文献 / 论坛帖 / Re: Need OP_BLOCKNUMBER to allow "time" limited transactions
Re: Need OP_BLOCKNUMBER to allow "time" limited transactions
Bitcointalk · 2010-11-15 18:37:44 UTC
我们不能安全地做 OP_BLOCKNUMBER。万一分叉后区块链重组,交易需要能进入后面的区块。OP_BLOCKNUMBER 交易及其所有后代都会失效。这对后来那些没参与限时交易的币主不公平。
nTimeLock 做的是反过来的事。它是一笔开放交易,在截止前可以用新版本替换。它要到锁定后才能被记录。截止时版本号最高的那个会被记录。比如可以用它来写一笔托管交易:除非在截止前撤销,否则它会自动永久锁定并生效。这个功能还没启用、也没被使用,但支持已经在了,以后可以实现。
英文原文
We can't safely do OP_BLOCKNUMBER. In the event of a block chain reorg after a segmentation, transactions need to be able to get into the chain in a later block. The OP_BLOCKNUMBER transaction and all its dependants would become invalid. This wouldn't be fair to later owners of the coins who weren't involved in the time limited transaction.
nTimeLock does the reverse. It's an open transaction that can be replaced with new versions until the deadline. It can't be recorded until it locks. The highest version when the deadline hits gets recorded. It could be used, for example, to write an escrow transaction that will automatically permanently lock and go through unless it is revoked before the deadline. The feature isn't enabled or used yet, but the support is there so it could be implemented later.
