1_Introduction

Hyperledger Fabric is a platform for distributed ledger solutions underpinned by a modular architecture delivering high degrees of confidentiality, resiliency, flexibility, and scalability. It is designed to support pluggable implementations of different components and accommodate the complexity and intricacies that exist across the economic ecosystem.

We recommend first-time users begin by going through the rest of the introduction below in order to gain familiarity with how blockchains work and with the specific features and components of Hyperledger Fabric.

Once comfortable — or if you’re already familiar with blockchain and Hyperledger Fabric — go to Getting Started and from there explore the demos, technical specifications, APIs, etc.

What is a Blockchain?

A Distributed Ledger

At the heart of a blockchain network is a distributed ledger that records all the transactions that take place on the network.

区块链网络的核心是一个记录了所有发生在网络的交易的分布式账本distributed ledger

区块链账本ledger通常被描述为去中心化,因为它在许多网络参与者之间进行复制,每个参与者在维护过程中相互协作。

我们将看到,权力下放和协作是反映企业在现实世界中交换商品和服务的强大属性。

In addition to being decentralized and collaborative, the information recorded to a blockchain is append-only, using cryptographic techniques that guarantee that once a transaction has been added to the ledger it cannot be modified.

这种“不变性”的特性使得确定信息来源变得简单,因为参与者可以确定信息在事后没有被改变。这就是为什么区块链有时被描述为证据系统systems of proof

智能合约

为了支持信息的一致更新 —并启用一整套账本功能(transacting, querying, etc) — a blockchain network uses smart contracts to provide controlled access(受控访问) to the ledger.

智能合约对账本进行操作,比如交易,更新之类的

Smart contracts are not only a key mechanism for encapsulating information and keeping it simple across the network, they can also be written to allow participants to execute certain aspects of transactions automatically.

智能合约不仅是在网络上封装信息并保持信息简单的关键机制,还可以编写智能合约,允许参与者自动执行交易的某些方面。

例如,可以编写一个智能合同来规定一个项目的运输成本,其中运费根据项目到达的速度而变化。根据双方同意的条款并写入账本,相应的资金在收到项目时自动转手。

共识

共识是一个保持账本交易在网络上同步的过程— 确保账本只有在交易得到适当参与者的批准时才更新,当账本确实更新时, they update with the same transactions in the same order — is called consensus.

You’ll learn a lot more about ledgers, smart contracts and consensus later.

目前,将区块链视为一个共享、复制的交易系统就足够了,它通过智能合约进行更新,并通过一个叫做共识的协作过程保持一致的同步

Why is a Blockchain useful?

Today’s Systems of Record

今天的记录系统

今天的transactional networks的交易方式相较于最原始的business records所使用的交易方式并没有太大的更新。商业网络中的成员彼此进行交易,但他们各自保留各自的交易记录。他们交易的东西——无论是16世纪的佛兰芒挂毯还是今天的证券——每次出售都必须确定出处,以确保销售物品的企业拥有一系列证明其所有权的所有权。

剩下的就是这样一个商业网络:

现代科技已经将这一过程从石板、文件夹到硬盘和云平台,但底层结构是一样的。

目前还没有统一的网络参与者身份管理系统, 交易的溯源要花费很多时间精力,所以 清点证券的交易要花费很长时间(全球范围内将会耗费数以万计的美金),

此外合同的签署与执行必须由人工进行确认, 系统中的每个数据库都包含独一无二的的信息,这将导致单点故障的发生( a single point of failure.).

在当今信息和流程共享的支离破碎的方法下,构建一个跨越业务网络的记录系统是不可能的,尽管可见性和信任的需求是明确的。

区块链差异

What if, instead of the rat’s nest of inefficiencies represented by the “modern” system of transactions, business networks had standard methods for establishing identity on the network, executing transactions, and storing data? 如果可以通过查看交易清单来确定资产的出处,而这些交易一旦被写入,就不能更改,因此可以信任吗?

商业网络看起来更像这样:

这是一个区块链网络,每个参与者都有自己复制的 ledger副本。除了账本信息被共享,更新账本的过程也被共享。与今天参与者的私有程序用于更新他们的私有账本不一样的是,区块链系统有共享程序来更新共享账本。

通过共享账本协调业务网络的能力,区块链网络可以减少与私有信息和处理相关的时间、成本和风险,同时提高信任和可见性。

你现在知道什么是区块链以及它为什么有用。还有很多其他重要的细节,但它们都与信息和流程共享的这些基本思想有关。

什么是Hyperledger Fabric?

Linux基金会于2015年创建了Hyperledger项目,以推进跨行业区块链技术。它不是宣布一个单一的区块链标准,而是鼓励通过一个社区进程,以一种合作的方式开发区块链技术,拥有知识产权,鼓励开放式开发,并随着时间的推移采用关键标准。

Hyperledger Fabric是Hyperledger中的区块链项目之一。与其他区块链技术一样,它有一个账本,使用智能合约,是参与者管理其交易的系统。

Hyperledger Fabric与其他一些区块链系统的不同之处在于它是私有( private )的,是经过许可(permissioned)的。超级账本结构网络的成员通过受信任的成员服务提供商(MSP)注册,而不是允许未知身份参与网络的开放式无许可系统(需要“工作证明”之类的协议来验证交易并保护网络安全)。

Hyperledger Fabric还提供多种可插拔选项。账本数据可以多种格式存储,共识机制可以交换进出,并且支持不同的MSP。

Hyperledger Fabric还提供了创建通道( create channels)的功能,允许一组参与者创建一个单独的交易账本(a separate ledger of transactions.)。

对于某些参与者可能是竞争对手的网络来说,这是一个特别重要的选择,而不是希望他们所做的每一笔交易——例如,他们向某些参与者而不是其他参与者提供的特殊价格——为每个参与者所知。如果两个参与者组成一个通道,那么这些参与者(而不是其他参与者)拥有该通道的账本副本。

Shared Ledger共享账本

Hyperledger Fabric has a ledger subsystem comprising two components:

  1. the world state 世界状态
  2. the transaction log 交易日志

Each participant has a copy of the ledger to every Hyperledger Fabric network they belong to.

世界状态(world state)部分描述账本在给定时间点的状态。It’s the database of the ledger.

The transaction log component records all transactions which have resulted in the current value of the world state; it’s the update history for the world state.

transaction log部分记录了导致当前world state取值的所有交易。他是世界状态的更新历史记录

The ledger, then, is a combination of the world state database and the transaction log history.

The ledger has a replaceable data store for the world state. By default, this is a LevelDB key-value store database.

The transaction log does not need to be pluggable. It simply records the before and after values of the ledger database being used by the blockchain network.

交易日志不需要是可插拔的。它只是记录区块链网络使用的账本数据库的前后值。

Smart Contracts

超级账本架构智能合约是用链码(chaincode)编写的,当区块链的外部的应用(external application )程序需要与ledger交互时,该应用程序会调用(invoke)该合约。In most cases, chaincode interacts only with the database component of the ledger, the world state (querying it, for example), and not the transaction log.

Chaincode can be implemented in several programming languages. Currently, Go and Node are supported.

Privacy

Depending on the needs of a network, participants in a Business-to-Business (B2B) network might be extremely sensitive about how much information they share. For other networks, privacy will not be a top concern.

Hyperledger Fabric supports networks where privacy (using channels) is a key operational requirement as well as networks that are comparatively open.

Fabric的网络是相对开放的

Consensus

Transactions必须按一定的顺序写入 ledger,即使它们可能是在网络中不同的participants之间进行的。要做到这一点,必须确立transactions的顺序,并制定一种方法,以拒绝错误(或恶意)的交易被写入账本。

这是计算机科学的一个深入研究的领域,实现它有很多种方法,每种方法都有不同的取舍。例如,PBFT(实用的拜占庭容错)可以提供一种机制,使文件副本彼此通信,以保持每个副本的一致性,即使在损坏的情况下也是如此。或者,在比特币中,排序是通过一个叫做挖掘的过程进行的,在这个过程中,竞争的计算机竞相解决一个密码难题,这个谜题定义了所有进程随后建立的顺序。

Hyperledger Fabric的设计允许网络的创建者选择一种consensus mechanism,这个consensus mechanism最能够代表现存 participants之间的关系。与隐私一样,也有一系列的需求;从关系高度结构化的网络到更为对等的网络。

As with privacy, there is a spectrum of needs; from networks that are highly structured in their relationships to those that are more peer-to-peer.

posted @ 2021-01-09 22:07  TR_Goldfish  阅读(143)  评论(0编辑  收藏  举报