Members

Введение: что такое Hyperledger Fabric

Hyperledger Fabric — относительно новая бизнес блок-схема. Hyperledger Fabric имеет несколько отличительных характеристик по сравнению с другими современными моделями блокчейна; являются ли эти характеристики преимуществами или недостатками, часто зависит от контекста.

Hyperledger Fabric — это лучший фреймворк для разработки приложений и специализированных бизнес-решений на основе блокчейна.

Необходимо отметить, чтобы соответствовать современным требованиям бизнеса организация IBM присоединилась к другим компаниям для совместной разработки открытой исходной, готовой к производству, бизнес-блок-схемы, называемой Hyperledger Fabric, одного из восьми проектов Hyperledger, организованных The Linux Foundation.Hyperledger Fabric поддерживает распределенные регистровые решения в децентрализованных сетях для широкого круга отраслей. Его модульная архитектура максимизирует конфиденциальность, гибкость и легкость решений blockchain.В Hyperledger Fabric v1.0 участвовало 159 инженеров из 27 организаций.

Одной из особенностей Hyperledger является принципиальный отказ от создания собственных криптоактивов. Участники Hyperledger развивают проекты сугубо как информационную технологию.

В рамках работы в консорциуме IBM и создала блокчейн-фреймворк Hyperledger Fabric (изначально проект назывался OBC — Open Blockchain). Первая версия HLF, под номером 0.6.0, появилась осенью 2016 года. 1 июля 2017 вышла первая производственная версия — Hyperledger Fabric 1.0.

Постоянность сети

Децентрализованная среда представляет собой упорядоченную запись информации для приложения blockchain. Каждая транзакция приводит к набору ключа-значения, который привязан к регистру. Он может быть создан, обновлен или удален. Неизменяемый источник доверия для v1.0 добавляется в файловую систему узла, который также имеет встроенный модуль LevelDB.

LevelDB имеет по умолчанию базовую основу данных и поддерживает ключевые запросы, составные ключевые запросы и запросы диапазона ключей. Если вам нужны сложные, насыщенные запросы, CouchDB поможет вам и поддержит базовые возможности LevelDB, добавляя полные запросы, богатые данными запросы. При наличии дополнительной поддержки базы данных документов, такой как CouchDB, контент JSON становится полностью запрашиваемый, модель данных совместима с существующей моделью программирования ключей / значений. В результате всего этого изменение приложения не требуются при моделировании данных кодового кода как в JSON при использовании CouchDB.

Этот формат JSON помогает минимизировать работу, необходимую для создания простых отчетов и выполнения функций аудита. Например, в сценариях цепочки поставок вы можете использовать стиль документа JSON, чтобы отображать конкретные данные для товаров и транспортных объектов. Вы можете легко подготовить отчет о товарах для разных местоположений и транспортных объектов, которые были использованы при доставке в конечный пункт назначения товара.

Blocks¶

Let’s have a closer look at the structure of a block. It consists of three
sections

  • Block Header

    This section comprises three fields, written when a block is created.

    • Block number: An integer starting at 0 (the genesis block), and
      increased by 1 for every new block appended to the blockchain.
    • Current Block Hash: The hash of all the transactions contained in the
      current block.
    • Previous Block Header Hash: The hash from the previous block header.

    These fields are internally derived by cryptographically hashing the block
    data. They ensure that each and every block is inextricably linked to its
    neighbour, leading to an immutable ledger.

    Block header details. The header H2
    of block B2 consists of block number 2, the hash CH2 of the current block data
    D2, and the hash of the prior block header H1.

Block Data
This section contains a list of transactions arranged in order. It is written
when the block is created by the ordering service. These transactions have a
rich but straightforward structure, which we describe later
in this topic.

Sextant for Sawtooth/Sextant for DAML

We built Sextant, a management platform that enables enterprises to unlock the value of blockchain and smart contracts for business. Sextant accelerates innovation by providing enterprises with a platform that they can build upon, ensuring that they focus on business application development, not blockchain or smart contract infrastructure.

Sextant for Sawtooth delivers one-click deployment of Hyperledger Sawtooth on cloud, hybrid cloud or on premises.

DAML, created and open sourced by Digital Asset, is the leading smart contract language for multi-party business processes.

Sextant for DAML, developed in partnership with Digital Asset, delivers one-click deployment of DAML on Hyperledger Besu, Hyperledger Sawtooth, Amazon Aurora and Amazon QLDB.

Who are the consumers/users of your app, product or project?
Enterprises and SMEs who seek to capture the competitive advantages of blockchain and smart contracts.

What business or technology benefit do your users get by using your app, product or project?

  • Get to market faster with a platform that enables enterprises and SMEs to focus on business value led application development, not complex blockchain and smart contract infrastructure.
  • BTP’s bullet proof distribution of Hyperledger Sawtooth, BTP Paralos, tried, tested and accepted by enterprises for mission critical systems.
  • Enterprise-grade subscription SLAs for production use cases.

Which Hyperledger projects are you working with?

   

What were the most compelling features of Hyperledger technologies for this project?

Hyperledger Sawtooth

  • First class support for DAML smart contracts
  • Pluggable consensus mechanism
  • Scalable and highly modular architecture
  • Clear separation between the network and the application tiers

Hyperledger Besu

  • Enterprise-friendly public and permissioned network
  • Client for public Ethereum mainnet
  • Support for IBFT consensus consistent with our requirements

How far along is the project?.
In Production

Where is your solution deployed?
Cloud – Public
Cloud – Hybrid
On Prem

Read More

  • blockchaintp.com/sextant/
  • blockchaintp.com/sextant/sawtooth
  • blockchaintp.com/sextant/daml
  • BTP delivers Paralos – the first long term support (LTS) release of its Hyperledger Sawtooth distribution (April 29, 2020)
  • Blockchain Technology Partners & Digital Asset join forces to launch Sextant for DAML (451 Research, November 15 2019)
  • Digital Asset and BTP deliver Sextant for DAML and support nanotechnology pioneer Quantum Materials Corp (November 7 2019)
  • Digital Asset and Blockchain Technology Partners to deliver DAML Smart Contracts for Hyperledger Sawtooth (April 16 2019)
  • Digital Asset announces DAML Partner Integrations with Hyperledger Fabric, R3’s Corda and Amazon Aurora (June 18 2019)
  • Blockchain Technology Partners launches Sextant on AWS Marketplace for Containers at re:Invent (November 27 2018)
  • When Hyperledger Sawtooth Met Kubernetes – Simplifying Enterprise Blockchain Adoption (Hyperledger, May 10 2019)

Transaction Flow (Step 5)

The committing peer validates the transaction by checking to make sure that the RW sets still match the current world state. Specifically, that the Read data that existed when the endorsers simulated the transaction is identical to the current world state. When the committing peer validates the transaction, the transaction is written to the ledger, and the world state is updated with the Write data from the RW Set.

If the transaction fails, that is, if the committing peer finds that the RW set does not match the current world state, the transaction ordered into a block will still be included in that block, but it will be marked as invalid, and the world state will not be updated.

Committing peers are responsible for adding blocks of transactions to the shared ledger and updating the world state. They may hold smart contracts, but it is not a requirement.

Architecture [Client-Server vs. Peer — Peer]

Historically, most applications utilize a central server (or servers). For one user/client to send a message to another user/client in the network, the request has to be sent to the hub or a central server, which then directs it to the right computer.

Peer-to-peer (P2P) networks were first made popular by Napster (and later BitTorrent) and consist of computer systems which are directly connected to each other via the Internet, without a central server. Peers contribute to the computing power and storage that is required for the upkeep of the network. P2P networks are generally considered to be more secure than centralized networks, as they do not have a single point of attack.

Пример Hyperledger Fabric

Предположим, есть производитель, который хочет отгружать шоколад определенному розничному продавцу или рынку розничных продавцов (то есть всем розничным продавцам США) по определенной цене, но не хочет раскрывать эту цену на других рынках (например, китайских розничных продавцах).

Поскольку в перемещении продукта могут участвовать другие стороны, такие как таможня, транспортная компания и финансовый банк, частная цена может быть раскрыта всем участвующим сторонам, если для поддержки этой транзакции используется базовая версия технологии блокчейн.

Hyperledger Fabric решает эту проблему, сохраняя конфиденциальность частных транзакций в сети; только участники, которым необходимо знать, осведомлены о необходимых деталях. Разделение данных в цепочке блоков позволяет конкретным точкам данных быть доступными только тем сторонам, которым это необходимо.

Организационная структура Hyperledger

По сути, Hyperledger – это не организация, криптовалютная сеть или блокчейн-система. Он не поддерживает криптовалюту, такую ​​как биткойн, но работает, предоставляя необходимую инфраструктуру и стандарты для разработки различных систем и приложений на основе блокчейнов для промышленного использования. Думайте о Hyperledger как о хабе, где под его эгидой работают различные индивидуальные проекты и инструменты на основе блокчейнов, которые придерживаются определенной философии дизайна.

Различные проекты включают в себя следующее:

  • Hyperledger Fabric – платформа для создания различных продуктов, решений и приложений на основе блокчейн для использования в бизнесе.
  • Hyperledger Composer – набор инструментов, который позволяет пользователям легко создавать, тестировать и управлять собственной цепочкой блоков.
  • Hyperledger Cello – позволяет использовать блокчейн с помощью модели развертывания по запросу «как услуга» (Blockchain-as-a-Service)
  • Hyperledger Explorer – утилита приборной панели, которая позволяет отслеживать, искать и поддерживать разработки блокчейна и связанные данные.
  • Hyperledger Burrow – авторизованный узел блокчейна смарт-контрактов Ethereum, который обрабатывает транзакции и выполняет код смарт-контрактов на виртуальной машине Ethereum (EVM)
  • Hyperledger Sawtooth – разрешенная модульная блокчейн-платформа корпоративного уровня, в которой используется инновационный алгоритм консенсуса Proof of Elapsed Time.
  • Hyperledger Caliper – инструмент тестирования блокчейна, который используется для оценки производительности конкретной реализации блокчейна.

Все такие проекты под зонтиком Hyperledger следуют методологии проектирования, которая поддерживает модульный и расширяемый подход, функциональную совместимость и функции безопасности. Проекты остаются независимыми от определенного токена или криптовалюты, хотя пользователь может создать его по мере необходимости.

Adding another peer¶

Now that organization R3 is able to fully participate in channel C2, let’s add
its infrastructure components to the channel. Rather than do this one component
at a time, we’re going to add a peer, its local copy of a ledger, a smart
contract and a client application all at once!

Let’s see the network with organization R3’s components added:

The diagram shows the facts relating to channels C1 and C2 in the network N as
follows: Client applications A1 and A2 can use channel C1 for communication
with peers P1 and P2, and ordering service O4; client applications A3 can use
channel C2 for communication with peer P3 and ordering service O4. Ordering
service O4 can make use of the communication services of channels C1 and C2.
Channel configuration CC1 applies to channel C1, CC2 applies to channel C2.

First of all, notice that because peer node P3 is connected to channel C2, it
has a different ledger – L2 – to those peer nodes using channel C1. The
ledger L2 is effectively scoped to channel C2. The ledger L1 is completely
separate; it is scoped to channel C1. This makes sense – the purpose of the
channel C2 is to provide private communications between the members of the
consortium X2, and the ledger L2 is the private store for their transactions.

In a similar way, the smart contract S6, installed on peer node P3, and defined
on channel C2, is used to provide controlled access to ledger L2. Application A3
can now use channel C2 to invoke the services provided by smart contract S6 to
generate transactions that can be accepted onto every copy of the ledger L2 in
the network.

The importance of open source and the community

Behind every great open source technology, sits a strong community. The Hyperledger Fabric community has continuously improved the security, usability, robustness, performance and feature set — all qualities that are of critical importance to enterprise users. IBM is proud to be amongst the leaders that helped shape Hyperledger Fabric’s evolution based on the vast experience and insights we gained from the hundreds of deployed IBM Blockchain Platform networks.

Of course, IBM was not alone! The Hyperledger Fabric development community is comprised of many world class technology providers and individual contributors, all collaborating to evolve blockchain technologies at record pace. Due to the diverse ecosystem, it supports the foundation for innovation, quality, and quick delivery that only open source can provide.

Given that blockchain is such a foundational technology, one that is poised to transform and optimize the way the world transacts, it only makes sense for the technology to be open and for a variety of contributors to be involved.

What Is a Smart Contract?

First coined by Nick Szabo in 1994, smart contracts automate transactions on a blockchain. They work according to the ‘if this then that’ formula. A simple analogy would be the operation of a vending machine.

How do vending machines work? A consumer places money into the machine, then the machine dispenses the specific item chosen by the consumer. So, following the ‘if this then that’ formula, if a consumer places money into a vending machine and chooses their desired item (if this), then the machine dispenses the item the consumer chose (then that).

On a deeper level, this technology can be used for many types of transactions. Say, someone is trying to rent an apartment. Both a tenant and a landlord develop a smart contract which outlines the following: the first portion of the rent must be paid within ten days. Upon payment, the landlord must provide the tenant with a key code to access the apartment within five days.

So, let’s say the tenant provides the first portion of payment within the ten-day limit, but the landlord forgets or refuses to provide the key code. Then the funds in the smart contract are automatically returned to the tenant after the landlord has failed to provide the key code.

Hyperledger Burrow: Events and Training

Currently, The Linux Foundation and its partners host many Hyperledger events throughout the year. They often feature a group of industry leaders currently utilizing Hyperledger technology. Although most events cover all the aspects of Hyperledger, from Fabric to Indy, they often have many sections purely dedicated to Hyperledger Burrow.

Hyperledger Global Forum

In December 2018 Hyperledger conducted the first Hyperledger Global Forum, a four-day event dedicated to all things Hyperledger. At the forum, multiple keynotes were given discussing the Hyperledger blockchain and its potential effects for the future.

Also included were various keynotes specifically focused on Hyperledger Burrow, including a Burrow Workshop ran by Casey Kuhlman and Silas Davis of Monax, in addition to a bunch of others given by notable users of the Hyperledger Burrow technology. Silas Davis is the maintainer of Hyperledger Burrow, so a workshop with him would be similar to a Windows workshop with Bill Gates.

At the moment, there is no word as to whether The Linux Foundation will be conducting another forum next year, but considering how successful the first one was, it can be assumed that another will be held in December 2019.

Hyperledger Training

Hyperledger offers a range of resources for all Hyperledger projects on its website. Two free resources revolve primarily around the importance of blockchain, its eventual impact on the society, and how to build a blockchain of your own.

It also partners with many blockchain industry leaders to create more specific courses in collaboration with them. Their courses typically feature presentations, webinars, videos, sample codes, which allows for self-paced training paired with contacting competent instructors.

Hyperledger also organizes their own bootcamps aimed to inform both amateur and veteran users about the various aspects of Hyperledger Burrow.

Improved usability and security with Hyperledger Fabric 2.0

The Linux Foundation launched Hyperledger Fabric 2.0, which introduced major improvements on usability and security including:

  • External chaincode launcher (Eliminating the Docker daemon dependency)
  • Decentralized governance for smart contracts
  • Private data enhancements
  • Improved performance

IBM Blockchain Platform will support Hyperledger Fabric 2.0 and continue to add additional capabilities around the new decentralized smart contract lifecycle management and other new improvements. In addition, the platform will allow the user to choose which version of Fabric to deploy and to migrate from one version to another. These features will be key for the adoption and use of Hyperledger Fabric 2.0.

Accenture

“Distributed Ledger Technology will unlock the full ‘digital’ potential of capital markets and the wider financial services industry by enabling a shift away from the current reconciliation based systems that are very expensive and highly inefficient,” said David Treat, Managing Director, Financial Services at Accenture. “Key to that journey is to have standards and shared platforms that are utilized across industry participants. The open ledger project is a great step forward in that process and we are thrilled to be a part of it.”

David Treat, Managing Director, Financial Services at Accenture

Производительность, масштабируемость и уровень доверия

Hyperledger Fabric построен на модульной архитектуре, которая делит обработку транзакций на три этапа: распределенную логическую обработку и соглашение («цепочный код»), упорядочение транзакций, а также на проверку и подтверждение транзакций. Такое разделение дает несколько преимуществ: для типов узлов требуется меньшее количество уровней доверия и верификации, а децентрализация сети и производительность оптимизированы.

В структуре Hyperledger Fabric транзакции обрабатываются то совершенно иначе, чем в других структурах

Основное внимание здесь уделяется уменьшению уровней доверия и количеству проверок, которые должна иметь транзакция. Это позволяет совершать транзакции быстрее и эффективно

Чтобы проиллюстрировать это, рассмотрим поток транзакций в версии 1.0 Hyperledger Fabric, показанный на рисунке ниже.

Начиная слева от рисунка:

  1. Предложение о транзакции отправляется заявкой на одобряющий одноранговый узел.
  2. В правилах одобрения указано, сколько и / или какая комбинация подтверждений требуется для подписи заявки. Подтверждение выполняет цепочный код для имитации предложения в сетевом одноранговом узле, создавая набор для чтения / записи.
  3. Затем подтверждающие узлы отправляют обратно одобрения в заявку.
  4. Приложение отправляет транзакции и подписи в службу заказа.
  5. Служба заказов создает пакет или блокирует транзакции и доставляет их для совершения узлов.
  6. Когда получающий одноранговый узел получает пакет транзакций, для каждой транзакции он проверяет, была ли выполнена политика одобрения, проверки в наборах чтения / записи обнаруживают конфликтующие транзакции.
  7. Если обе проверки пройдены, блок фиксируется в регистре, а обновления состояния для каждой транзакции отражаются в базе данных состояния.

Поскольку в сети с новой архитектурой v1.0 отправляются только сигнатуры и набор для чтения / записи, оптимизируются масштабируемость и производительность. Кроме того, поскольку только подтверждения и узлы действительно видят транзакцию, требуется меньшее количество уровней доверия в разных частях системы Blockchain, что обеспечивает большую безопасность.

Например, на фондовом рынке с ценными бумагами, обеспеченными активами или купленными и продаваемыми облигациями, объем сделок увеличился из-за растущего числа участников. Для увеличения количества транзакций в блокчейн системе требуется улучшенная масштабируемость и производительность, что и v1.0 от Hyperledger Fabric частично объясняется расщеплением выполнения цепочки.

Разделение выполнения цепочки также обеспечивает динамический рост в сети. В версии 1.0 Hyperledger Fabric узлы могут добавляться динамически и программно, а не статически, как в v0.6. Например, предположим, что компания, которая управляет валютными курсами, имеет новый банк для добавления в сеть. С Hyperledger Fabric v1.0 они могут сделать это программно, что увеличивает эффективность структуры.

SIMBA Chain

“We are excited to join Hyperledger, a premier development framework for enterprise blockchain solutions, and be part of a community comprising so many premier organizations exploring collaborative models for blockchain technologies. SIMBA’s roots go back to one of DARPA’s first blockchain contracts, so we have a long-standing focus on working with small and large enterprises, governments and other organizations to bring practical use-cases to full realization. With our platform’s recent support for Hyperledger, we believe now is a great time to join and help bring the community forward.”

Joel Neidig, CEO at SIBMA Chain

Poste Italiane

“Blockchain is not just a buzzword or a myth anymore, but is becoming the foundation for establishing a distributed, transparent and cross-industry interoperable ecosystem, Poste Italiane wants to actively participate in this new and exciting community by becoming a member of Hyperledger in order to continue its path for the innovation and modernization of financial, logistic and insurance industries. We really look forward to working with other members and making our effort to contribute for the enhancement of blockchain technology.”

Mirko Mischiatti, Chief Information Officer, Poste Italiane

Новый подход¶

Fabric представляет новую архитектуру для транзакций, которую мы называем execute-order-validate (выполнить-упорядочить-валидировать). Она решает проблемы гибкости, масштабируемости, производительности и конфиденциальности, присутствующие в архитектуре order-execute, разбивая транзакционный поток на три шага:

  • выполнить транзакцию и проверить ее корректность, запросив ее подтверждение
  • упорядочить транзакции с помощью (сменного) консенсус-протокола, и
  • валидировать транзакции через определенную для каждого типа транзакций политику подтверждения (endorsement policy), прежде чем занести их в реестр.

Такой дизайн радикально отличается от парадигмы order-execute в том, что Fabric выполняет транзакции до определения их конечного порядка.

Фреймворки

  • Fabric применяет модульный подход к разработке, так программист может выбрать подходящие элементы под каждую задачу. Особенность сетей на Fabric заключается в том, что каждый участник должен пройти регистрацию. Компания-разработчик в дальнейшем может ограничить доступ к отдельным частям сети по идентификатору участника.
  • Indy используется для разработки общедоступных сетей и цифровых идентификаторов.
  • Burrow SDK подходит для создания блокчейна, поддерживающего работу с умными контрактами, написанными в экосистеме Эфириума и на WebAssembly. Фреймворк оптимизирован для работы с публичными сетями и PoS-алгоритмом консенсуса, но может также использоваться в работе частных сетей.
  • Sawtooth применяется для управления распределёнными реестрами. Фреймворк поддерживает несколько алгоритмов консенсуса. Sawtooth упрощает разработку приложений за счёт отделения ядра системы от домена приложения. Так разработчики могут устанавливать условия, подходящие для их приложения, без необходимости знать базовый язык системы.
  • Iroha используется для создания мобильных приложений, интеграции блокчейна в работающую инфраструктуру или IoT-устройства. 

What’s next?

As hinted, we continue to work on various aspects of performance as we continue our cadence of quarterly releases of Hyperledger Fabric. This next release cycle will focus on the Raft consensus mentioned above, but we will also be making an alpha release of v2.0 available next month that will include a state cache that should realize an overall performance improvement in accessing the state database.

Following on that, we will be working on releasing the lock on the state database once the cache has been updated to reduce lock contention and enable even greater throughput. We are learning a lot from members of the community that are focused on the performance of Fabric, and gradually we hope to leverage that learning in subsequent releases this year.

Appendix B: Failed Transactions

There are several possible reasons why blockchain transactions can be rejected, including consensus errors, syntax errors, and version errors.

Consensus errors

  • Validation logic (VSCC in the case of Hyperledger Fabric)
  • Policy failure (endorsement policy not satisfied in the case of Hyperledger Fabric)

Syntax errors

  • Invalid input (smart contract id, unmarshalling errors, and so on)
  • Unverifiable client or endorsement signature
  • Repeated transaction (due to error or replay attack)

Version errors

By version control (readset version mismatch, writeset is unwritable)

For the current version of this document, we consider throughput the same as goodput.

Поддержка сообщества

Сообщество, которое формирует и вносит изменения в Hyperledger Fabric, сегодня очень энергично.

При поддержке таких огромных компаний, как IBM и Toyota, использующих Hyperledger Fabric в своем производстве, сообщество Hyperledger Fabric и его поддержка продолжают расти быстрыми темпами.

Поддержка больших предприятий: благодаря таким технологическим гигантам, как IBM, Intel и Cisco, Fabric имеет сильную поддержку со стороны корпоративных компаний. Это может обеспечить высокую степень стабильности, внушая уверенность тем, кто все еще может не знать о будущем блокчейна

С другой стороны, знакомые с блокчейном люди обратят внимание на относительно новую и эффективную инфраструктуру

What Does the MSP Do?

To start, users are authenticated using a certificate authority. The certificate authority identifies the application, peer, endorser, and orderer identities, and verifies these credentials. A signature is generated through the use of a Signing Algorithm and a Signature Verification Algorithm.

Specifically, generating a signature starts with a Signing Algorithm, which utilizes the credentials of the entities associated with their respective identities, and outputs an endorsement. A signature is generated, which is a byte array that is bound to a specific identity.

Next, the Signature Verification Algorithm takes the identity, endorsement, and signature as inputs, and outputs ‘accept’ if the signature byte array corresponds with a valid signature for the inputted endorsement, or outputs ‘reject’ if not. If the output is ‘accept’, the user can see the transactions in the network and perform transactions with other actors in the network. If the output is ‘reject’, the user has not been properly authenticated, and is not able to submit transactions to the network, or view any previous transactions.