ZKByte: 基于零知识证明和BitVm的比特币Layer2拓展解决方案

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

欧易(OKX)最新版本

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

APP下载   全球官网 大陆官网

币安(Binance)最新版本

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

APP下载   官网地址

火币HTX最新版本

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

APP下载   官网地址

作者:ZKBase(前 ZKSpace);来源:Medium

本设计的主要目标是为比特币区块链建立一个专门定制的Layer2网络。比特币Layer2网络旨在满足比特币生态系统内日益增长的对更快速、更高效交易的需求。通过将某些交易处理任务从主网上释放,旨在缓解比特币主网的拥堵问题并大幅减少交易确认所需的时间。

鉴于比特币虚拟机(VM)计算能力的固有限制,我们的设计使用了BitVM,它展示了在两层网络之间执行智能合约的潜力。通过利用挑战和响应方案,BitVM展示了一种比特币网络可编程性的新方法,打破了传统的限制。

为了增强比特币Layer2网络的安全性和完整性,该设计通过集成零知识证明(ZK)技术来实现状态验证。这些先进的加密技术允许比特币主网可以有效验证Layer2网络的状态,而不会损害底层交易的隐私和机密性。零知识证明能够验证信息而不泄露交易的具体细节,从而在保护隐私的同时确保Layer2网络的完整性。

总体而言,该设计旨在通过Layer2网络、采用BitVM进行智能合约执行以及集成零知识证明技术进行状态验证,提高比特币网络的可扩展性、速度和效率,同时保持底层交易的隐私和安全性。

0、架构

Layer2区块链采用账户模型。整个区块链的状态是通过基于Halo2证明系统的zkVM来验证的。Layer2状态与比特币主网络进行同步,并且所有Layer2状态都由BitVM实现的零知识证明(ZKP)验证器进行验证。 我们使用一个UTXO来追踪所有的Layer2状态。此外,我们还使用了一个可信的预言机来确保只有锁定/解锁脚本的输入/输出遵循Layer2协议。

1、Layer2委员会和可信预言机

由一组被选中的用户组成的Layer2委员会负责监督Layer2网络的整体运行状况。在出现协议问题时,委员会可以介入并停止协议,保护所有用户的资产。可信预言机对于验证输入/输出UTXO和脚本的正确性非常重要。

2、第一层到第二层

在比特币网络上创建一个单一的Taproot地址来表示Layer2协议。当创建一个UTXO并将其转移到Taproot地址时,相应的UTXO实际上是从比特币主网“充值”到Layer2。

协议或委员会账户专门处理所有“充值”到Layer2的UTXO资产的“转移”权限。只有协议、可信预言机或委员会账户可以更改存入UTXO的所有权。可信预言机确保所有权转移交易中包含正确的输出UTXO脚本。

3、同步到比特币主网的区块

所有Layer2网络的状态以区块的形式同步到比特币主网。对于一个区块,应提供以下信息:

· 一个特定区块中的交易;

· 应用这些交易后的新账户状态;

· 当前区块状态下的新UTXO(即使协议被破坏,也始终准备好);

· 比特币网络的区块信息;

· 零知识证明(证明从上一个区块到当前区块的状态转换是正确的) 所有这些比特币主网的状态都记录在一个UTXO交易历史中。

3.1 关于证明的更多信息

零知识证明被用来验证Layer2的正确性。试图证明以下内容:

· Layer2的区块交易被正确签名。

· 所有账户的新状态被正确处理。

· 在比特币主网的某个特定区块之前的所有充值交易被正确处理。

· 对于当前状态,所有UTXO的分配都被正确创建。

3.2 区块信息挑战

为了确保比特币主网中指定的区块信息的正确性,我们使用了一个挑战和响应方案。证明者可以通过指出在锁定时间段内特定区块之后还存在N个区块来证明区块信息的准确性。

3.3 ZKP电路和BitVM增强

正如BitVM论文所示,ZKP验证可以表示为一个二进制电路,可以由两个参与方进行挑战。通过预签名交易,可以发送挑战以获取电路的比特承诺。如果揭示0和1,则挑战成功。为了使用BitVM来验证ZKP,需要注意以下两点:

  • 相同的二进制电路承诺只能使用一次。也就是说,如果相同的电路承诺用于多个区块,可能会揭示一个比特承诺的0和1。

  • 对于ZKP验证,除了电路的满足性外,还应检查“公共输入”。

为了处理这两个缺点,对于Layer2的每个区块,创建一个唯一的二进制电路,并且固定“公共输入”。比特币脚本用于处理公共输入的哈希和检查。正确的公共输入比特承诺由可信的预言机进行检查。就电路满足性而言,委员会内的任何成员都有权利提出挑战。

4、从Layer2到比特币主网

资产可以通过两种方式从Layer2移动到比特币主网:提现(withdrawal)和强制提现(force-withdrawal)。 提现交易是从Layer2触发的,ZKP电路确保交易按预期进行处理。强制提现交易是从比特币网络发起的。

4.1 提现和强制提现交易

从Layer2触发的提现交易使用ZKP电路进行验证,以确保正确处理交易。从比特币网络发起的强制提现交易必须包含在下一个区块状态更新中。

4.2 UTXO分配

当一个区块的状态更新时,UTXO分配会进行同步。在协议停止的情况下,可以应用所有UTXO以确保所有用户资产的安全。在这些UTXO中,只有提现或强制提现的UTXO由协议签名。

5、Layer2退出

一旦ZKP未经验证,委员会必须停止并退出协议。如果协议停止,委员会会为Layer2最新区块状态中指定的所有UTXO分配进行签名。凭借这些签名,用户可以从Layer2提现而不会有任何损失。


The main goal of this design is to build a customized network for the bitcoin blockchain. The bitcoin network is designed to meet the growing demand for faster and more efficient transactions in the bitcoin ecosystem. By releasing some transaction processing tasks from the main network, it is designed to alleviate the congestion problem of the bitcoin main network and greatly reduce the time required for transaction confirmation. In view of the inherent limitations of the computing power of the bitcoin virtual machine, our design uses it to demonstrate the implementation of intelligence between the two networks. The potential of the contract shows a new method of the programmability of the bitcoin network by using the challenge and response scheme, which breaks the traditional limitation. In order to enhance the security and integrity of the bitcoin network, the design realizes the state verification by integrating zero-knowledge proof technology. These advanced encryption technologies allow the bitcoin main network to effectively verify the state of the network without damaging the privacy and confidentiality of the underlying transactions, and zero-knowledge proof can verify the information without revealing the specific details of the transaction, thus protecting the hidden. On the whole, the design aims to improve the scalability, speed and efficiency of Bitcoin network by adopting intelligent contract execution and integrating zero-knowledge proof technology to verify the status, while maintaining the privacy and security of the underlying transactions. The blockchain adopts account model, and the status of the whole blockchain is synchronized with the Bitcoin main network through the verification based on the proof system, and all the statuses are carried out by the realized zero-knowledge proof verifier. In addition, we also use a trusted Oracle to ensure that only the input and output of the locked and unlocked scripts follow the protocol. The Committee and the trusted Oracle are responsible for supervising the overall operation of the network. When there is a protocol problem, the Committee can intervene and stop the protocol to protect all users' assets. The trusted Oracle is very important for verifying the correctness of the input, output and scripts. Create a single address on the special currency network to represent the protocol. When one is created and transferred to the address, it is actually recharged from the bitcoin main network to the protocol or the committee account, and the transfer authority for all recharged assets is specially handled. Only the protocol trusted Oracle or the committee account can change the stored ownership. The trusted Oracle ensures that the ownership transfer transaction contains the correct output scripts and is synchronized to the block of the bitcoin main network. The status of all networks is synchronized to the ratio in the form of blocks. The special currency main network should provide the following information for a block, and apply the new account status after these transactions to the transactions in a specific block. Even if the agreement is broken, the block information of the bitcoin network is always ready. Zero-knowledge proof proves that the state transition from the previous block to the current block is correct. All the states of these bitcoin main networks are recorded in a transaction history. More information about the proof. Zero-knowledge proof is used to prove the correctness of the following. The block transaction of content is correctly signed, the new status of all accounts is correctly handled, all recharge transactions before a specific block in Bitcoin main network are correctly handled, and all allocations to the current status are correctly created. Block information challenge: In order to ensure the correctness of the block information specified in Bitcoin main network, we use a challenge and response scheme. The prover can prove the accuracy of block information by pointing out that there are still blocks after a specific block in the lock-up period. And enhancement, as shown in this paper, verification can be represented as a binary circuit that can be challenged by two participants. A challenge can be sent through a pre-signed transaction to obtain the bit commitment of the circuit. If the sum is revealed, then the challenge is successful. In order to verify the use, it is necessary to pay attention to the following two points: the same binary circuit commitment can only be used once, that is, if the same circuit commitment is used in multiple blocks, one bit commitment may be revealed, and for verification, besides the satisfaction of the circuit, the public input should be checked. In order to deal with these two shortcomings, a unique binary circuit is created for each block, and the fixed public input bitcoin script is used to process the hash of public input and check the correct public input bits. It is promised to be checked by a trusted Oracle machine. As far as circuit satisfaction is concerned, any member of the Committee has the right to challenge. Assets can be withdrawn from the main bitcoin network in two ways, and transactions can be guaranteed from the triggered circuit. Handling as expected, the forced withdrawal transaction is the withdrawal initiated from Bitcoin network and the forced withdrawal transaction is verified from the triggered withdrawal transaction to ensure the correct handling of the transaction. The forced withdrawal transaction initiated from Bitcoin network must be included in the next block status update. When the status of a block is updated, the allocation will be synchronized. In the case of the agreement stopping, all can be applied to ensure the safety of all user assets. Among these, only the withdrawal or forced withdrawal protocols are available. If the agreement is stopped, the Committee will sign all the assignments specified in the latest block status, with which users can withdraw cash without any loss. 比特币今日价格行情网_okx交易所app_永续合约_比特币怎么买卖交易_虚拟币交易所平台

文字格式和图片示例

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

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

美化布局示例

欧易(OKX)最新版本

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

APP下载   全球官网 大陆官网

币安(Binance)最新版本

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

APP下载   官网地址

火币HTX最新版本

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

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

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

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

欧易(OKX)

  全球官网 大陆官网

币安(Binance)

  官网

火币(HTX)

  官网

Gate.io

  官网

Bitget

  官网

deepcoin

  官网
关注我们

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

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