比特币(BSV)知识库:脚本-False Return

特别提示:

比特币(BSV)知识库-Bitcoin wiki-目前为全英文内容,暂无中文译文,并且仍在持续编写和补充中。欢迎中国的开发者在文章底部评论,进行阐述和探讨。

比特币(BSV)知识库:脚本-False Return_第1张图片

False Return

False Return outputs are transaction outpoints which begin with the script "OP_FALSE OP_RETURN". This script always returns a false when evaluated making the output unspendable and locking any funds attached to that endpoint. When attempting to spend the False Return outpoint, OP_FALSE will push "false" to the stack, after which OP_RETURN is executed. OP_RETURN terminates the execution immediately. The result of the execution is then read from the top of the stack. In this case, "false" is read, therefore the script fails regardless what else is on the stack.

False Return outputs can be used to store arbitrary information such as records, tokens, files and more. False Return outputs are commonly used as vehicles to carry data for application layer protocols inside Bitcoin transactions.

OP_RETURN Outputs

Due to changes made by Satoshi in 2010 to prevent people exploiting a bug in the Bitcoin software, the OP_RETURN opcode was changed to force scripts to terminate in failure. This led to the widespread use of so-called 'Op_Return outputs' which start with an OP_RETURN instruction and then store data for application layer protocols. Bitcoin Core rules stipulated that to use an OP_RETURN instruction in an output, it had to be both the only opcode in the output and the first opcode in the output. The Quasar Update in early 2019, relaxed these requirements to allow OP_FALSE OP_RETURN in preparation for the Genesis update in February 2020 where the original OP_RETURN functionality was restored. The use of the OP_FALSE replicated the provably unspendable property of OP_RETURN than many use cases have come to rely on. Many second layer protocols were build using the OP_RETURN framework prior to being migrated to False Return outputs.

声明:

比特币(BSV)知识库项目由比特币协会(Bitcoin Association)发起并支持,更多信息请参见知识库官网:https://wiki.bitcoinsv.io/

 

你可能感兴趣的:(Bitcoin,wiki)