Skip to content

fabric-x-sdk · 架构

本仓库是客户端 SDK 工具集合,无单一 server。8 个核心子包按职责分层。

子包关系(数据流)

顶层 Go 文件

来源:types.gologging.go

文件关键符号行号
types.goEndorsement struct(13-18)、Signer interface(20-23)13-23
logging.goLogger interface(18-23)、NoOpLoggerStdLoggerTestLogger18-89

子包总览

来源:README.md:11-19、各子包源码。

子包Go 文件数一行职责
blocks/10Block 解析与 transaction 构造 + MVCC 验证
endorsement/5解析 SignedProposal;生成签名响应
identity/1ECDSA Fabric identity + 签名
network/10peer / orderer 客户端 + block 订阅
state/6SQLite 版本化数据库 + simulation store
local/2LocalSubmitter 本地提交 + MVCC
fabrictest/4内存 mock Fabric / Fabric-X 网络
integration/2集成测试

各子包关键 struct / func 见 04-modules

关键设计决策(README 自述)

来源:README.md:5-7, 21-23

  • 状态预览版:API 可能变化;不保证生产级弹性。
  • 目标使用方式:组合各子包构建具体应用(block explorer 或 endorser)。

与依赖项目的关系

来源:go.mod:12-18

依赖版本
github.com/hyperledger/fabric-lib-gov1.1.3
github.com/hyperledger/fabric-protos-go-apiv2v0.3.7
github.com/hyperledger/fabric-x-commonv0.1.1-0.20260219094834-26c5a49ed548
google.golang.org/grpcv1.80.0
google.golang.org/protobufv1.36.11
modernc.org/sqlitev1.48.0

工具依赖(go.mod:5-10):addlicensefabric-x/tools/configtxgencryptogenfxconfig

间接依赖含密码学(IBM/idemixIBM/mathlibconsensys/gnark-cryptokilic/bls12-381)、共识(SmartBFThyperledger/aries-bbs-go)、fabric-x-committer、监控(prometheus/client_golang)。