比特币 RGB 协议或是智能合约的终极形态?

币圈资讯 阅读:39 2024-04-22 11:40:40 评论:0
美化布局示例

欧易(OKX)最新版本

【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   全球官网 大陆官网

币安(Binance)最新版本

币安交易所app【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

火币HTX最新版本

火币老牌交易所【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

作者:Echo | Infinitas;Leo | LK Venture

引言

虽然大多数人将比特币与金钱联系在一起,但它还有另一个不太为人所知的重要用例 — — 智能合约。智能合约是构建比特币的基础,最早由尼克·萨博(Nick Szabo)于1995年提出。这是一种计算机协议,旨在执行、验证或执行合同的谈判或执行,本质是合同而不是代码智能合约允许在没有第三方的情况下进行可信交易,可以实现自动信任,自动执行的协议,而不需要中央机构的协助,从而提供比传统合同更安全和更便捷的方式来执行合同。

在探讨比特币的RGB协议及其在智能合约中的潜在角色之前,值得一提的是,智能合约这一概念本身就存在一些争议。以太坊的联合创始人Vitalik Buterin曾在2018年表示,他对于将以太坊的核心功能称为‘智能合约’这一术语感到后悔。Buterin认为,这一术语应该选择更加技术性和平淡无奇的名称,如‘持久脚本’,以更准确地反映其作为持续执行程序的本质。这一点反映出即便在区块链领域的先驱者中,对于如何定义和理解智能合约仍存在着不同的观点。

在本文中,我们将揭开比特币智能合约的世界,并讨论它们如何演变为构建在网络之上的庞大生态系统。

什么限制了智能合约的发展?

区块链不可能三角的概念由以太坊创始人Vitalik Buterin提出,它指的是在区块链上无法同时实现以下三个目标:去中心化、安全性和可扩展性。智能合约也同样存在不可能三角:去中心化,可扩展性,图灵完备性。比特币和以太坊有很多相似之处,但因为存在长期远景差异和限制,两者成为两个不同的区块链网络。

比特币和以太坊对比图

以太坊长期以来在可扩展性方面难以突破。以太坊吞吐量低、处理速度慢,这是因为它优先考虑去中心化和安全性,而不是可扩展性(可扩展性三难困境)。也正因为以太坊在可扩展性方面存在瓶颈,即使它具有图灵完备性,仍然难以称作智能合约的最终形态。

比特币如何克服智能合约的可扩展性难题?

比特币链上可扩展性一直是长久以来的难题,要在比特币上完成智能合约方案,要么在比特币主链上创建,要么在比特币分层解决方案上创建。近年来出现的比特币链上可扩展性的分层解决方案,如 RGB 协议等,使比特币的智能合约功能实现快速迭代,解决不可能三角的可扩展性限制。

区块链不可能三角

比特币主链上的智能合约

比特币的脚本语言Script过于简单,这使得复杂的智能合约很难部署在基础层上。自诞生之日起,比特币就被设计得简单且相对不需修改,以确保区块链的完整性和持久性。虽然协议的升级会定期发生,但它们并不意味着彻底改变区块链,而只是在边缘提供微小的改进。

比特币的底层仍然具有许多基本的智能合约功能。

• 付费公钥哈希 (P2PKH)

Pay-to-Public-Key-Hash 是用于比特币交易的常见合约,该脚本创建由公钥执行的合约,并由相应私钥创建签名。

• 多重签名(Multisig)

多重签名是一种比特币地址,需要多方批准交易才能完成,最常用于执行各方之间的协议,其中必须收集预定义数量的签名才能释放资金或执行某些其他操作。

• 哈希时间锁定合约(HTLC)

哈希时间锁定合约是一种有条件的比特币交易,具有有时限的意外情况。这些时间限制是硬编码的,BTC 仅在特定时间和日期(或区块)发布。如果在预设的截止日期之前未满足合同中的某些要求,则交易将被取消。

• 谨慎日志合约 (DLC)

DLC利用预言机执行无需信任的点对点交易。这些预言机能够评估现实世界事件的结果,并为比特币智能合约提供链上信息。当两个相关方承诺根据未来结果达成货币协议时,最常使用 DLC。

• 付费到 Taproot (P2TR)

Pay-to-Taproot 是一个用于发送比特币的脚本,它引入了 Merkle 树和 Schnorr 签名。这些交易提供更好的安全性、更低的交易费用和更大的灵活性。这种形式的合同最近是由于Taproot 升级而实施的。

分层执行的比特币智能合约优势

比特币层的独特之处在于它们可以向网络引入新功能,而无需对主链进行任何修改。无需更改比特币代码,即可引入创新和其他实验性开发,这样,比特币的核心就可以始终保持简单,并且不受其上构建的内容的影响。

所有比特币层交易最终都在比特币基础层上结算,这意味着每笔交易的历史都将被写入比特币的分类账中。验证程度是区块链与任何其他网络的区别所在,要更改比特币层交易,则要更改主链交易。

分层执行的比特币智能合约具有一些关键优势。

• 更强的可编程性:分层智能合约通过访问其自身的全局状态来克服比特币脚本语言的有限功能,各层可以拓宽在比特币之上构建内容的可能性。

• 更高的可扩展性:在可扩展解决方案上部署智能合约意味着交易的处理速度可以显着加快。目前,基础层每秒只能处理大约 5–7 个交易。而分层方案可以在将交易发送到主链进行最终结算之前将其捆绑。这极大地提高了比特币的吞吐量及其作为具有数百万日常交易的可扩展网络的可行性。

• 提高效率。 改进的可扩展性与更快的交易和更便宜的成本齐头并进。较短的出块时间可以加快确认速度,而与主链相比,分层交易的交易成本显著降低。此外,分层交易减少了基础层发生的混乱,并提高了整个网络的性能。

反观比特币生态,在完成隔离见证之后,全力朝向闪电网络、侧链等 Layer2 方向发展。比特币 Layer1 扩容方案的复杂度高,更被社区接受的是基于比特币 Layer1 构建新的 Layer2,既兼容并且不影响比特币系统,同时又解决链上拥堵的问题。于是对比特币智能合约的想象空间就落到了图灵完备性上。

为什么 RGB 协议或将是智能合约终极形态?

作为比特币分层解决方案的一种形式,RGB 协议在智能合约领域爆发出实现未来大规模应用的巨大潜力。在比特币分层解决方案中,RGB 协议和 BitVM 是唯二可以实现“可扩展性”,“图灵完备性”和“去中心化”三者平衡的。

RGB 是一种开源协议,他基于比特币的协议,借助闪电网络 (LN),执行智能合约。RGB 是建立在比特币区块链工作量证明 (PoW)共识层之上的协议。它利用闪电网却不需要对协议进行修改,同时利用 RGB 可以发行和管理可编程资产和私有资产。RGB 通过在两方(例如 LN 通道)之间执行私人智能合约来解决可扩展性问题。它的开发是为了改进彩色硬币并将比特币区块链上的数字资产代币化。

客户端验证

RGB 的核心功能之一是客户端验证,这是 Peter Todd 提出的概念。客户端验证由 RGB 模式提供支持,这是用户在各方之间创建智能合约协议的方式。这种验证方法利用了比特币区块链共识机制的强度和安全性,同时将 RGB 的智能合约代码和数据带离区块链。由于比特币支持智能合约执行环境的能力有限,RGB 将执行和验证带到区块链链下,同时 RGB 交易不包含在比特币或闪电交易中,从而让参与者受益于比特币共识层的安全性,同时提高灵活性和可扩展性。

除了链下存储交易数据之外,RGB 交易还被分配到使用一次性密封件的 UTXO 集,以关闭比特币交易输出,作为另一种安全措施。密封可防止两个不同方提供相同数据的不同版本。因此,它们允许符合条件的各方验证智能合约的状态历史记录。

RGB 智能合约、架构和验证

RGB 智能合约由状态、所有者和参与者可以执行以更新状态的操作组成。RGB 的 Schema 在创世级别定义了每个状态验证规则,确保每个连续的状态所有者使用相同的 Schema 来验证历史记录。因此,该模式保证了社会共识、验证和智能合约状态。

核心验证逻辑使用 Rust — — 一种与图灵机等效的确定性智能合约语言。所有特定于合约的验证逻辑都在 Alluvium 虚拟机 ( AluVM,Algorithm & Logical Unit Virtual Machine) 上运行 — — 高度确定性且无异常的 VM,来提供独立于平台的指令集。

其他可以实现图灵完备的比特币智能合约:

• BitVM:2023年10月白皮书发布,BitVM 采用类似 Rollups 的思想在链下执行复杂程序,再将关键的证据放到链上。同样是为比特币带来图灵完备的智能合约,但BitVM 对于计算能力提出极高要求,仅有理论可执行性。可拓展性和商业落地有待更进一步了解。

克服智能合约“不可能三角”的 RGB 和 BitVM

总结

比特币是去中心化“数字黄金”,它也是执行智能合约的平台。目前,大量比特币处于闲置状态。大约 76% 的比特币供应仍然缺乏流动性,没有交易历史。通过智能合约的扩展,有机会将比特币生产力提升到新的水平。通过 RGB 协议等融合图灵完备的智能合约功能的比特币生态协议,开发人员可以将更多智能合约编程到网络中,从而加速比特币作为价值存储和金融服务层的主流采用。

作为一种高度去中心化、安全且持久的区块链,比特币未来可以作为更多链上经济活动的基础。相信未来比特币可能很快就会成为智能合约、去中心化应用程序和 Web3 基础设施未来的顶级生态系统。在这个不断变化的领域中,比特币的角色和能力可能会超出我们当前的想象,正如我们对“智能合约”一词含义的理解一样不断发展和深化。


Author's Introduction Although most people associate Bitcoin with money, it has another important use case that is not well known. Smart contract is the basis of building Bitcoin. It was first put forward by Nick Saab in. It is a computer protocol aimed at performing verification or execution. The essence of negotiation or execution of a contract is a contract rather than a code. Smart contract allows trusted transactions without a third party, which can realize automatic trust and automatic execution without the assistance of a central authority. Before discussing the protocol of Bitcoin and its potential role in smart contracts, it is worth mentioning that there are some disputes about the concept of smart contracts. The co-founder of Ethereum said in 2006 that he regretted calling the core function of Ethereum smart contracts, and thought that this term should be chosen with a more technical and prosaic name, such as persistent script, to more accurately reflect its holding. The essence of the continuous execution program reflects that even among the pioneers in the blockchain field, there are still different views on how to define and understand smart contracts. In this paper, we will uncover the world of bitcoin smart contracts and discuss how they have evolved into a huge ecosystem built on the network. What limits the development of smart contracts? The concept of blockchain impossible trinity was put forward by the founder of Ethereum, which means that the following three goals cannot be achieved simultaneously in the blockchain: decentralized security. Sex and scalability smart contracts also exist. impossible trinity decentralization scalability Turing completeness Bitcoin and Ethereum have many similarities, but because of long-term differences and restrictions, they have become two different blockchain networks. Bitcoin and Ethereum have long been difficult to break through Ethereum's low throughput and slow processing speed. This is because it gives priority to decentralization and security rather than scalability. It is precisely because of the three dilemmas of scalability. There is a bottleneck in the scalability of Ethereum. Even though it has Turing completeness, it is still difficult to call it the final form of smart contracts. How does Bitcoin overcome the scalability problem of smart contracts? The scalability on the bitcoin chain has always been a long-standing problem. To complete the smart contract scheme on bitcoin, either create it on the bitcoin main chain or create layered solutions such as protocols that have emerged in recent years to make bitcoin smart contracts. The function is realized by fast iteration to solve the scalability limitation of impossible trinity's blockchain. The scripting language of the smart contract Bitcoin on the main chain of Bitcoin in impossible trinity is too simple, which makes it difficult to deploy complex smart contracts on the basic layer. Since its birth, Bitcoin has been designed to be simple and relatively without modification to ensure the integrity and durability of the blockchain. Although the protocol upgrades will occur regularly, they do not mean completely changing the blockchain, but only providing slight improvement bits at the edge. The bottom layer of the currency still has many basic intelligent contract functions. Paying public key hash is a common contract used for bitcoin transactions. This script creates a contract executed by the public key and creates a signature by the corresponding private key. Multi-signature multi-signature is a bitcoin address that requires multiple parties to approve the transaction to complete the most commonly used agreement between the executing parties, in which a predefined number of signatures must be collected to release funds or perform some other operations. Hash time locking contract Hash time locking contract is a kind of contract. Conditional bitcoin transactions have time-limited surprises. These time limits are hard-coded and only released at specific times and dates or blocks. If some requirements in the contract are not met before the preset deadline, the transaction will be cancelled. The cautious journal contract uses Oracle machines to perform peer-to-peer transactions without trust. These Oracle machines can evaluate the results of real-world events and provide chain information for bitcoin smart contracts. When two related parties promise to reach a monetary agreement according to future results, it is most important. Pay-as-you-go is a script for sending bitcoin, which introduces trees and signatures. These transactions provide better security, lower transaction costs and greater flexibility. This form of contract has recently been implemented due to upgrades. Advantages of Bitcoin smart contracts. The uniqueness of Bitcoin layers is that they can introduce new functions to the network without any modification to the main chain, and can introduce innovation and other experimental development, which is the core of Bitcoin. You can always keep it simple and unaffected by the content built on it. All bitcoin layer transactions will eventually be settled on the bitcoin base layer, which means that the history of each transaction will be written into the ledger of bitcoin. The degree of verification is the difference between blockchain and any other network. To change the bitcoin layer transactions, you need to change the main chain transactions. The bitcoin smart contract executed hierarchically has some key advantages, and the hierarchical smart contract with stronger programmability is achieved by accessing its own global status. Overcoming the limited functions of Bitcoin scripting language, each layer can broaden the possibility of building content on Bitcoin, and the higher scalability means that the processing speed of transactions can be significantly accelerated by deploying smart contracts on scalable solutions. At present, the basic layer can only process about one transaction per second, while the layered solution can bundle the transactions before sending them to the main chain for final settlement, which greatly improves the throughput of Bitcoin and its scalability as an extensible network with millions of daily transactions. The feasibility is improved, the efficiency is improved, the scalability goes hand in hand with faster transactions and cheaper costs, and the shorter blocking time can speed up the confirmation, but compared with the main chain, the transaction cost of layered transactions is significantly reduced. In addition, layered transactions reduce the chaos at the basic layer and improve the performance of the whole network. On the other hand, after the completion of the isolation witness, the Bitcoin ecosystem is fully developing towards the lightning network side chain, and the complexity of the bitcoin expansion scheme is high, and it is more acceptable for the community to build a new one based on Bitcoin. Therefore, the imagination of bitcoin smart contract falls on Turing completeness. Why does the protocol or the ultimate form of smart contract break out as a form of bitcoin layered solution, which has great potential to realize large-scale application in the future? In bitcoin layered solution, the protocol and the only one can achieve scalability, Turing completeness and decentralization. The balance between them is an open source protocol. His bitcoin-based protocol is based on lightning network to implement smart contracts, which is based on bitcoin blockchain engineering. 比特币今日价格行情网_okx交易所app_永续合约_比特币怎么买卖交易_虚拟币交易所平台

文字格式和图片示例

注册有任何问题请添加 微信:MVIP619 拉你进入群

弹窗与图片大小一致 文章转载注明 网址:https://netpsp.com/?id=62340

美化布局示例

欧易(OKX)最新版本

【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   全球官网 大陆官网

币安(Binance)最新版本

币安交易所app【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址

火币HTX最新版本

火币老牌交易所【遇到注册下载问题请加文章最下面的客服微信】永久享受返佣20%手续费!

APP下载   官网地址
可以去百度分享获取分享代码输入这里。
声明

1.本站遵循行业规范,任何转载的稿件都会明确标注作者和来源;2.本站的原创文章,请转载时务必注明文章作者和来源,不尊重原创的行为我们将追究责任;3.作者投稿可能会经我们编辑修改或补充。

发表评论
平台列表
美化布局示例

欧易(OKX)

  全球官网 大陆官网

币安(Binance)

  官网

火币(HTX)

  官网

Gate.io

  官网

Bitget

  官网

deepcoin

  官网
关注我们

若遇到问题,加微信客服---清歌

搜索
排行榜
扫一扫,加我为微信好友加我为微信好友