1
- Hyperledger Fabric FAQs
2
- =======================
1
+ Hyperledger Fabric FAQ
2
+ ======================
3
3
4
4
Endorsement
5
5
-----------
@@ -24,32 +24,34 @@ Security & Access Control
24
24
Q. How do I ensure data privacy?
25
25
26
26
A. There are various aspects to data privacy.
27
- First, you can segregate your network into channels, where each channel represents a subset of
28
- participants that are authorized to see the data for the chaincodes that are deployed
29
- to that channel.
30
- Second, within a channel you can restrict the input data to chaincode to the set of
31
- endorsers only, by using visibility settings. The visibility setting will determine
32
- whether input and output chaincode data is included in the submitted transaction, versus just
33
- output data.
27
+ First, you can segregate your network into channels, where each channel
28
+ represents a subset of participants that are authorized to see the data
29
+ for the chaincodes that are deployed to that channel.
30
+ Second, within a channel you can restrict the input data to chaincode to the
31
+ set of endorsers only, by using visibility settings. The visibility setting
32
+ will determine whether input and output chaincode data is included in the
33
+ submitted transaction, versus just output data.
34
34
Third, you can hash or encrypt the data before calling chaincode. If you hash
35
- the data then you will need a way to share the source data outside of fabric. If you encrypt
36
- the data then you will need a way to share the decryption keys outside of fabric.
37
- Fourth, you can restrict data access to certain roles in your organization, by building
38
- access control into the chaincode logic.
39
- Fifth, ledger data at rest can be encrypted via file system encryption on the peer, and data in
40
- transit is encrypted via TLS.
35
+ the data then you will need to provide a means to share the source data.
36
+ If you encrypt the data then you will need to provide a means to share the
37
+ decryption keys.
38
+ Fourth, you can restrict data access to certain roles in your organization, by
39
+ building access control into the chaincode logic.
40
+ Fifth, ledger data at rest can be encrypted via file system encryption on
41
+ the peer, and data in-transit is encrypted via TLS.
41
42
42
43
Q. Do the orderers see the transaction data?
43
44
44
45
A. No, the orderers only order transactions, they do not open the transactions.
45
- If you do not want the data to go through the orderers at all, and you are only concerned
46
- about the input data, then you can use visibility settings. The visibility setting will determine
47
- whether input and output chaincode data is included in the submitted transaction, versus just
48
- output data. Therefore the input data can be private to the endorsers only.
49
- If you do not want the orderers to see chaincode output, then you can hash or encrypt the data
50
- before calling chaincode. If you hash the data then you will need a way to share the source data
51
- outside of fabric. If you encrypt the data then you will need a way to share the decryption keys
52
- outside of fabric.
46
+ If you do not want the data to go through the orderers at all, and you are only
47
+ concerned about the input data, then you can use visibility settings. The
48
+ visibility setting will determine whether input and output chaincode data is
49
+ included in the submitted transaction, versus just output data. Therefore,
50
+ the input data can be private to the endorsers only.
51
+ If you do not want the orderers to see chaincode output, then you can hash or
52
+ encrypt the data before calling chaincode. If you hash the data then you will
53
+ need to provide a meansto share the source data. If you encrypt the data then
54
+ you will need to provide a means to share the decryption keys.
53
55
54
56
Application-side Programming Model
55
57
----------------------------------
@@ -58,26 +60,30 @@ Application-side Programming Model
58
60
59
61
Q. How do application clients know the outcome of a transaction?
60
62
61
- A. The transaction simulation results are returned to the client by the endorser in the proposal
62
- response. If there are multiple endorsers, the client can check that the responses are all the
63
- same, and submit the results and endorsements for ordering and commitment.
64
- Ultimately the committing peers will validate or invalidate the transaction, and the client becomes
65
- aware of the outcome via an event, that the SDK makes available to the application client.
63
+ A. The transaction simulation results are returned to the client by the
64
+ endorser in the proposal response. If there are multiple endorsers, the
65
+ client can check that the responses are all the same, and submit the results
66
+ and endorsements for ordering and commitment. Ultimately the committing peers
67
+ will validate or invalidate the transaction, and the client becomes
68
+ aware of the outcome via an event, that the SDK makes available to the
69
+ application client.
66
70
67
71
**Ledger queries **:
68
72
69
73
Q. How do I query the ledger data?
70
74
71
- Within chaincode you can query based on keys. Keys can be queried by range, and composite keys can
72
- be modeled to enable equivalence queries against multiple parameters. For example a composite
73
- key of (owner,asset_id) can be used to query all assets owned by a certain entity. These key-based
74
- queries can be used for read-only queries against the ledger, as well as in transactions that
75
+ A. Within chaincode you can query based on keys. Keys can be queried by range,
76
+ and composite keys can be modeled to enable equivalence queries against multiple
77
+ parameters. For example a composite key of (owner,asset_id) can be used to
78
+ query all assets owned by a certain entity. These key-based queries can be used
79
+ for read-only queries against the ledger, as well as in transactions that
75
80
update the ledger.
76
81
77
- If you model asset data as JSON in chaincode and use CouchDB as the state database, you can also
78
- perform complex rich queries against the chaincode data values, using the CouchDB JSON query
79
- language within chaincode. The application client can perform read-only queries, but these
80
- responses are not typically submitted as part of transactions to the ordering service.
82
+ If you model asset data as JSON in chaincode and use CouchDB as the state
83
+ database, you can also perform complex rich queries against the chaincode
84
+ data values, using the CouchDB JSON query language within chaincode. The
85
+ application client can perform read-only queries, but these responses are
86
+ not typically submitted as part of transactions to the ordering service.
81
87
82
88
Q. How do I query the historical data to understand data provenance?
83
89
@@ -87,34 +93,34 @@ values for a key.
87
93
Q. How to guarantee the query result is correct, especially when the peer being
88
94
queried may be recovering and catching up on block processing?
89
95
90
- A. The client can query multiple peers, compare their block heights, compare their query results,
91
- and favor the peers at the higher block heights.
96
+ A. The client can query multiple peers, compare their block heights, compare
97
+ their query results, and favor the peers at the higher block heights.
92
98
93
99
Chaincode (Smart Contracts and Digital Assets)
94
100
----------------------------------------------
95
101
96
- * Does the fabric implementation support smart contract logic?
102
+ Q. Does Hyperledger Fabric support smart contract logic?
97
103
98
- Yes. Chaincode is the fabric’s interpretation of the smart contract
99
- method/algorithm, with additional features.
104
+ A. Yes. We call this feature :ref: ` chaincode `. It is our interpretation of the
105
+ smart contract method/algorithm, with additional features.
100
106
101
107
A chaincode is programmatic code deployed on the network, where it is
102
108
executed and validated by chain validators together during the consensus
103
109
process. Developers can use chaincodes to develop business contracts,
104
110
asset definitions, and collectively-managed decentralized applications.
105
111
106
- * How do I create a business contract using the fabric ?
112
+ Q. How do I create a business contract?
107
113
108
- There are generally two ways to develop business contracts: the first way is to
109
- code individual contracts into standalone instances of chaincode; the
114
+ A. There are generally two ways to develop business contracts: the first way is
115
+ to code individual contracts into standalone instances of chaincode; the
110
116
second way, and probably the more efficient way, is to use chaincode to
111
117
create decentralized applications that manage the life cycle of one or
112
118
multiple types of business contracts, and let end users instantiate
113
119
instances of contracts within these applications.
114
120
115
- * How do I create assets using the fabric ?
121
+ Q. How do I create assets?
116
122
117
- Users can use chaincode (for business rules) and membership service (for digital tokens) to
123
+ A. Users can use chaincode (for business rules) and membership service (for digital tokens) to
118
124
design assets, as well as the logic that manages them.
119
125
120
126
There are two popular approaches to defining assets in most blockchain
@@ -123,42 +129,41 @@ into past transaction records; and the account model, where account
123
129
balances are kept in state storage space on the ledger.
124
130
125
131
Each approach carries its own benefits and drawbacks. This blockchain
126
- fabric does not advocate either one over the other. Instead, one of our
132
+ technology does not advocate either one over the other. Instead, one of our
127
133
first requirements was to ensure that both approaches can be easily
128
- implemented with tools available in the fabric .
134
+ implemented.
129
135
130
- * Which languages are supported for writing chaincode?
136
+ Q. Which languages are supported for writing chaincode?
131
137
132
- Chaincode can be written in any programming language and executed in containers
133
- inside the fabric context layer. We are also looking into developing a
134
- templating language (such as Apache Velocity) that can either get
135
- compiled into chaincode or have its interpreter embedded into a
136
- chaincode container.
138
+ A. Chaincode can be written in any programming language and executed in
139
+ containers. We are also looking into developing a templating language (such
140
+ as Apache Velocity) that can either be compiled into chaincode or have
141
+ its interpreter embedded into a chaincode container.
137
142
138
- The fabric's first fully supported chaincode language is Golang, and
143
+ The first fully supported chaincode language is Golang, and
139
144
support for JavaScript and Java is planned for 2016. Support for
140
- additional languages and the development of a fabric -specific templating
141
- language have been discussed, and more details will be released in the
142
- near future.
145
+ additional languages and the development of a Hyperledger Fabric -specific
146
+ templating language have been discussed, and more details will be released in
147
+ the near future.
143
148
144
- * Does the fabric have native currency?
149
+ Q. Does the Hyperledger Fabric have native currency?
145
150
146
- No. However, if you really need a native currency for your chain network, you can develop your own
147
- native currency with chaincode. One common attribute of native currency
148
- is that some amount will get transacted (the chaincode defining that
149
- currency will get called) every time a transaction is processed on its
150
- chain.
151
+ A. No. However, if you really need a native currency for your chain network,
152
+ you can develop your own native currency with chaincode. One common attribute
153
+ of native currency is that some amount will get transacted (the chaincode
154
+ defining that currency will get called) every time a transaction is processed
155
+ on its chain.
151
156
152
157
Identity Management (Membership Service)
153
158
----------------------------------------
154
159
155
- * What is unique about the fabric 's Membership Service module?
160
+ Q. What is unique about the Hyperledger Fabric 's membership service module?
156
161
157
- One of the things that makes the Membership Service module stand out from
162
+ A. One of the things that makes the membership service module stand out from
158
163
the pack is our implementation of the latest advances in cryptography.
159
164
160
- In addition to ensuring private, auditable transactions, our Membership
161
- Service module introduces the concept of enrollment and transaction
165
+ In addition to ensuring private, auditable transactions, our membership
166
+ service module introduces the concept of enrollment and transaction
162
167
certificates. This innovation ensures that only verified owners can
163
168
create asset tokens, allowing an infinite number of transaction
164
169
certificates to be issued through parent enrollment certificates while
@@ -169,13 +174,13 @@ Issuers also have the ability revoke transaction certificates or
169
174
designate them to expire within a certain timeframe, allowing greater
170
175
control over the asset tokens they have issued.
171
176
172
- Like most other modules on Fabric , you can always replace the
177
+ Like most other modules, you can always replace the
173
178
default module with another membership service option should the need
174
179
arise.
175
180
176
- * Does its Membership Service make Fabric a centralized solution?
181
+ Q. Does its Membership Service make Fabric a centralized solution?
177
182
178
- No. The only role of the Membership Service module is to issue digital
183
+ A. No. The only role of the Membership Service module is to issue digital
179
184
certificates to validated entities that want to participate in the
180
185
network. It does not execute transactions nor is it aware of how or when
181
186
these certificates are used in any particular network.
0 commit comments