forked from hyperledger-archives/fabric
-
Notifications
You must be signed in to change notification settings - Fork 0
/
openchain.yaml
executable file
·390 lines (322 loc) · 13.7 KB
/
openchain.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
---
###############################################################################
#
# CLI section
#
###############################################################################
cli:
# The address that the cli process will use for callbacks from chaincodes
address: 0.0.0.0:30304
###############################################################################
#
# 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:5000
###############################################################################
#
# LOGGING section
#
###############################################################################
logging:
# Valid logging levels are case-insensitive strings chosen from
# CRITICAL | ERROR | WARNING | NOTICE | INFO | DEBUG
# Logging 'module' names are also strings, however valid module names are
# defined at runtime and are not checked for validity during option
# processing.
# Default logging levels are specified here for each of the obc-peer
# commands. For commands that have subcommands, the defaults also apply to
# all subcommands of the command. These logging levels can be overridden
# on the command line using the --logging-level command-line option, or by
# setting the OPENCHAIN_LOGGING_LEVEL environment variable.
# The logging level specification is of the form
# [<module>[,<module>...]=]<level>[:[<module>[,<module>...]=]<level>...]
# A logging level by itself is taken as the overall default. Otherwise,
# overrides for individual or groups of modules can be specified using the
# <module>[,<module>...]=<level> syntax.
# Examples:
# info - Set default to INFO
# warning:main,db=debug:chaincode=info - Override default WARNING in main,db,chaincode
# chaincode=info:main=debug:db=debug:warning - Same as above
peer: debug
crypto: info
status: warning
stop: warning
login: warning
vm: warning
chaincode: warning
###############################################################################
#
# Peer section
#
###############################################################################
peer:
# Peer Version following version semantics as described here http://semver.org/
# The Peer supplies this version in communications with other Peers
version: 0.1.0
# 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
Dockerfile: |
from s390xlinux/obc-gccgo1.6-rocksdb4.5:latest
# Copy GOPATH src and install Peer
COPY src $GOPATH/src
RUN mkdir -p /var/openchain/db
WORKDIR $GOPATH/src/github.com/openblockchain/obc-peer/
RUN CGO_CFLAGS="-I/opt/rocksdb/include" CGO_LDFLAGS="-L/opt/rocksdb -lrocksdb -lstdc++ -lm -lz -lbz2 -lsnappy" go install && cp $GOPATH/src/github.com/openblockchain/obc-peer/openchain.yaml $GOPATH/bin
# The Address this Peer will listen on
listenAddress: 0.0.0.0:30303
# The Address this Peer will bind to for providing services
address: 0.0.0.0:30303
# Whether the Peer should programmatically determine the address to bind to.
# This case is useful for docker containers.
addressAutoDetect: false
# Peer port to accept connections on
port: 30303
# Peer's setting for GOMAXPROCS
gomaxprocs: 2
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: currently messages are not stored and forwarded, but
# rather lost if the channel write blocks.
channelSize: 50
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 plugin to use. The value is the name of the plugin, e.g. obcpbft, noops ( this value is case-insensitive)
# if the given value is not recognized, we will default to noops
consensus: noops
events:
# The address that the Event service will be enabled on the validator
address: 0.0.0.0:31315
# 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
# Setting the validity-period.verification to false will disable the verification
# of the validity period in the validator
validity-period:
verification: false
# 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
server-host-override:
# PKI member services properties
pki:
eca:
paddr: localhost:50051
tca:
paddr: localhost:50051
tlsca:
paddr: localhost:50051
tls:
enabled: false
rootcert:
file: tlsca.cert
# The server name use to verify the hostname returned by TLS handshake
server-host-override:
# 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
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 : 30303
# - node : 2
# ip : 127.0.0.1
# port : 30303
# Should the discovered nodes and their reputations
# be stored in DB and persisted between restarts
persist: true
# if peer discovery is off
# the peer window will show
# only what retrieved by active
# peer [true/false]
enabled: true
# number of workers that
# tastes the peers for being
# online [1..10]
workers: 8
# the period in seconds with which the discovery
# tries to reconnect to successful nodes
# 0 means the nodes are not reconnected
touchPeriod: 600
# the maximum nuber of nodes to reconnect to
# -1 for unlimited
touchMaxNodes: 100
# Path on the file system where peer will store data
fileSystemPath: /var/openchain/production
###############################################################################
#
# 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:4243
# tcp://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
###############################################################################
#
# 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 s390xlinux/obc-gccgo1.6-rocksdb4.5:latest
COPY src $GOPATH/src
WORKDIR $GOPATH
# timeout in millisecs for starting up a container and waiting for Register
# to come through. 1sec should be plenty for chaincode unit tests
startuptimeout: 1000
#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
installpath: /go/bin/
###############################################################################
#
# Ledger section - ledger configuration encompases both the blockchain
# and the state
#
###############################################################################
ledger:
blockchain:
# Define the genesis block
genesisBlock:
# Deploy chaincodes into the genesis block
# chaincode:
# path: github.com/openblockchain/obc-peer/openchain/example/chaincode/chaincode_example01
# type: GOLANG
# constructor:
# func: init
# args:
# - alice
# - "4"
# - bob
# - "10"
# Setting the deploy-system-chaincode property to false will prevent the
# deploying of system chaincode at genesis time.
deploy-system-chaincode: false
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' and 'trie'. 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: 10009
# '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: 10
# 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 obc-ca. 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 obc-ca/obcca.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 obcca.yaml to the same value
level: 256
# TCerts related configuration
tcert:
batch:
# The size of the batch of TCerts
size: 200