Skip to content

Commit dfad1b8

Browse files
ibmmarkchristo4ferris
authored andcommitted
[FAB-3830] Why Blockchain
High level concept view of blockchain to start the story, hope to move to HL umbrella later Adding 3 new images too for doc slight change to wording added why BC and temp images added What is Hyperledger Fabric section and learn more Edit updates rebased on master Change-Id: I76ceb47fc5403ae35f30bd0ee97044ae12227ccf Signed-off-by: Mark Parzygnat <[email protected]> Signed-off-by: Christopher Ferris <[email protected]>
1 parent 9683d72 commit dfad1b8

12 files changed

+274
-4
lines changed

docs/source/blockchain.rst

+271-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,272 @@
1-
Why blockchain?
2-
===============
1+
Introduction
2+
============
3+
This section provides an introduction to blockchain that will allow you to
4+
quickly determine whether it might be useful for you or your business. It also
5+
explains the characteristics of the Hyperledger Fabric blockchain and suggests
6+
some ways to increase your knowledge and understanding.
37

4-
...coming soon
8+
What is a Blockchain?
9+
---------------------
10+
**A Distributed Ledger**
11+
12+
At the heart of a blockchain network is a distributed ledger that records all
13+
the transactions that take place on the network.
14+
15+
A blockchain ledger is often described as **decentralized** because it is replicated
16+
across many network participants, each of whom **collaborate** in its maintenance.
17+
We’ll see that decentralization and collaboration are powerful attributes that
18+
mirror the way businesses exchange goods and services in the real world.
19+
20+
.. image:: images/basic_network.png
21+
22+
In addition to being decentralized and collaborative, the information recorded
23+
to a blockchain is append-only, using cryptographic techniques that guarantee
24+
that once a transaction has been added
25+
to the ledger it cannot be modified. This property of immutability makes it
26+
simple to determine the provenance of information because participants can be
27+
sure information has not been changed after the fact. It’s why blockchains
28+
are sometimes described as **systems of proof**.
29+
30+
31+
**Smart Contracts**
32+
33+
To support the consistent update of information – and to enable a whole host of
34+
ledger functions (transacting, querying, etc) – a blockchain network uses **smart
35+
contracts** to provide controlled access to the ledger.
36+
37+
.. image:: images/Smart_Contract.png
38+
39+
Smart contracts are not only a key mechanism for encapsulating information
40+
and keeping it simple across the network, they can also be written to allow
41+
participants to execute certain aspects of transactions automatically.
42+
43+
A smart contract can, for example, be written to stipulate the cost of shipping
44+
an item that changes depending on when it arrives. With the terms agreed to
45+
by both parties and written to the ledger, the appropriate funds change hands
46+
automatically when the item is received.
47+
48+
**Consensus**
49+
50+
The process of keeping the ledger transactions synchronized across the network –
51+
to ensure that ledgers only update when transactions are approved by the appropriate
52+
participants, and that when ledgers do update, they update with the
53+
same transactions in the same order – is called **consensus**.
54+
55+
.. image:: images/consensus.png
56+
57+
We’ll learn a lot more about ledgers, smart contracts and consensus later. For
58+
now, it’s enough to think of a blockchain as a shared, replicated transaction
59+
system which is updated via smart contracts and kept consistently
60+
synchronized through a collaborative process called consensus.
61+
62+
Why is a Blockchain useful?
63+
---------------------------
64+
65+
**Today’s Systems of Record**
66+
67+
The transactional networks of today are little more than slightly updated
68+
versions of networks that have existed since business records have been kept.
69+
The members of a **Business Network** transact with each other, but they maintain
70+
separate records of their transactions. And the things they’re transacting –
71+
whether it’s Flemish tapestries in the 16th century or the securities of today
72+
– must have their provenance established each time they’re sold to ensure that
73+
the business selling an item possesses a chain of title verifying their
74+
ownership of it.
75+
76+
What you’re left with is a business network that looks like this:
77+
78+
79+
.. image:: images/current_network.png
80+
81+
Modern technology has taken this process from stone tablets and paper folders
82+
to hard drives and cloud platforms, but the underlying structure is the same.
83+
Unified systems for managing the identity of network participants do not exist,
84+
establishing provenance is so laborious it takes days to clear securities
85+
transactions (the world volume of which is numbered in the many trillions of
86+
dollars), contracts must be signed and executed manually, and every database in
87+
the system contains unique information and therefore represents a single point
88+
of failure.
89+
90+
It’s impossible with today’s fractured approach to information and
91+
process sharing to build a system of record that spans a business network, even
92+
though the needs of visibility and trust are clear.
93+
94+
95+
**The Blockchain Difference**
96+
97+
What if instead of the rat’s nest of inefficiencies represented by the “modern”
98+
system of transactions, business networks had standard methods for establishing
99+
identity on the network, executing transactions, and storing data? What
100+
if establishing the provenance of an asset could be determined by looking
101+
through a list of transactions that, once written, cannot be changed, and can
102+
therefore be trusted?
103+
104+
That business network would look more like this:
105+
106+
.. image:: images/future_net.png
107+
108+
This is a blockchain network. Every participant in it has their own replicated
109+
copy of the ledger. In addition to ledger information being shared, the processes
110+
which update the ledger are also shared. Unlike today’s systems, where a
111+
participant’s **private** programs are used to update their **private** ledgers,
112+
a blockchain system has **shared** programs to update **shared** ledgers.
113+
114+
With the ability to coordinate their business network through a shared ledger,
115+
blockchain networks can reduce the time, cost, and risk associated with private information and
116+
processing while improving trust and visibility.
117+
118+
You now know what blockchain is and why it’s useful. There are a lot of other
119+
details that are important, but they all relate to these fundamental ideas of
120+
the sharing of information and processes.
121+
122+
123+
What is Hyperledger Fabric?
124+
---------------------------
125+
126+
The Linux Foundation founded the Hyperledger Project in 2015 to advance
127+
cross-industry blockchain technologies. Rather than declaring a single
128+
blockchain standard, it encourages a collaborative approach to developing
129+
blockchain technologies via a community process, with intellectual property
130+
rights that encourage open development and the adoption of key standards over
131+
time.
132+
133+
Hyperledger Fabric is a one of the blockchain projects within Hyperledger.
134+
Like other blockchain technologies, it has a ledger, uses smart contracts,
135+
and is a system by which participants manage their transactions.
136+
137+
Where Hyperledger Fabric breaks from some other blockchain systems is that
138+
it is **private** and **permissioned**. Rather than the “proof of work” some
139+
blockchain networks use to verify identity (allowing anyone who meets those
140+
criteria to join the network), the members of a Fabric network enroll through
141+
a **membership services provider**.
142+
143+
Fabric also offers several pluggable options. Ledger data can be stored in
144+
multiple formats, consensus mechanisms can be switched in and out,
145+
and different membership service providers are supported.
146+
147+
Fabric also offers the ability to create **channels**, allowing a group of
148+
participants to create a separate ledger of transactions. This is an especially
149+
important option for networks where some participants might be competitors and not
150+
want every transaction they make - a special price they're offering to some participants
151+
and not others, for example - known to every participant. If two
152+
participants form a channel, then those participants – and no others – have copies
153+
of the ledger for that channel.
154+
155+
The following diagram outlines the four building blocks of Hyperledger Fabric:
156+
157+
.. image:: images/Requirements.png
158+
159+
**Shared Ledger**
160+
161+
Hyperledger Fabric has a ledger subsystem comprising two components: the **world
162+
state** and the **transaction log**. Each participant has a copy of the ledger to
163+
every Fabric network they belong to.
164+
165+
.. image:: images/what.png
166+
167+
The world state component describes the state of the ledger at a given point
168+
in time. It’s the database of the ledger. The transaction log component records
169+
all transactions which have resulted in the current value of the world state.
170+
It’s the update history for the world state. The ledger, then, is a combination
171+
of the world state database and the transaction log history.
172+
173+
The ledger has a replaceable data store for the world state. By default, this
174+
is a LevelDB key-value store database. The transaction log does not need to be
175+
pluggable. It simply records the before and after values of the ledger database
176+
being used by the blockchain network.
177+
178+
**Smart Contracts**
179+
180+
Hyperledger Fabric smart contracts are written in **chaincode** and are invoked
181+
by an application external to the blockchain when that
182+
application needs to interact with the ledger. In most cases chaincode only
183+
interacts with the database component of the ledger, the world state (querying
184+
it, for example), and not the transaction log.
185+
186+
.. image:: images/sContracts.png
187+
188+
You can write chaincode in several programming languages. Currently supported
189+
languages include GOLANG and Java with others coming soon.
190+
191+
**Privacy**
192+
193+
Depending on the needs of a network, participants in a Business-to-Business
194+
(B2B) network might be extremely sensitive about how much information they share.
195+
For other networks, privacy will not be a top concern.
196+
197+
.. image:: images/Lock.png
198+
199+
Hyperledger Fabric supports networks where privacy (using channels) is a key
200+
operational requirement as well as networks that are comparatively open.
201+
202+
**Consensus**
203+
204+
Transactions must be written to the ledger in the order in which they occur,
205+
even though they might be between different sets of participants within the
206+
network. For this to happen, the order of transactions must be established
207+
and a method for rejecting bad transactions that have been inserted into the
208+
ledger in error (or maliciously) must be put into place.
209+
210+
.. image:: images/handshake.png
211+
212+
213+
This is a thoroughly researched area of computer science, and there are many
214+
ways to achieve it, each with different trade-offs. For example, PBFT (Practical
215+
Byzantine Fault Tolerance) can provide a mechanism for file replicas to
216+
communicate with each other to keep each copy consistent, even in the event
217+
of corruption. Alternatively, in Bitcoin, ordering happens through a process
218+
called mining where competing computers race to solve a cryptographic puzzle
219+
which defines the order that all processes subsequently build upon.
220+
221+
Hyperledger Fabric has been designed to allow network starters to choose a
222+
consensus mechanism that best represents the relationships that exist between
223+
participants. As with privacy, there is a spectrum of needs; from networks
224+
that are highly structured in their relationships to those that are more
225+
peer-to-peer.
226+
227+
We’ll learn more about the Hyperledger Fabric consensus mechanisms, which
228+
currently include SOLO, Kafka, and will soon extend to SBFT (Simplified
229+
Byzantine Fault Tolerance), in another document.
230+
231+
232+
Where can I learn more?
233+
-----------------------
234+
235+
:doc:`getting_started`
236+
237+
Where you learn how to set up a sample network on your local machine. You’ll be
238+
introduced to most of the key components within a blockchain network, learn
239+
more about how they interact with each other, and then you’ll actually get the
240+
code and run some simple query and update transactions.
241+
242+
:doc:`fabric_model`
243+
244+
A deeper look at the components and concepts brought up in this introduction as
245+
well as a few others and describes how they work together in a sample
246+
transaction flow.
247+
248+
:doc:`marbles`
249+
250+
Where you can learn how to write a sample smart contract in GOLANG and invoke
251+
it from an application written in JavaScript. You’ll become comfortable with
252+
the key APIs used by both smart contract developers and application developers
253+
and ready to write your own application using the Hyperledger Fabric API
254+
reference information.
255+
256+
Designing a Business Network (coming soon)
257+
258+
Takes you through how to design a business network using a standard process.
259+
You’ll start by defining the business network and identify the participants
260+
and the goods and services that move between them. You’ll think about the key
261+
lifecycles and how they are impacted by the activities of the key participants.
262+
By the time you’re through, you’ll be ready to start working with key
263+
stakeholders in your company to design a business network that uses Hyperledger
264+
Fabric.
265+
266+
:doc:`planning_guide`
267+
268+
Deals with the practical concerns of setting up and managing a production
269+
Hyperledger Fabric blockchain. You’ll understand the key factors to consider
270+
when planning a blockchain solution, such as compute, storage and network
271+
requirements. You’ll also understand the key non-functional requirements,
272+
including maintainability, performance, availability and disaster recovery.

docs/source/images/Smart_Contract.png

15.7 KB
Loading

docs/source/images/basic_network.png

59.8 KB
Loading

docs/source/images/consensus.png

49.7 KB
Loading
84.4 KB
Loading

docs/source/images/future_net.png

90.5 KB
Loading

docs/source/index.rst

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ It's recommended for first-time users to begin by going through the
1717
components and the basic transaction flow. Once comfortable, continue
1818
exploring the library for demos, technical specifications, APIs, etc.
1919

20-
Before diving in, watch how Fabric is `Building a Blockchain for Business <https://www.youtube.com/watch?v=EKa5Gh9whgU>`__ .
20+
Before diving in, watch how Fabric is `Building a Blockchain for Business
21+
<https://www.youtube.com/watch?v=EKa5Gh9whgU>`__ .
2122

2223

2324

@@ -40,6 +41,7 @@ Before diving in, watch how Fabric is `Building a Blockchain for Business <https
4041
:caption: Key Concepts
4142

4243
overview
44+
blockchain
4345
capabilities
4446
fabric_model
4547
usecases

images/Lock.png

152 KB
Loading

images/Requirements.png

121 KB
Loading

images/handshake.png

152 KB
Loading

images/sContracts.png

126 KB
Loading

images/what.png

181 KB
Loading

0 commit comments

Comments
 (0)