> For the complete documentation index, see [llms.txt](https://yeasy.gitbook.io/blockchain_guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://yeasy.gitbook.io/blockchain_guide/13_fabric_design/intro.md).

# 简介

Hyperledger Fabric 的设计初衷是为企业提供一个高度可插拔、可扩展和安全的分布式账本技术（DLT）平台。与许多公有链（如比特币、以太坊）不同，Fabric 针对企业级业务场景的需求进行了以下核心设计上的创新：

1. **模块化与可插拔设计**：Fabric 的共识机制、身份认证、加密算法、账本存储引擎等组件都是模块化且可插拔的（Pluggable）。例如，共识排序服务可以使用 Raft 或是 BFT 协议；状态数据库可以使用 LevelDB 或 CouchDB。这极大地赋予了开发者根据不同业务场景进行定制的灵活性。
2. **许可制的网络架构 (Permissioned)**：企业业务通常不希望数据向全网完全公开。Fabric 是一个许可链，意味着网络中所有的参与者（节点、客户端等）都必须拥有经过授权的明确数字身份（由 MSP 证书管理组件签发）。无许可的节点根本无法加入网络，也无法读取账本数据。
3. **隐私保护与数据隔离**：针对企业对商业机密保护的高要求，Fabric 引入了\*\*通道（Channel）\*\*的概念。通道将整个网络划分为多个相互隔离的私密子网。只有加入该通道的成员才能访问其中的交易状态和链码数据。结合私有数据（Private Data）特性，甚至可以在同一通道内的指定成员间实现更细粒度的数据保密。
4. **创新的解耦交易模型**：传统的“排序后执行（Order-Execute）”架构（所有节点顺序执行相同交易以保持一致）在处理高并发、非确定性合约时容易遇到瓶颈，因此 Fabric 在 1.x 版本之后首创了\*\*“执行-排序-验证（Execute-Order-Validate）”\*\*模型：

   * 不同的智能合约（链码）可以并行且隔离地由指定的背书节点预先**执行**。
   * 排序服务只负责对交易的顺序达成共识（**排序**），而不关心交易内容。
   * 所有节点最后按照全局顺序对各交易读写集的冲突和签名进行**验证**并提交。

   这种架构解耦了计算与共识，极大地提升了系统的并发处理能力和横向扩展性。
5. **支持通用编程语言**：与以太坊必须使用专门的 Solidity 语言不同，Fabric 的智能合约（Chaincode）支持使用主流通用语言如 Go、Java、Node.js 来编写。这有效降低了企业开发者的学习门槛，并能够复用现有的海量第三方库。

接下来，我们将详细分析 Fabric 的架构组成及内部实现细节。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://yeasy.gitbook.io/blockchain_guide/13_fabric_design/intro.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
