以太坊的Layer2解决方案—Side Chains、Plasma、Optimistic Rollups、ZK-Rollups

最近开始研究以太坊layer2的解决方案,只算是初步了解,虽说以太坊2.0的升级可能会给加密货币市场带来天翻地覆的变化,但我个人觉得layer2方向还是有必要继续研究一下的,尤其是Zk-Rollup中的加密技术ZK-STARKs,文章最后也会说说其特点。

Side Chains

  • Side channels run parallel to Ethereum main chain and have their own consensus mechanism and are connected to Ethereum mainnet via a bridge
    侧通道运行平行于以太主链,有自己的共识机制,并通过桥连接到以太主网
  • Because side chains have their own consensus mechanism, they do not inherit security from the Ethereum main chain
    因为侧链有它们自己的共识机制,所以它们不能从以太主链继承安全性
  • These chains typically have fewer nodes than the Ethereum main chain, leading to relatively lower level of security and are ideal for low-security Tx’s such as NFTs
    这些链通常比以太坊主链具有更少的节点,从而导致相对较低的安全级别,并且是低安全性 交易的理想选择,如 NFT
  • Projects using side chains include SKALE, Matic, POA Network
    使用侧链的项目包括 SKALE、 Matic、 POA Network

Plasma

  • Plasma can be thought of as a type of side chain, but with higher security levels
    Plasma可以被认为是一种侧链,但具有更高的安全等级
  • The plasma chain achieves this by semi-regularly capturing a number of recent transactions in a single hash and exporting it to the Ethereum main chain
    通过半定期在一个散列中捕获许多最近的事务并将其导出到以太坊主链来实现这一点
  • The proof that is submitted along with each mainnet commit is the has function derived from a Merkle Tree, which is simply a combination of the hashes of each Tx in the block
  • The security mechanism that makes plasma more secure is called fraud proof; once committed to the mainchain, Tx’s in the plasma block can be challenged for up to 7 days
    使等Plasma更安全的安全机制被称为防欺诈;一旦投入主链交易块可以挑战长达7天

Optimistic Rollups

  • Optimistic rollups follow a similar process to plasma, with one key difference around data availability
    Optimistic rollups类似于Plasma,在数据可用性方面有着关键的区别
  • Specifically, in a rollup, the transaction data is rolled up when a batch is committed to the mainchain; this allows for easier and fast auditing of fraud proofs
    具体来说,在卷叠中,事务数据在批处理提交到主链时进行卷叠; 这使得欺诈证据的审计更加容易和快速
  • They are called optimistic rollups because, similar to plasma, the only proof presented is the hash of the Merkle root, which does not tell much
    它们之所以被称为乐观卷叠,是因为与Plasma类似,提出的唯一证明是 Merkle 根的哈希
  • Therefore, optimistic rollups also trade off moderate security for faster processing times
    因此,乐观的卷叠还可以牺牲适度的安全性以换取更快的处理时间
    -Some projects building around optimistic rollups are Optimism and Fuel Network

ZK-Rollups

  • ZK (or zero knowledge) rollups follow a similar concept to optimistic rollups, but take security more seriously
    ZK (或零知识)卷叠遵循与乐观汇总相似的概念,但更加重视安全性
  • Each bunched transaction committed to the mainchain comes with a corresponding SNARK (or zero knowledge) proof
    提交给主链的每个聚合事务都带有相应的 SNARK (或零知识)证明
  • Unlike plasma and optimistic rollups, they will not be committed to the mainchain until the SNARK proof has been generated
    与Plasma和乐观卷叠不同,在生成 SNARK 证明之前,它们不会被提交到主链
  • This makes it more secure, but also more expensive, given that SNARK proof generation is computationally heavy and requires more gas
    这使得它更安全,但也更昂贵,因为 SNARK 证明生成计算量大,需要更多的gas
  • Ideal for platforms that host high value transactions (e.g. automated asset management)
    对于承载高价值事务的平台(如自动化资产管理)来说是理想的
  • Some projects working on this include Loopring, Starkware, zkSync

以下内容来自EthHub

摘要

ZK-STARKs (Zero-Knowledge Scalable Transparent ARguments of Knowledge) are a type of cryptographic proof technology that enables users to share validated data or perform computations with a third party without the data or computation being revealed to the third-party, also known as a zero-knowledge proof, in a way that is publicly verifiable. In simpler terms, a zero-knowledge proof can prove something is true without having to reveal what exactly it is proving. For example, ZK-STARKs would allow Alice to verify Bob’s banking information using a zero-knowledge cryptographic proof instead of revealing the confidential information to Alice.
ZK-STARKs (Zero-Knowledge Scalable Transparency ARguments of Knowledge)是一种加密证明技术,它使用户能够与第三方共享经过验证的数据或执行计算,而不必向第三方透露数据或计算结果,也被称为零知识证明,其方式是可公开验证的。简单地说,零知识证明可以证明某事是真的,而不必揭示它到底证明了什么。例如,ZK-STARKs 允许爱丽丝使用零知识加密证明来验证鲍勃的银行信息,而不是将机密信息透露给爱丽丝。
Prior to the creation of ZK-STARKs, ZK-SNARKs were used to create ZK proof systems, but required a trusted party or parties to initially setup the ZK proof system which introduced the vulnerability of those trusted parties compromising the privacy of the entire system. ZK-STARKs improve upon this technology by removing the need for a trusted setup.
在创建 ZK-STARKs 之前,ZK-SNARKs 被用于创建 ZK 证明系统,但是需要一个或多个受信任方初步建立 ZK 证明系统,该系统引入了这些受信任方的脆弱性,损害了整个系统的隐私。ZK-STARKs 通过消除对可信设置的需求改进了这项技术。

使用 STARKs 的好处

STARKs improve two of the problems of permissionless blockchains: scalability and privacy. The pioneer in STARK technology StarkWare Industries’ current ZK-STARK research is focusing on scalability first and then privacy later on.
STARK 改善了无权限区块链的两个问题: 可伸缩性和隐私性。StarkWare 工业公司目前的 ZK-STARK 研究是 STARK 技术的先驱,它首先关注可伸缩性,然后才是隐私。

STARKs improve scalability by allowing developers to move computations and storage off-chain. Off-chain services will be able to generate STARK proofs that attest the integrity of off-chain computations. These proofs are then placed back on chain for any interested party to validate the computation. Moving the bulk of computational work off-chain using STARKs allows existing blockchain infrastructure to scale exponentially while trustlessly maintaining computational integrity.
STARKs 通过允许开发人员将计算和存储从链上移动来提高可伸缩性。脱链服务将能够生成 STARK 证明,证明脱链计算的完整性。然后将这些证明放回链上,以便任何感兴趣的一方验证计算。使用 STARKs 将大部分计算工作从链上移开,允许现有的区块链基础设施以指数方式扩展,同时不可靠地保持计算完整性。

ZK-SNARKs和ZK-STARKs之间的差异

  1. ZK-SNARKs require a trusted setup phase whereas ZK-STARKs use publicly verifiable randomness to create trustlessly verifiable computation systems.
    ZK-SNARKs 需要一个可信的设置阶段,而 ZK-STARKs 使用公开可验证的随机性来创建不可信的可验证计算系统。
  2. ZK-STARKs are more scalable in terms of computational speed and size when compared to ZK-SNARKs.
    与 ZK-SNARKs 相比,ZK-STARKs 在计算速度和大小方面具有更大的可扩展性。
  3. ZK-SNARKs are vulnerable to attacks from quantum computers due to the cryptography they use. ZK-STARKs are currently quantum-resistant.
    由于使用的密码学,ZK-SNARKs 很容易受到来自量子计算机的攻击。 ZK-STARKs 目前具有量子抗性

猜你喜欢

转载自blog.csdn.net/weixin_41551445/article/details/126285522