fabric

module
v1.4.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2021 License: Apache-2.0

README


Hyperledger Fabric 国密版

Build Status Contributions welcome Fabric 1.4 gm tls enable

本项目是 Hyperledger Fabric 的国密支持版本。

简介

本项目的优势

本项目涵盖 Fabric、Fabric CA 以及 Fabric SDK 的全链路国密改造,主要包括以下功能点:

  • 国密 CA 生成和签发

  • 应用数据国密加密/签名/解密

  • 国密 TLS 的 GRPCS 和 HTTPS 通讯

  • 国密密码机的集成(阿里云 KMS 服务)

  • 代码修改使用非侵入式的修改,与 Fabric 官方仓库合并更容易

  • 支持 Jenkins CI

⚠️ 注意

  • ​ cryptogen 默认生成非国密的 ecdsa 签名的证书,如果需要生成国密证书,需要加上 --gm 参数,比如

    cryptogen generate --gm

  • ​ 交易 ID 的计算还是原版的 SHA256,并未改为 GMSM3

    ​ 对应 fabric 具体的位置在 ComputeTxID 函数中

    ​ 对应 go-sdk 具体的位置在 NewHeader 函数中

什么是 Hyperledger Fabric?

Hyperledger Fabric 是用于开发解决方案和应用程序的企业级许可分布式分类账本框架,可以去官网了解更多。

什么是国密(GM)?

国密(GM)算法是国家密码管理局发布的、符合《密码法》中规定的商用密码的一套密码标准规范。

依赖与关联

依赖

关联代码库

本代码库为 Fabric Core 的国密化版本,Fabric的其他部分国密化改造如下:

如何使用

与官方 Fabric 1.4 一致,参考 Fabric 官方文档

常用命令

  • make native进行编译

  • make docker打包 docker 镜像

使用镜像

本项目使用 CI 持续编译并测试,并将镜像发表在 dockerhub,可使用镜像:

关于我们

国密化改造工作主要由 ThoughtWorks 区块链团队完成,想要了解更多/商业合作/联系我们,欢迎访问我们的官网

Directories

Path Synopsis
gm
idemix/handlers/mock
Code generated by counterfeiter.
Code generated by counterfeiter.
sw
cmd
common
deliver/mock
Code generated by counterfeiter.
Code generated by counterfeiter.
flogging/httpadmin/fakes
Code generated by counterfeiter.
Code generated by counterfeiter.
flogging/mock
Code generated by counterfeiter.
Code generated by counterfeiter.
grpclogging/fakes
Code generated by counterfeiter.
Code generated by counterfeiter.
grpcmetrics/fakes
Code generated by counterfeiter.
Code generated by counterfeiter.
ledger/blockledger/mocks
Code generated by mockery v1.0.0.
Code generated by mockery v1.0.0.
metrics/metricsfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
tools/configtxgen/encoder/mock
Code generated by counterfeiter.
Code generated by counterfeiter.
core
cclifecycle/mocks
Code generated by mockery v1.0.0.
Code generated by mockery v1.0.0.
chaincode/fake
Code generated by counterfeiter.
Code generated by counterfeiter.
chaincode/lifecycle/mock
Code generated by counterfeiter.
Code generated by counterfeiter.
chaincode/mock
Code generated by counterfeiter.
Code generated by counterfeiter.
chaincode/persistence/mock
Code generated by counterfeiter.
Code generated by counterfeiter.
chaincode/platforms/car
# Copyright State Street Corp.
# Copyright State Street Corp.
chaincode/platforms/ccmetadata
# Copyright State Street Corp.
# Copyright State Street Corp.
chaincode/platforms/mock
Code generated by counterfeiter.
Code generated by counterfeiter.
chaincode/shim
Package shim provides APIs for the chaincode to access its state variables, transaction context and call other chaincodes.
Package shim provides APIs for the chaincode to access its state variables, transaction context and call other chaincodes.
comm/mock
Code generated by counterfeiter.
Code generated by counterfeiter.
committer/txvalidator/mocks
Code generated by mockery v1.0.0.
Code generated by mockery v1.0.0.
container/dockercontroller/mock
Code generated by counterfeiter.
Code generated by counterfeiter.
container/mock
Code generated by counterfeiter.
Code generated by counterfeiter.
deliverservice/mocks
Code generated by counterfeiter.
Code generated by counterfeiter.
endorser/mocks
Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by counterfeiter.
Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by mockery v1.0.0 Code generated by counterfeiter.
handlers/endorsement/builtin/mocks
Code generated by mockery v1.0.0
Code generated by mockery v1.0.0
handlers/validation/builtin/mocks
Code generated by mockery v1.0.0.
Code generated by mockery v1.0.0.
handlers/validation/builtin/v12/mocks
Code generated by mockery v1.0.0.
Code generated by mockery v1.0.0.
handlers/validation/builtin/v13/mocks
Code generated by mockery v1.0.0.
Code generated by mockery v1.0.0.
Code generated by counterfeiter.
ledger/kvledger/txmgmt/privacyenabledstate
Package privacyenabledstate is a generated protocol buffer package.
Package privacyenabledstate is a generated protocol buffer package.
ledger/kvledger/txmgmt/queryutil/mock
Code generated by counterfeiter.
Code generated by counterfeiter.
ledger/kvledger/txmgmt/statedb/mock
Code generated by counterfeiter.
Code generated by counterfeiter.
ledger/mock
Code generated by counterfeiter.
Code generated by counterfeiter.
ledger/pvtdatapolicy/mock
Code generated by counterfeiter.
Code generated by counterfeiter.
middleware/fakes
Code generated by counterfeiter.
Code generated by counterfeiter.
operations/fakes
Code generated by counterfeiter.
Code generated by counterfeiter.
scc
scc/cscc
Package cscc chaincode configer provides functions to manage configuration transactions as the network is being reconfigured.
Package cscc chaincode configer provides functions to manage configuration transactions as the network is being reconfigured.
scc/cscc/mock
Code generated by counterfeiter.
Code generated by counterfeiter.
scc/lscc/mock
Code generated by counterfeiter.
Code generated by counterfeiter.
cmd
cmd/mocks
Code generated by mockery v1.0.0.
Code generated by mockery v1.0.0.
support/mocks
Code generated by counterfeiter.
Code generated by counterfeiter.
examples
chaincode/go/example03
This program is an erroneous chaincode program that attempts to put state in query context - query should return error
This program is an erroneous chaincode program that attempts to put state in query context - query should return error
api
mocks
Code generated by mockery v1.0.0.
Code generated by mockery v1.0.0.
integration
e2e
nwo
msp
Package main is the entrypoint for the orderer binary and calls only into the server.Main() function.
Package main is the entrypoint for the orderer binary and calls only into the server.Main() function.
common/blockcutter/mock
Code generated by counterfeiter.
Code generated by counterfeiter.
common/broadcast/mock
Code generated by counterfeiter.
Code generated by counterfeiter.
common/msgprocessor
Package msgprocessor provides the implementations for processing of the assorted message types which may arrive in the system through Broadcast.
Package msgprocessor provides the implementations for processing of the assorted message types which may arrive in the system through Broadcast.
common/multichannel
Package multichannel tracks the channel resources for the orderer.
Package multichannel tracks the channel resources for the orderer.
common/server/mocks
Code generated by counterfeiter.
Code generated by counterfeiter.
consensus/etcdraft/mocks
Code generated by counterfeiter.
Code generated by counterfeiter.
consensus/kafka/mock
Code generated by counterfeiter.
Code generated by counterfeiter.
consensus/mocks
Code generated by counterfeiter.
Code generated by counterfeiter.
chaincode/mock
Code generated by counterfeiter.
Code generated by counterfeiter.
common/mock
Code generated by counterfeiter.
Code generated by counterfeiter.
mocks
Code generated by counterfeiter.
Code generated by counterfeiter.
node/mock
Code generated by counterfeiter.
Code generated by counterfeiter.
protos
msp
client/mock
Code generated by counterfeiter.
Code generated by counterfeiter.
identity/mock
Code generated by counterfeiter.
Code generated by counterfeiter.
ledger/mock
Code generated by counterfeiter.
Code generated by counterfeiter.
server/mock
Code generated by counterfeiter.
Code generated by counterfeiter.
tms
transaction/mock
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL