forked from ooibc88/blockbench
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhl_core.yaml
471 lines (399 loc) · 17.4 KB
/
hl_core.yaml
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
###############################################################################
#
# CLI section
#
###############################################################################
cli:
# The address that the cli process will use for callbacks from chaincodes
address: 0.0.0.0:7052
###############################################################################
#
# REST section
#
###############################################################################
rest:
# Enable/disable setting for the REST service. It is recommended to disable
# REST service on validators in production deployment and use non-validating
# nodes to host REST service
enabled: true
# The address that the REST service will listen on for incoming requests.
address: 0.0.0.0:7050
validPatterns:
# Valid enrollment ID pattern in URLs: At least one character long, and
# all characters are A-Z, a-z, 0-9 or _.
enrollmentID: '^\w+$'
###############################################################################
#
# LOGGING section
#
###############################################################################
logging:
# Default logging levels are specified here for each of the three peer
# commands 'node', 'network' and 'chaincode'. For commands that have
# subcommands, the defaults also apply to all subcommands of the command.
# Valid logging levels are case-insensitive strings chosen from
# CRITICAL | ERROR | WARNING | NOTICE | INFO | DEBUG
# The logging levels specified here can be overridden in various ways,
# listed below from strongest to weakest:
#
# 1. The --logging-level=<level> command line option overrides all other
# specifications.
#
# 2. The environment variable CORE_LOGGING_LEVEL otherwise applies to
# all peer commands if defined as a non-empty string.
#
# 3. The environment variables CORE_LOGGING_[NODE|NETWORK|CHAINCODE]
# otherwise apply to the respective peer commands if defined as non-empty
# strings.
#
# 4. Otherwise, the specifications below apply.
#
# Developers: Please see fabric/docs/Setup/logging-control.md for more
# options.
peer: warning
node: info
network: warning
chaincode: warning
version: warning
###############################################################################
#
# Peer section
#
###############################################################################
peer:
# The Peer id is used for identifying this Peer instance.
id: jdoe
# The privateKey to be used by this peer
# privateKey: 794ef087680e2494fa4918fd8fb80fb284b50b57d321a31423fe42b9ccf6216047cea0b66fe8365a8e3f2a8140c6866cc45852e63124668bee1daa9c97da0c2a
# The networkId allows for logical seperation of networks
# networkId: dev
# networkId: test
networkId: dev
# The Address this Peer will listen on
listenAddress: 0.0.0.0:7051
# The Address this Peer will bind to for providing services
address: 0.0.0.0:7051
# Whether the Peer should programmatically determine the address to bind to.
# This case is useful for docker containers.
addressAutoDetect: false
# Setting for runtime.GOMAXPROCS(n). If n < 1, it does not change the current setting
gomaxprocs: -1
workers: 2
# Sync related configuration
sync:
blocks:
# Channel size for readonly SyncBlocks messages channel for receiving
# blocks from oppositie Peer Endpoints.
# NOTE: currently messages are not stored and forwarded, but rather
# lost if the channel write blocks.
channelSize: 10
state:
snapshot:
# Channel size for readonly syncStateSnapshot messages channel
# for receiving state deltas for snapshot from oppositie Peer Endpoints.
# NOTE: when the channel is exhausted, the writes block for up to the
# writeTimeout specified below
channelSize: 50
# Write timeout for the syncStateSnapshot messages
# When the channel above is exhausted, messages block before being
# discarded for this amount of time
writeTimeout: 60s
deltas:
# Channel size for readonly syncStateDeltas messages channel for
# receiving state deltas for a syncBlockRange from oppositie
# Peer Endpoints.
# NOTE: currently messages are not stored and forwarded,
# but rather lost if the channel write blocks.
channelSize: 20
# Validator defines whether this peer is a validating peer or not, and if
# it is enabled, what consensus plugin to load
validator:
enabled: true
consensus:
# Consensus plugin to use. The value is the name of the plugin, e.g. pbft, noops ( this value is case-insensitive)
# if the given value is not recognized, we will default to noops
plugin: noops
# total number of consensus messages which will be buffered per connection before delivery is rejected
buffersize: 1000
events:
# The address that the Event service will be enabled on the validator
address: 0.0.0.0:7053
# total number of events that could be buffered without blocking the
# validator sends
buffersize: 100
# milliseconds timeout for producer to send an event.
# if < 0, if buffer full, unblocks immediately and not send
# if 0, if buffer full, will block and guarantee the event will be sent out
# if > 0, if buffer full, blocks till timeout
timeout: 10
# TLS Settings for p2p communications
tls:
enabled: false
cert:
file: testdata/server1.pem
key:
file: testdata/server1.key
# The server name use to verify the hostname returned by TLS handshake
serverhostoverride:
# PKI member services properties
pki:
eca:
paddr: localhost:7054
tca:
paddr: localhost:7054
tlsca:
paddr: localhost:7054
tls:
enabled: false
rootcert:
file: tlsca.cert
# The server name use to verify the hostname returned by TLS handshake
serverhostoverride:
# Peer discovery settings. Controls how this peer discovers other peers
discovery:
# The root nodes are used for bootstrapping purposes, and generally
# supplied through ENV variables
# It can be either a single host or a comma separated list of hosts.
rootnode:
# The duration of time between attempts to asks peers for their connected peers
period: 5s
## leaving this in for example of sub map entry
# testNodes:
# - node : 1
# ip : 127.0.0.1
# port : 7051
# - node : 2
# ip : 127.0.0.1
# port : 7051
# Should the discovered nodes and their reputations
# be stored in DB and persisted between restarts
persist: true
# the period in seconds with which the discovery
# tries to reconnect to successful nodes
# 0 means the nodes are not reconnected
touchPeriod: 6s
# the maximum nuber of nodes to reconnect to
# -1 for unlimited
touchMaxNodes: 100
# Path on the file system where peer will store data
fileSystemPath: /data/dinhtta/hyperledger/production
# rocksdb configurations
db:
maxLogFileSize: 10485760
keepLogFileNum: 10
logLevel: "warn"
profile:
enabled: false
listenAddress: 0.0.0.0:6060
###############################################################################
#
# VM section
#
###############################################################################
vm:
# Endpoint of the vm management system. For docker can be one of the following in general
# unix:///var/run/docker.sock
# http://localhost:2375
# https://localhost:2376
endpoint: unix:///var/run/docker.sock
# settings for docker vms
docker:
tls:
enabled: false
cert:
file: /path/to/server.pem
ca:
file: /path/to/ca.pem
key:
file: /path/to/server-key.pem
# Parameters of docker container creating. For docker can created by custom parameters
# If you have your own ipam & dns-server for cluster you can use them to create container efficient.
# NetworkMode Sets the networking mode for the container. Supported standard values are: `host`(default),`bridge`,`ipvlan`,`none`
# dns A list of DNS servers for the container to use.
# note: not support customize for `Privileged` `Binds` `Links` `PortBindings`
# not support set LogConfig using Environment Variables
# LogConfig sets the logging driver (Type) and related options (Config) for Docker
# you can refer https://docs.docker.com/engine/admin/logging/overview/ for more detail configruation.
hostConfig:
NetworkMode: host
Dns:
# - 192.168.0.1
LogConfig:
Type: json-file
Config:
max-size: "50m"
max-file: "5"
Memory: 2147483648
###############################################################################
#
# Chaincode section
#
###############################################################################
chaincode:
# The id is used by the Chaincode stub to register the executing Chaincode
# ID with the Peerand is generally supplied through ENV variables
# the Path form of ID is provided when deploying the chaincode. The name is
# used for all other requests. The name is really a hashcode
# returned by the system in response to the deploy transaction. In
# development mode where user runs the chaincode, the name can be any string
id:
path:
name:
golang:
# This is the basis for the Golang Dockerfile. Additional commands will
# be appended depedendent upon the chaincode specification.
Dockerfile: |
from hyperledger/fabric-baseimage
#from utxo:0.1.0
COPY src $GOPATH/src
WORKDIR $GOPATH
car:
# This is the basis for the CAR Dockerfile. Additional commands will
# be appended depedendent upon the chaincode specification.
Dockerfile: |
FROM hyperledger/fabric-ccenv:$(ARCH)-$(PROJECT_VERSION)
java:
# This is an image based on java:openjdk-8 with addition compiler
# tools added for java shim layer packaging.
# This image is packed with shim layer libraries that are necessary
# for Java chaincode runtime.
Dockerfile: |
from hyperledger/fabric-javaenv:$(ARCH)-$(PROJECT_VERSION)
# timeout in millisecs for starting up a container and waiting for Register
# to come through. 1sec should be plenty for chaincode unit tests
startuptimeout: 300000
#timeout in millisecs for deploying chaincode from a remote repository.
deploytimeout: 30000
#mode - options are "dev", "net"
#dev - in dev mode, user runs the chaincode after starting validator from
# command line on local machine
#net - in net mode validator will run chaincode in a docker container
mode: net
# typically installpath should not be modified. Otherwise, user must ensure
# the chaincode executable is placed in the path specifed by installpath in
# the image
installpath: /opt/gopath/bin/
# keepalive in seconds. In situations where the communiction goes through a
# proxy that does not support keep-alive, this parameter will maintain connection
# between peer and chaincode.
# A value <= 0 turns keepalive off
keepalive: 0
###############################################################################
#
###############################################################################
#
# Ledger section - ledger configuration encompases both the blockchain
# and the state
#
###############################################################################
ledger:
blockchain:
state:
# Control the number state deltas that are maintained. This takes additional
# disk space, but allow the state to be rolled backwards and forwards
# without the need to replay transactions.
deltaHistorySize: 500
# The data structure in which the state will be stored. Different data
# structures may offer different performance characteristics.
# Options are 'buckettree', 'trie' and 'raw'.
# ( Note:'raw' is experimental and incomplete. )
# If not set, the default data structure is the 'buckettree'.
# This CANNOT be changed after the DB has been created.
dataStructure:
# The name of the data structure is for storing the state
name: buckettree
# The data structure specific configurations
configs:
# configurations for 'bucketree'. These CANNOT be changed after the DB
# has been created. 'numBuckets' defines the number of bins that the
# state key-values are to be divided
numBuckets: 1000003
# 'maxGroupingAtEachLevel' defines the number of bins that are grouped
#together to construct next level of the merkle-tree (this is applied
# repeatedly for constructing the entire tree).
maxGroupingAtEachLevel: 5
# 'bucketCacheSize' defines the size (in MBs) of the cache that is used to keep
# the buckets (from root upto secondlast level) in memory. This cache helps
# in making state hash computation faster. A value less than or equals to zero
# leads to disabling this caching. This caching helps more if transactions
# perform significant writes.
bucketCacheSize: 100
# configurations for 'trie'
# 'tire' has no additional configurations exposed as yet
###############################################################################
#
# Security section - Applied to all entities (client, NVP, VP)
#
###############################################################################
security:
# Enable security will force every entity on the network to enroll with obc-ca
# and maintain a valid set of certificates in order to communicate with
# other peers
enabled: false
# To enroll NVP or VP with membersrvc. These parameters are for 1 time use.
# They will not be valid on subsequent times without un-enroll first.
# The values come from off-line registration with obc-ca. For testing, make
# sure the values are in membersrvc/membersrvc.yaml file eca.users
enrollID: vp
enrollSecret: f3489fy98ghf
# To enable privacy of transactions (requires security to be enabled). This
# encrypts the transaction content during transit and at rest. The state
# data is also encrypted
privacy: false
# Can be 256 or 384. If you change here, you have to change also
# the same property in membersrvc.yaml to the same value
level: 256
# Can be SHA2 or SHA3. If you change here, you have to change also
# the same property in membersrvc.yaml to the same value
hashAlgorithm: SHA3
# TCerts related configuration
tcert:
batch:
# The size of the batch of TCerts
size: 200
# Enable the release of keys needed to decrypt attributes from TCerts in
# the chaincode using the metadata field of the transaction (requires
# security to be enabled).
attributes:
enabled: false
# TCerts pool configuration. Multi-thread pool can also be configured
# by multichannel option switching concurrency in communication with TCA.
multithreading:
enabled: false
multichannel: false
# Confidentiality protocol versions supported: 1.2
confidentialityProtocolVersion: 1.2
################################################################################
#
# SECTION: STATETRANSFER
#
# - This applies to recovery behavior when the replica has detected
# a state transfer is required
#
# - This might happen:
# - During a view change in response to a faulty primary
# - After a network outage which has isolated the replica
# - If the current blockchain/state is determined to be corrupt
#
################################################################################
statetransfer:
# Should a replica attempt to fix damaged blocks?
# In general, this should be set to true, setting to false will cause
# the replica to panic, and require a human's intervention to intervene
# and fix the corruption
recoverdamage: true
# The number of blocks to retrieve per sync request
blocksperrequest: 20
# The maximum number of state deltas to attempt to retrieve
# If more than this number of deltas is required to play the state up to date
# then instead the state will be flagged as invalid, and a full copy of the state
# will be retrieved instead
maxdeltas: 200
# Timeouts
timeout:
# How long may returning a single block take
singleblock: 2s
# How long may returning a single state delta take
singlestatedelta: 2s
# How long may transferring the complete state take
fullstate: 60s