logo资料库

Hyperledger 中文文档.pdf

第1页 / 共496页
第2页 / 共496页
第3页 / 共496页
第4页 / 共496页
第5页 / 共496页
第6页 / 共496页
第7页 / 共496页
第8页 / 共496页
资料共496页,剩余部分请下载后查看
Hyperledger中文文档
简介
如何贡献
词汇表
Anchor Peer - 锚节点
Block - 区块
Chain - 链
Chaincode - 链码
Channel - 通道
Commitment - 提交
Concurrency Control Version Check - 并发控制版本检查(CCVC)
Configuration Block - 配置区块
Consensus - 共识
Current State - 当前状态
Dynamic Membership - 动态成员
Endorsement - 背书
Endorsement policy - 背书策略
Fabric-ca
Genesis Block - 初始区块
Gossip Protocol - Gossip协议
Initialize - 初始化
Install - 安装
Instantiate - 实例化
Invoke - 调用
Leading Peer - 主导节点
Ledger - 账本
Member - 成员
Membership Service Provider - MSP
Membership Services - 成员服务
Ordering Service - 排序服务或共识服务
Peer - 节点
Policy - 策略
Proposal - 提案
Query - 查询
Software Development Kit - SDK
State Database - stateDB
System Chain - 系统链
Transaction - 交易
简介
简介
区块链是什么?
分布式账本
智能合约
共识
区块链为什么切实可行?
当前的记录系统
区块链的不同点
Hyperledger Fabric是什么?
共享账本
智能合约
隐私
共识
后续学习
快速入门
Hyperledger Fabric模型
快速入门
前提
执行完整脚本
清理
configtxgen
执行generateCfgTrx.sh脚本
启动网络
背后发生了什么?
这表明了什么?
查看交易
查看chaincode日志
手动执行交易
修改docker-compose文件
命令语法
Create channel
Join channel
Install chaincode
Instantiate chaincode
Invoke chaincode
Query chaincode
手动构建镜像
使用本地二进制文件
终端1
终端2
终端1
终端3
Create channel
Join channel
Install chaincode
Instantiate chaincode
Invoke chaincode
Query chaincode
使用CouchDB
数据持久化
故障排出
Fabric教程
构建第一个fabric网络
1.1. 安装预置环境
1.2. 想要现在运行吗?
1.3. 生成网络神器
1.4. 启动网络
1.5. 关闭网络
1.6. 加密生成器
1.6.1. 它是如何工作的?
1.7. 配置交易生成器
1.7.1. 它是如何工作的?
1.8. 运行工具
1.8.1. 手动生成配置文件
1.9. 启动网络
1.9.1. 环境变量
1.9.2. 创建&加入信道
1.9.3. 安装和实例化链码
1.9.4. 查询
1.9.5. 调用
1.9.6. 查询
1.9.7. 幕后发生了什么?
1.9.8. 这指明了什么?
1.9.9. 我如何查询这些交易?
1.9.10. 我如何查看链码日志?
1.10. 了解 Docker Compose 技术
1.11. 使用CouchDB
1.12. 关于数据持久化的提示
1.13. 故障排除
编写第一个应用
编写第一个应用(Writing Your First Application)
下载测试网络(Getting a Test Network)
应用程序如何与网络进行交互(How Applications Interact with the Network)
查询账本(Querying the Ledger)
更新账本(Updating the Ledger)
其他资源(Additional Resources)
Chaincode 指南
Chaincode 指南
什么是Chaincode?
两类角色
Chaincode 开发手册
Chaincode 开发手册
什么是Chaincode?
Chaincode API
简单的资产管理Chaincode
选择一个代码存放位置
内务处理
初始化Chaincode
调用Chaincode
实现Chaincode应用
整合全部代码
编译Chaincode
在开发模者式下测试
安装Hyperledger Fabric样例
下载Docker镜像
1号终端
2号终端
3号终端
测试新的chaincode
Chaincode 操作手册
Chaincode 操作手册
什么是Chaincode?
Chaincode生命周期
打包(Packaging)
创建包
包的签名
安装chaincode
实例化chaincode
升级chaincode
停止与启动
CLI
系统chaincode
Fabric操作指南
MSP
成员服务提供者 (MSP)
MSP配置
如何生成MSP证书及其签名密钥?
peer&orderer侧 MSP 的设置
Channel MSP 的设置
最好的实践
Channel 配置(configtx)
Anatomy of a configuration / 配置剖析
Configuration updates / 更新配置
Permitted configuration groups and values / 组和值得配置许可
Orderer system channel configuration / Order channel 配置
Application channel configuration / APP channel 配置
Channel creation / 创建channel
Channel 配置(configtxgen)
Configuration Profiles - 配置文件
Bootstrapping the orderer - 引导共识
Creating a channel - 创建通道
Reviewing a configuration - 检查配置
Channel 重新配置(configtxlator)
概览(Overview)
运行 configtxlator 工具(Running the configtxlator)
原型翻译(Proto translation)
配置更新计算(Config update computation)
引导实例(Bootstraping example)
重配置示例(Reconfiguration example)
增加组织(Adding an organization)
背书策略
Endorsement policy design - 背书策略设计
Endorsement policy syntax in the CLI - CLI中背书策略语法
Specifying endorsement policies for a chaincode - 为chaincode指定背书策略
Future enhancements - 未来计划
错误处理
1.1. 总体概览
1.2. 使用说明
1.3. 显示错误消息
1.4. Hyperledger Fabric中错误处理的一般准则
日志控制
Overview概述
peer
Go chaincodes
API
Fabric设计
架构说明
1. 系统架构(System architecture)
1.1. 交易(Transactions)
1.2. 区块链数据结构(Blockchain datastructures)
1.2.1. State / 状态
1.2.2 账本(Ledger)
1.3. 节点(Nodes)
1.3.1. 客户端(Client)
1.3.2. Peer
1.3.3. Orderer
2. 交易背书的基本工作流程(Basic workflow of transaction endorsement)
2.1. 客户端创建交易和发送给它选择的背书peer节点(The client creates a transaction and sends it to endorsing peers of its choice)
2.1.1. PROPOSE消息格式(PROPOSE message format)
2.1.2.消息模式(Message patterns)
2.2. 背书peer节点模拟交易和产生背书签名(The endorsing peer simulates a transaction and produces an endorsement signature)
2.3. 提交客户端收集交易背书并通过排序服务广播它(The submitting client collects an endorsement for a transaction and broadcasts it through ordering service)
2.4. 排序服务向peer节点提交交易(The ordering service delivers a transactions to the peers)
3. 背书策略(Eorsement policies)
3.1. 背书策略规范(Endorsement policy specification)
3.2. 针对背书策略的交易评估(Transaction evaluation against endorsement policy)
3.3. 背书策略例子(Example endorsement policies)
4 (post-v1). 证实账本和节点账本检查(修剪)(Validated ledger and PeerLedger checkpointing (pruning))
4.1. 验证账本(Validated ledger (VLedger))
4.2. 节点账本检查(PeerLedger Checkpointing)
4.2.1. 检查点协议(Checkpointing protocol)
4.2.2. 有效检查点(Valid checkpoints)
交易流程
假设
1. 客户A发起交易
2. 背书节点验证签名&执行交易
3. 审查提案反馈
4. 客户组合交易背书
5. 交易验证和提交
6. 账本更新
CA
概述
入门
前置条件
安装
原生启动服务器
通过 Docker 启动服务器
体验 Fabric CA 命令行
文件格式
Fabric CA 服务端配置文件格式
Fabric CA 客户端配置文件格式
配置优先级说明
关于路径的一些说明
Fabric CA 服务端
初始化服务端
启动服务端
配置数据库
Postgres
MySQL
配置LDAP
构建一个集群
Farbic CA 客户端
登陆启动用户
注册一个新的身份
登录一个节点
从另一个Fabric CA服务器获得CA证书链
重新登陆一个身份
撤销一个证书或身份
启用TLS
附录
Postgres SSL 配置
配置Postgre服务器的基本步骤:
Postgres 服务器 - 需要客户端证书
MySQL SSL 配置
SDK--node
概述
Fabric的不同组成部分如何协调工作
Node.js SDK功能
API参考
SDK--java
已知的限制(Known limitations and restrictions)
v1.0.0
验证Fabric和Fabric-ca包(Valid builds of Fabric and Fabric-ca)
使用Fabric Vagrant环境(Working with the Fabric Vagrant environment)
SDK 依赖(SDK dependencies)
使用SDK(Using the SDK)
编译(Compiling)
执行单元测试(Running the unit tests)
执行集成测试(Running the integration tests)
端到端测试场景(End to end test scenario)
端到端测试环境(End to end test environment)
证书及其他加密工件(Certificates and other cryptography artifacts)
通过TLS连接到Orderer和Peer(TLS connection to Orderer and Peers)
链码背书策略(Chaincode endorsement policies)
通道创建工件(Channel creation artifacts)
GO语言链码(GO Lang chaincode)
简单的问题解决(Basic Troubleshooting)
和开发者交流(Communicating with developers and fellow users)
报告问题(Reporting Issues)
基于kafka的排序服务
须知(Caveat emptor)
概览(Big picture)
步骤(Steps)
其他注意事项(Additional considerations)
Supported Kafka versions and upgrading
支持的 Kafka 版本和升级
调试(Debugging)
例子(Example)
Channels
账本
Ledger - 账本
Chain - 链
State Database - 状态数据库
Transaction Flow - 交易流程
State Database options - 状态数据库选项
Read-Write set
交易模拟和read-write set
使用read-write set 验证交易和更新worldState
交易模拟与交易验证 示例
Gossip数据传输协议
Gossip协议(Gossip protocol)
Gossip消息传输(Gossip messaging)
故障排除和常见问题
Hyperledger Fabric 答疑
Hyperledger Fabric FAQ Hyperledger Fabric 答疑
Endorsement 背书
Security & Access Control 安全和权限控制
Application-side Programming Model 应用端编程模型
Chaincode (Smart Contracts and Digital Assets) 链码(智能合约和数字资产)
Differences in Most Recent Releases 最近版本的区别
MSP&ACL
Membership Service Providers & Access Control in Hyperledger Fabric
1. Terminology
2. Membership Service Providers (MSPs) in a Blockchain network
2.1 Definition of a Membership Service Provider
2.2 Examples
2.3 Generic interfaces for a fabric platform MSP
2.4 Coupling node signing abilities with a (local) MSP
2.5 Coupling chain participation with MSPs
2.5.1 Setup of chain MSPs
2.5.2 MSP principals
2.5.3 Reconfiguration of a channel MSP
3.Channel Access Control
4. Using the default MSP: Best Practices
1. Mapping between organizations/corporations and membership service providers
2. On organization has different divisions (say organizational units), to which it wants to grant access to different channels.
3. Separating clients from peers of the same organization.
5 example
6. Orderer Chain Creation Implementation Details
6.1 Orderer System Chain
6.2 Chain Creation Request (Configuration Transaction)
Fabric SDK 设计
1 概要
2 目标
2.1 应用开发
2.2 chaincode开发
3 原则
3.1 良好的API文档,数据模型,示例代码
3.2 便于使用
3.3 性能
3.4 版本控制
3.5 可服务性
4 场景
4.1 成员的注册和登记
4.2 链的创建
4.3 交易支持
5 客户端服务器API参考
6 详细说明
6.1 客户端
6.2 链
6.3 用户
6.4 节点
6.5 键值存储(接口)
6.6 加密模块(接口)
7 处理网络错误
8 参考
Makefile文件解析
【翻译】fabric工程项目构建Makefile翻译及解析
BCCSP密码算法套件解析
什么是BCCSP
Hyperledger Fabric中BCCSP的整合方式
BCCSP设计目标
BCCSP秘钥
秘钥生命周期
签名验签能力
加解密能力
摘要能力 译者增加表述
--参考资料
HYPERLEDGER BUSINESS BLOCKCHAIN TECHNOLOGIES
Hyperledger 框架
Hyperledger Fabric
Hyperledger Burrow
Hyperledger 工具
Hyperledger Cello
Hyperledger Composer
Hyperledger Explorer
基金会
员工
活动
使用 Go 编写智能合约
系列内容:
此内容是该系列 3 部分中的第 1 部分: 面向 Go 开发人员的链代码深入研究
链代码是什么?
在 IBM Cloud 上开发-- 免费试用 30 天
设置开发环境
区块链开发人员推荐阅读内容
链代码结构
清单 1. 示例链代码
Main 函数
清单 2. Main()
Init 方法
清单 3. Init()
Query 方法
清单 4. Query()
Invoke 方法
清单 5. Invoke()
链代码中的数据模型
清单 6. 创建自定义数据模型/模式的代码
存储和检索数据
将数据存储到账本中
清单 7. 将数据存储到账本中的代码
从账本获取数据
清单 8. 从账本中获取数据的代码
在 golang 结构与 JSON 字符串之间编组和解组数据
清单 9. 将一种结构编组为 JSON 字符串字节数组的代码
清单 10. 将一种结构从字节数组解组为已填充的结构的代码
实现访问控制和权限
成员服务
清单 11. 从调用方的交易证书中检索属性
创建和发出自定义事件
清单 12. 创建和发布自定义事件
处理日志
清单 13. 创建、配置和使用 ChaincodeLogger
常见问题和最佳实践
如何将文件(图像、音频、视频、PDF 等)存储在区块链中?
如何避免将私有业务逻辑/合同细节泄漏给网络中的所有对等节点?
结束语
下载资源
相关主题
对使用 Go 为 Hyperledger Fabric v0.6 编写的区块链链代码进行单元测试
对使用 Go 为 Hyperledger Fabric v0.6 编写的区块链链代码进行单元测试
系列内容:
此内容是该系列 3 部分中的第 2 部分: 面向 Go 开发人员的链代码深入研究
前提条件
链代码是什么?
在 IBM Cloud 上开发-- 免费试用 30 天
测试驱动开发是什么?
关于 Golang 测试库和 MockStub
区块链开发人员推荐阅读内容
清单 1. CustomMockStub 实现的代码段
入门
清单 2. sample_chaincode_test.go 中的包和导入语句
CreateLoanApplication 实现
要求
清单 3. 第一个测试的代码
清单 4. 为了通过测试而需要向 sample_chaincode.go 添加的最少代码
清单 5. 向 sample_chaincode.go 添加另一段代码
清单 6. 向 sample_chaincode.go 添加另一段代码
清单 7. 将 CreateLoanApplication 方法添加到 sample_chaincode.go
清单 8. 添加针对验证错误的测试
清单 9. 为了通过测试而需要向 sample_chaincode.js 添加的最少量代码
清单 10. 一个揭示缺陷的新测试
清单 11. 重构 sample_chaincode.js 中的 CreateLoanApplication 代码
清单 12. 验证贷款申请是否已创建并写入区块链中的测试
清单 13. 将输入贷款申请存储到账本的代码
Invoke 方法实现
要求
清单 14. TestInvokeValidation 测试的代码段
清单 15. 为了通过测试而需要在 sample_chaincode.go 中的 Invoke 方法中包含的最少量代码
清单 16. TestInvokeValidation2 的代码段
清单 17. 重构 sample_chaincode.go 中的 Invoke 方法代码
清单 18. 测试要求 1 和要求 2 中列出的功能的代码
清单 19. 为了通过测试而需要向 sample_chaincode.go 中的 Invoke 方法添加的最少量代码
清单 20. TestInvokeFunctionValidation2 测试的代码
清单 21. 重构 sample_chaincode.go 中的 Invoke 方法
清单 22. 重构 TestInvokeFunctionValidation2 测试
测试非确定性函数
清单 23. CreateLoanApplication 函数的一个非确定性版本
清单 24. 测试某个方法是否是非确定性的
结束语
下载资源
相关主题
为基于 Hyperledger Fabric v0.6 的区块链网络开发客户端应用程序
为基于 Hyperledger Fabric v0.6 的区块链网络开发客户端应用程序
系列内容:
此内容是该系列 3 部分中的第 3 部分: 面向 Go 开发人员的链代码深入研究
前提条件
致 Java 开发人员
重要术语和概念
开始实践
在 Bluemix 上创建 IBM Blockchain 服务
在 Bluemix 上创建 Cloudant NoSQL DB 服务
下载样本代码包
部署样本链代码
代码包结构
区块链样本客户端
网络设置功能
设置
区块链网络设置
链对象的配置属性
加载区块链网络配置
区块链网络配置
使用功能
注册新用户
登记用户
创建抵押贷款申请
用于链代码调用的请求规范
调用部署在区块链上的链代码
从区块链获取抵押贷款申请
使用链代码查询区块链
订阅事件
Hyperledger Fabric Client SDK 的已知问题
结束语
下载资源
相关主题
通过业务规则让区块链智能合约更加智能
集成决策管理平台
Vehicle Lifecycle 样本
智能合约
包含 Hyperledger Fabric、Hyperledger Composer 和 IBM ODM 的区块链网络的拓扑结构
部署 Hyperledger Fabric 和 Hyperledger Composer
部署 IBM ODM Rule Execution Server
Hyperledger Composer 中的 Vehicle Lifecycle 数据模型
参与者示例
资产示例
交易示例
IBM ODM 中的 Vehicle Lifecycle 数据模型
所有权转移交易的生命周期
调用决策服务
实现决策逻辑
决策逻辑生命周期
决策逻辑管理和制约
结束语
致谢
相关主题
HyperLedger Fabric 1.0 智能合约开发-数字货币发行和管理
1.简介:
2.主要实现如下的功能:
3.主要函数
4.数据结构设计
5.接口设计
--最新消息
Hyperledger Fabric 1.1 发布,基于区块链的分布式账本
Measuring Blockchain Performance with Hyperledger Caliper
https://hyperledgercn.github.io/hyperledgerDocs/ Hyperledger 中文文档 欢迎阅读!!! 欢迎贡献!!! 简介 Hyperledger 国际化工作组是 Hyperledger 中国工作组(TWGC)下属的一个小组,主要负责相关文 档的中文编写和翻译,以及组织讨论、教育培训活动等。 目前小组有成员 100 余名,活跃贡献者 20 余名,已完成文章 30 余篇。 如何贡献 以前我们用 Hyperledger Wiki 管理文章,但 Wiki 读写操作有诸多不便,为此我们将文档转移到 github 上,以使大家更方便地阅读和编辑贡献资源。 使用 github 上后发现翻译内容校正不方便,不支持多种语言翻译,为此我们使用专翻译平台 Zanata。 贡献内容包括但不限于:文档翻译、知识总结、经验教训、好文链接、奇思妙想… 如果您不想作如下操作,可将直接内容邮件(见页面最下方)发送给工作组,我们为您发布 最新贡献方法请参考这里
词汇表 原文 作者 审核修正 原文 Linsheng Yu Baohua Yang Terminology is important, so that all Fabric users and developers agree on what we mean by each specific term. What is chaincode, for example. So we’ll point you there, whenever you want to reassure yourself. Of course, feel free to read the entire thing in one sitting if you like, it’s pretty enlightening! 专业术语很重要,所以所有”Fabric”项目用户和开发人员同意我们所说的每个特定术语的含义,举 个例子:如什么是链码,因此我们将引导你到术语说明,让你随时可以消除对术语理解的疑虑,当 然,如果你愿意的话可以自由的阅读整个文档,非常有启发! Anchor Peer - 锚节点 A peer node on a channel that all other peers can discover and communicate with. Each Member on a channel has an anchor peer (or multiple anchor peers to prevent single point of failure), allowing for peers belonging to different Members to discover all existing peers on a channel. 锚节点是通道中能被所有对等节点探测、并能与之进行通信的一种对等节点。通道中的每个成员都 有一个(或多个,以防单点故障)锚节点,允许属于不同成员身份的节点来发现通道中存在的其它 节点。 Block - 区块 An ordered set of transactions that is cryptographically linked to the preceding block(s) on a channel. 在一个通道上,(区块是)一组有序交易的集合。区块往往通过密码学手段(Hash 值)连接到前 导区块。 Zhu Jiang:区块是一组有序的交易集合,在通道中经过加密(哈希加密)后与前序区块连接。 Chain - 链
The ledger’s chain is a transaction log structured as hash-linked blocks of transactions. Peers receive blocks of transactions from the ordering service, mark the block’s transactions as valid or invalid based on endorsement policies and concurrency violations, and append the block to the hash chain on the peer’s file system. chain 就是 block 之间以 hash 连接为结构的交易日志。peer 从 order service 接收交易 block,并 根据背书策略和并发冲突标记 block 上的交易是否有效,然后将该 block 追加到 peer 文件系统中 的 hash chain 上。 Zhu Jiang:账本的链是一个交易区块经过“哈希连接”结构化的交易日志。对等节点从排序服务收到 交易区块,基于背书策略和并发冲突来标注区块的交易为有效或者无效状态,并且将区块追加到对 等节点文件系统的哈希链中。 Chaincode - 链码 Chaincode is software, running on a ledger, to encode assets and the transaction instructions (business logic) for modifying the assets. 链码是一个运行在账本上的软件,它可以对资产进行编码,其中的交易指令(或者叫业务逻辑)也 可以用来修改资产。 Channel - 通道 A channel is a private blockchain overlay on a Fabric network, allowing for data isolation and confidentiality. A channel-specific ledger is shared across the peers in the channel, and transacting parties must be properly authenticated to a channel in order to interact with it. Channels are defined by a Configuration-Block. 通道是构建在“Fabric”网络上的私有区块链,实现了数据的隔离和保密。通道特定的账本在通道中 是与所有对等节点共享的,并且交易方必须通过该通道的正确验证才能与账本进行交互。通道是由 一个“配置块”来定义的。 Commitment - 提交 Each Peer on a channel validates ordered blocks of transactions and then commits (writes- appends) the blocks to its replica of the channel Ledger. Peers also mark each transaction in each block as valid or invalid.
一个通道中的每个对等节点都会验证交易的有序区块,然后将区块提交(写或追加)至该通道上账 本的各个副本。对等节点也会标记每个区块中的每笔交易的状态是有效或者无效。 Concurrency Control Version Check - 并发控制版本检查 (CCVC) Concurrency Control Version Check is a method of keeping state in sync across peers on a channel. Peers execute transactions in parallel, and before commitment to the ledger, peers check that the data read at execution time has not changed. If the data read for the transaction has changed between execution time and commitment time, then a Concurrency Control Version Check violation has occurred, and the transaction is marked as invalid on the ledger and values are not updated in the state database. CCVC 是保持通道中各对等节点间状态同步的一种方法。对等节点并行的执行交易,在交易提交至 账本之前,对等节点会检查交易在执行期间读到的数据是否被修改。如果读取的数据在执行和提交 之间被改变,就会引发 CCVC 冲突,该交易就会在账本中被标记为无效,而且值不会更新到状态 数据库中。 Configuration Block - 配置区块 Contains the configuration data defining members and policies for a system chain (ordering service) or channel. Any configuration modifications to a channel or overall network (e.g. a member leaving or joining) will result in a new configuration block being appended to the appropriate chain. This block will contain the contents of the genesis block, plus the delta. 包含为系统链(排序服务)或通道定义成员和策略的配置数据。对某个通道或整个网络的配置修改 (比如,成员离开或加入)都将导致生成一个新的配置区块并追加到适当的链上。这个配置区块会 包含创始区块的内容加上增量。 Consensus - 共识 A broader term overarching the entire transactional flow, which serves to generate an agreement on the order and to confirm the correctness of the set of transactions constituting a block. 共识是贯穿整个交易流程的广义术语,其用于产生一个对于排序的同意书和确认构成区块的交易集 的正确性。
Current State - 当前状态 The current state of the ledger represents the latest values for all keys ever included in its chain transaction log. Peers commit the latest values to ledger current state for each valid transaction included in a processed block. Since current state represents all latest key values known to the channel, it is sometimes referred to as World State. Chaincode executes transaction proposals against current state data. ledger 的 current state 表示其 chain 交易 log 中所有 key 的最新值。peer 会将处理过的 block 中的 每个交易对应的修改 value 提交到 ledger 的 current state,由于 current state 表示 channel 所知的 所有最新的 k-v,所以 current state 也被称为 World State。Chaincode 执行交易 proposal 就是针 对的 current state。 Dynamic Membership - 动态成员 Fabric supports the addition-removal of members, peers, and ordering service nodes, without compromising the operationality of the overall network. Dynamic membership is critical when business relationships adjust and entities need to be added-removed for various reasons. Fabric 支持动态添加-移除 members、peers 和 ordering 服务节点,而不会影响整个网络的操作 性。当业务关系调整或因各种原因需添加-移除实体时,Dynamic Membership 至关重要。 Endorsement - 背书 Refers to the process where specific peer nodes execute a transaction and return a YES- NO response to the client application that generated the transaction proposal. Chaincode applications have corresponding endorsement policies, in which the endorsing peers are specified. Endorsement 是指一个 peer 执行一个交易并返回 YES-NO 给生成交易 proposal 的 client app 的过 程。chaincode 具有相应的 endorsement policies,其中指定了 endorsing peer。 Endorsement policy - 背书策略 Defines the peer nodes on a channel that must execute transactions attached to a specific chaincode application, and the required combination of responses (endorsements). A policy
could require that a transaction be endorsed by a minimum number of endorsing peers, a minimum percentage of endorsing peers, or by all endorsing peers that are assigned to a specific chaincode application. Policies can be curated based on the application and the desired level of resilience against misbehavior (deliberate or not) by the endorsing peers. A distinct endorsement policy for install and instantiate transactions is also required. Endorsement policy 定义了依赖于特定 chaincode 执行交易的 channel 上的 peer 和响应结果 (endorsements)的必要组合条件(即返回 Yes 或 No 的条件)。Endorsement policy 可指定对 于某一 chaincode,可以对交易背书的最小背书节点数或者最小背书节点百分比。背书策略由背书 节点基于应用程序和对抵御不良行为的期望水平来组织管理。在 install 和 instantiate Chaincode (deploy tx)时需要指定背书策略。 Fabric-ca Fabric-ca is the default Certificate Authority component, which issues PKI-based certificates to network member organizations and their users. The CA issues one root certificate (rootCert) to each member, one enrollment certificate (eCert) to each authorized user, and a number of transaction certificates (tCerts) for each eCert. Fabric-ca 是默认的证书管理组件,它向网络成员及其用户颁发基于 PKI 的证书。CA 为每个成员 颁发一个根证书(rootCert),为每个授权用户颁发一个注册证书(eCert),为每个注册证书颁发 大量交易证书(tCerts)。 Genesis Block - 初始区块 The configuration block that initializes a blockchain network or channel, and also serves as the first block on a chain. Genesis Block 是初始化区块链网络或 channel 的配置区块,也是链上的第一个区块。 Gossip Protocol - Gossip 协议 The gossip data dissemination protocol performs three functions: 1) manages peer discovery and channel membership; 2) disseminates ledger data across all peers on the channel; 3) syncs ledger state across all peers on the channel. Refer to the Gossip topic for more details.
Gossip 数据传输协议有三项功能:1)管理 peer 发现和 channel 成员;2)channel 上的所有 peer 间广播账本数据;3)channel 上的所有 peer 间同步账本数据。 Initialize - 初始化 A method to initialize a chaincode application. 一个初始化 chaincode 程序的方法。 Install - 安装 The process of placing a chaincode on a peer’s file system. 将 chaincode 放到 peer 的文件系统的过程。(译注:即将ChaincodeDeploymentSpec 信息存到 chaincodeInstallPath-chaincodeName.chainVersion 文件中) Instantiate - 实例化 The process of starting a chaincode container. 启动 chaincode 容器的过程。(译注:在lccc 中将ChaincodeData 保存到state 中,然后deploy Chaincode 并执行Init 方法) Invoke - 调用 Used to call chaincode functions. Invocations are captured as transaction proposals, which then pass through a modular flow of endorsement, ordering, validation, committal. The structure of invoke is a function and an array of arguments. 用于调用 chaincode 内的函数。Chaincode invoke 就是一个交易 proposal,然后执行模块化的流 程(背书、共识、 验证、 提交)。invoke 的结构就是一个函数和一个参数数组。 Leading Peer - 主导节点 Each Member can own multiple peers on each channel that it subscribes to. One of these peers is serves as the leading peer for the channel, in order to communicate with the network ordering
service on behalf of the member. The ordering service “delivers” blocks to the leading peer(s) on a channel, who then distribute them to other peers within the same member cluster. 每一个 Member 在其订阅的 channel 上可以拥有多个 peer,其中一个 peer 会作为 channel 的 leading peer 代表该 Member 与 ordering service 通信。ordering service 将 block 传递给 leading peer,该 peer 再将此 block 分发给同一 member 下的其他 peer。 Ledger - 账本 A ledger is a channel’s chain and current state data which is maintained by each peer on the channel. Ledger 是个 channel 的 chain 和由 channel 中每个 peer 维护的 world state。(这个解释有点怪) Member - 成员 A legally separate entity that owns a unique root certificate for the network. Network components such as peer nodes and application clients will be linked to a member. 拥有网络唯一根证书的合法独立实体。像 peer 节点和 app client 这样的网络组件会链接到一个 Member。 Membership Service Provider - MSP The Membership Service Provider (MSP) refers to an abstract component of the system that provides credentials to clients, and peers for them to participate in a Hyperledger Fabric network. Clients use these credentials to authenticate their transactions, and peers use these credentials to authenticate transaction processing results (endorsements). While strongly connected to the transaction processing components of the systems, this interface aims to have membership services components defined, in such a way that alternate implementations of this can be smoothly plugged in without modifying the core of transaction processing components of the system. MSP 是指为 client 和 peer 提供证书的系统抽象组件。Client 用证书来认证他们的交易;peer 用证 书认证其交易背书。该接口与系统的交易处理组件密切相关,旨在使已定义的成员身份服务组件以 这种方式顺利插入而不会修改系统的交易处理组件的核心。
分享到:
收藏