五分钟了解区块链架构与扩容方案

Meta之光Published on 2022-02-27Last updated on 2022-02-27

Abstract

将区块链分成多个子层,可以让我们对区块链的架构更清楚也能让开发人员能够针对不同的层面,去开发能够改善区块链瓶颈的“扩容方案”。

架构

分片技术


区块链分层架构
区块链大致上分为三大主层:

  • Layer0层

主要工作是针对区块链与传统网络结合的非共识问题,可以简单理解为网际网络的资料传输,目前只有少数项目针对Layer0进行研究与开发。

  • Layer1层

包含了所有区块链的底层协议,主要负责安全、节点共识规则和帐本架构。

  • Layer2层

所涉及的是链上与链下的协议,主要负责链上链下消息传递、智能合约编程以及应用相关功能。
这三大主层中又可分为七个子层,非开发者不需要执著于深度了解,只需要了解区块链由哪些层面设计而成即可。
你可能会纳闷,分了三层了为什么还要细分那么多子层呢,搞得那么复杂干嘛?
原因在于现阶段区块链技术太年轻了,区块链本身还有很多问题存在,藉由将区块链分成多个子层,可以让我们对区块链的架构更清楚也能让开发人员能够针对不同的层面,去开发能够改善区块链瓶颈的“扩容方案”。
例如针对共识层提出的“DPOS”、针对网络层提出的“分片技术”或针对数据层提出的“区块扩容”等。
扩容方案

分片技术


首先解释一下什麽是“扩容方案”,所谓的扩容方案是指“为了改善区块链交易速度使其达到规模化所提出的解决方案”,各层所提出的扩容方案,其最终目的都是为了解决区块链交易速度的问题
要改善区块链交易速度和规模问题,解决方案分为两种:
将主链的事物分割处理ex.分片技术(Sharding)
区块链本身的设计并不具备“可扩展性”,也就是说,区块链的节点不管增加多少,都没有办法提高区块链处理交易的速度,以比特币为例,不论有多少人加入挖矿的行列,区块链依然是每十分钟出块一次。
我们可以用老师改考卷来举例,现在区块链验证交易,就像每个学生的考卷都统一由学校里的一位老师经手批改与纪录,然而这会导致全校学生的考卷需要花费两个礼拜的时间才能够完全审核完成,效率低下。
如果将考券分成五等份,改由五位老师批改,审核速度便可以提升五倍。
但是,如果每位老师都固定批改某个班级的考卷,学生就会知道哪位老师会负责他班上的考卷,学生就会有收买老师的可能。
因此,要如何分配考卷才能保证成绩的可信度,就是这个解决方案的重点。
将主链上的事物转移到其他地方处理ex.侧链、子链
举个简单的例子,每到假日,主要交通干道都会挤得水泄不通,车速每小时20公里,回到家都半夜了。
如果这时候我们能够另外开辟一条快速道路或高速公路,就能有效舒缓主要交通干道的车流,平均车速也能提升至50公里。
Layer1扩容方案

分片技术


Layer1扩容方案所关注的点是如何在确保区块链“状态”在全网的一致性与最终性的前题下,提升区块链的交易处理速度。
过去Layer1扩容方案,大部分是针对数据层和共识层的优化,近年来网络层的“分片技术”成为各大公链项目的研究重点。
例如以太坊2.0的目标,就是希望透过“分片技术”提升目前以太坊在交易处理速度上的瓶颈。
由于区块链是一个开放的网络系统,任何人都有权利担任节点参与记帐,如何制定一套游戏规则,让所有节点共同遵守,使区块链能够顺利运作是相当重要的问题。
Layer1又称为底层,也就是所有矿工都必须遵守的规则,其设计是为了让区块链能够保持状态的“帐本一致性”与“交易最终性”,让节点以不可窜改的方式锚定数据事务,并在没有中央审查的情况下以加密的方式达成共识。
简单来说Layer1就是区块链的协议,大家常听到的共识机制、区块、私钥或地址等等,这些都是Layer1范畴。
补充:区块链上的“计算”又称为“状态生成”,之所以会用“状态”这个词的原因在于,一般的计算模型里,不存在信任和安全问题,只需生成计算结果就好,不需要验证;但是在区块链网络中,除了计算出交易结果,还需要对其进行验证。

分片技术


Layer2扩容方案
藉由Layer2协议,区块链事务的“状态生成”可以独立于Layer1之外进行,因此这些协议也可以称为“链下”扩容方案。
使用链下扩容方案的主要优点之一是能够降低Layer1的侷限性,且不需要改变区块链本身的协议。
换句话说Layer2扩容方案尽可能在不牺牲区块链网络安全性的情况下实现高吞吐量的状态生成

分片技术


简单来说,Layer2扩容方案的概念就像“塞车”,如果今天高速公路大塞车,我们选择走车流量少的省道,避开尖峰车潮,虽然路线比较长,但可以比塞车的高速公路来要快到达目的地。
Layer2层所涉及的是链上与链下的协议,主要负责链上链下消息传递、智能合约编程以及应用相关功能。
也就是在现有区块链系统(Layer1)之上构建的辅助框架或协议。
如果以法律架构来比喻,Layer1就像宪法,是所有法律的依据,法律的制定不能够牴触宪法,而Layer1的架构如果要做更动,基本上都必须涉及到区块链分叉,就如同修宪程序一般,复杂且困难。
反观Layer2就象是依据宪法制定的法律,修改相对简单,且能够更符合实际需求。
目前,Layer2协议的主要目标大部分都是为了解决区块链所面临的事务处理速度与扩展难题
Layer2不负责验证
Layer2只负责处理“状态生成”并不负责“状态验证”,最终结算时,还是必需要回到Layer1验证才能完成交易确认,在这过程中最大的问题来自于Layer2的安全性较低,可能会因为有人作弊而导致生成错误的状态。
因此如何防止Layer2的数据出现错误以及数据如何安全的传回Layer1是Layer2协议设计时的问题之一。

分片技术

Trending Cryptos

Related Reads

Trading

Spot

Hot Articles

What is $BITCOIN

DIGITAL GOLD ($BITCOIN): A Comprehensive Analysis Introduction to DIGITAL GOLD ($BITCOIN) DIGITAL GOLD ($BITCOIN) is a blockchain-based project operating on the Solana network, which aims to combine the characteristics of traditional precious metals with the innovation of decentralized technologies. While it shares a name with Bitcoin, often referred to as “digital gold” due to its perception as a store of value, DIGITAL GOLD is a separate token designed to create a unique ecosystem within the Web3 landscape. Its goal is to position itself as a viable alternative digital asset, although specifics regarding its applications and functionalities are still developing. What is DIGITAL GOLD ($BITCOIN)? DIGITAL GOLD ($BITCOIN) is a cryptocurrency token explicitly designed for use on the Solana blockchain. In contrast to Bitcoin, which provides a widely recognized value storage role, this token appears to focus on broader applications and characteristics. Notable aspects include: Blockchain Infrastructure: The token is built on the Solana blockchain, known for its capacity to handle high-speed and low-cost transactions. Supply Dynamics: DIGITAL GOLD has a maximum supply capped at 100 quadrillion tokens (100P $BITCOIN), although details regarding its circulating supply are currently undisclosed. Utility: While precise functionalities are not explicitly outlined, there are indications that the token could be utilized for various applications, potentially involving decentralized applications (dApps) or asset tokenization strategies. Who is the Creator of DIGITAL GOLD ($BITCOIN)? At present, the identity of the creators and development team behind DIGITAL GOLD ($BITCOIN) remains unknown. This situation is typical among many innovative projects within the blockchain space, particularly those aligning with decentralized finance and meme coin phenomena. While such anonymity may foster a community-driven culture, it intensifies concerns about governance and accountability. Who are the Investors of DIGITAL GOLD ($BITCOIN)? The available information indicates that DIGITAL GOLD ($BITCOIN) does not have any known institutional backers or prominent venture capital investments. The project seems to operate on a peer-to-peer model focused on community support and adoption rather than traditional funding routes. Its activity and liquidity are primarily situated on decentralized exchanges (DEXs), such as PumpSwap, rather than established centralized trading platforms, further highlighting its grassroots approach. How DIGITAL GOLD ($BITCOIN) Works The operational mechanics of DIGITAL GOLD ($BITCOIN) can be elaborated on based on its blockchain design and network attributes: Consensus Mechanism: By leveraging Solana’s unique proof-of-history (PoH) combined with a proof-of-stake (PoS) model, the project ensures efficient transaction validation contributing to the network's high performance. Tokenomics: While specific deflationary mechanisms have not been extensively detailed, the vast maximum token supply implies that it may cater to microtransactions or niche use cases that are still to be defined. Interoperability: There exists the potential for integration with Solana’s broader ecosystem, including various decentralized finance (DeFi) platforms. However, the details regarding specific integrations remain unspecified. Timeline of Key Events Here is a timeline that highlights significant milestones concerning DIGITAL GOLD ($BITCOIN): 2023: The initial deployment of the token occurs on the Solana blockchain, marked by its contract address. 2024: DIGITAL GOLD gains visibility as it becomes available for trading on decentralized exchanges like PumpSwap, allowing users to trade it against SOL. 2025: The project witnesses sporadic trading activity and potential interest in community-led engagements, although no noteworthy partnerships or technical advancements have been documented as of yet. Critical Analysis Strengths Scalability: The underlying Solana infrastructure supports high transaction volumes, which could enhance the utility of $BITCOIN in various transaction scenarios. Accessibility: The potential low trading price per token could attract retail investors, facilitating wider participation due to fractional ownership opportunities. Risks Lack of Transparency: The absence of publicly known backers, developers, or an audit process may yield skepticism regarding the project's sustainability and trustworthiness. Market Volatility: The trading activity is heavily reliant on speculative behavior, which can result in significant price volatility and uncertainty for investors. Conclusion DIGITAL GOLD ($BITCOIN) emerges as an intriguing yet ambiguous project within the rapidly evolving Solana ecosystem. While it attempts to leverage the “digital gold” narrative, its departure from Bitcoin's established role as a store of value underscores the need for a clearer differentiation of its intended utility and governance structure. Future acceptance and adoption will likely depend on addressing the current opacity and defining its operational and economic strategies more explicitly. Note: This report encompasses synthesised information available as of October 2023, and developments may have transpired beyond the research period.

1.1k Total ViewsPublished 2025.05.13Updated 2025.05.13

What is $BITCOIN

Discussions

Welcome to the HTX Community. Here, you can stay informed about the latest platform developments and gain access to professional market insights. Users' opinions on the price of BTC (BTC) are presented below.

活动图片