-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathTIPS.txt
84 lines (62 loc) · 2.59 KB
/
TIPS.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
This file contains tips that you might need using this demo.
# using nvm to switch node version
nvm use 6.10.3 (up to Composer 0.13)
nvm use v7.10.0 (to use Composer 0.16+)
# check the version of HyperLedger Composer you are running:
composer -v
# running Composer Playground
You can run playground: http://localhost:8080. You might have to do it from a private browser window
or call localstorage.clear() in the web browser console to start with a clean cache
# updating the version of Hyperledger Composer
The Hyperledger Composer team is shipping a new version of their product every 2 weeks. Follow this instruction to
upgrade Composer version:
- kill all docker containers
in fabric-tools, call 'tearDownAllDocker.sh', select option 1
- upgrade composer:
npm install -g composer-cli@0.16.6
npm install -g generator-hyperledger-composer@0.16.6
npm install -g composer-rest-server@0.16.6
npm install -g yo
npm install -g composer-playground@0.16.6
composer -v should give you the version of Composer you've just installed
- start fabric
in fabric-tools, call 'startFabric.sh'
call 'createPeerAdminCard.sh'
- upgrade client
in 'vehicle-lifecycle-cli' update 'package.json' to point to the right version of Composer (0.16.6 for instance)
call 'npm install'
Then you can restart ODM runtime and deployer, deploy the 'vehicle-lifecycle' application and run
client commands
# max size error when deploying ruleapp or xom
Depending on the size of your XOM or the size of your Ruleapp, you may have the following error generated
by Fabric:
"Error: error trying invoke chaincode. Error: Error: Received message larger than max (5868842 vs. 4194304)"
To workaround this error you need to perform the following actions:
- stop Fabric
- change the ~/.composer-connection-profiles/hlfv1/connection.json
profile file store in your home directory to add the following 'maxRecvSize' and 'maxSendSize' properties:
{
"type": "hlfv1",
"orderers": [
{ "url" : "grpc://localhost:7050" }
],
"ca": { "url": "http://localhost:7054",
"name": "ca.org1.example.com"
},
"peers": [
{
"requestURL": "grpc://localhost:7051",
"eventURL": "grpc://localhost:7053"
}
],
"keyValStore": "/Users/johnsmith/.composer-credentials",
"channel": "composerchannel",
"mspID": "Org1MSP",
"timeout": "300"
"maxSendSize": "20971520",
"maxRecvSize": "20971520",
}
This will allow messages of 20M instead of the default 4M.
- restart Fabric after this change.
# Docker tips
Connecting inside the container: docker exec -it <containerIdOrName> bash