You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/tutorial_start_here.md
+58-52Lines changed: 58 additions & 52 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,5 @@
1
1
# Marbles - Demo
2
2
3
-
*Note these docs are under active development*
4
-
The instructions are not yet 100% compelte, but knock yourself out and give it a go. 3/23/2017
5
-
6
3
## About Marbles
7
4
- The underlying network for this application is the [Hyperledger Fabric](https://github.com/hyperledger/fabric/tree/master/docs), a Linux Foundation project. You may want to review these instructions to understand a bit about the Hyperledger Fabric.
8
5
-**This demo is to aid a developer learn the basics of chaincode and app development with a Hyperledger network.**
@@ -34,14 +31,14 @@ Thus, we will stringify JSON objects to store more complex structures.
34
31
35
32
Attributes of a marble:
36
33
37
-
1.name (unique string, will be used as key)
34
+
1.id (unique string, will be used as key)
38
35
1. color (string, css color names)
39
36
1. size (int, size in mm)
40
37
1. owner (string)
41
38
42
39
We are going to create a Web based UI that can set these values and store them in our blockchain.
43
40
The marble gets created in the blockchain storage aka ledger as a key value pair.
44
-
The `key` is the marble name, and the `value` is a JSON string containing the attributes of the marble (listed above).
41
+
The `key` is the marble id, and the `value` is a JSON string containing the attributes of the marble (listed above).
45
42
Interacting with the cc is done by using the gRPC protocol to a peer on the network.
46
43
The details of the gRPC protocol are taken care of by an SDK called [Hyperledger Fabric Client](https://www.npmjs.com/package/fabric-client) SDK.
47
44
Check the picture below for topology details.
@@ -246,24 +243,33 @@ enrollment.enroll = function (options, cb) {
246
243
client.setStateStore(store);
247
244
248
245
// [Step 3]
249
-
returngetSubmitter(client, options); //do most of the work here
246
+
returngetSubmitter(client, options); //do most of the work here
@@ -293,6 +299,7 @@ enrollment.enroll = function (options, cb) {
293
299
1. Next we create a key value store to store the enrollment certifcates with `newDefaultKeyValueStore`
294
300
1. Next we enroll our admin. This is when we authenticate to the CA with our enroll ID and enroll secret. The CA will issue enrollment certificates which the SDK will store in the key value store. Since we are using the default key value store, it will be stored in our local file system.
295
301
1. After successful enrollment we set the orderer URL. The orderer is not needed yet, but will be when we try to invoke chaincode.
302
+
- The bussiness with `ssl-target-name-override` is only needed if you have self signed certificates. Set this field equal to the `common name` you used to create the PEM file.
296
303
1. Next we set the Peer URLs. These are also not needed yet, but we are going to setup our SDK chain object fully.
297
304
1. At this point the SDK is fully configured and ready to interact with the blockchain.
298
305
@@ -305,7 +312,7 @@ __/chaincode/marbles.go__
305
312
```go
306
313
typeMarblestruct {
307
314
ObjectTypestring`json:"docType"`
308
-
Namestring`json:"name"`//the fieldtags are needed to keep case from bouncing around
0 commit comments