Skip to content

fabric-x-sdk · 核心流程

1. Block 处理流水线

来源:blocks/processor.go:23-49

Parser 子包:

  • Fabric:blocks/fabric/parser.go
  • Fabric-X:blocks/fabricx/parser.go

MVCC:blocks/mvcc.go:33-43MVCCValidator struct);Validate 方法在 :49

2. 背书提案解析与签发

来源:endorsement/proposal.go:27-196identity/msp.go:33-84

安全提示

endorsement/proposal.go:89-103 注明:签名验证未实现,仅用于可信环境。

3. Identity Signer 加载

来源:identity/msp.go:33-105

4. Peer 通信

来源:network/peer.go:32-100

5. 本地提交(LocalSubmitter)

来源:local/submit.go:21-50

6. State Simulation

来源:state/sim.go:17-50state/db.go:25-54

VersionedDB 双 mode:

  • 读:NewReadDB(SQLite 只读,WAL,多并发连接)(db.go:25-35
  • 写:NewWriteDB(SQLite 读写,单连接,自动建表)(db.go:39-54

7. fabrictest 测试网络

来源:fabrictest/network.go:35-49

可用于 SDK 集成测试(README.md:14, 16)。

8. example/endorser 启动

来源:example/endorser/cmd/endorser/main.go:28-104example/endorser/README.md