-
Notifications
You must be signed in to change notification settings - Fork 0
/
core_template.go
209 lines (201 loc) · 5.12 KB
/
core_template.go
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
/*
Copyright IBM Corp. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package nwo
const DefaultCoreTemplate = `---
logging:
format: '%{color}%{time:2006-01-02 15:04:05.000 MST} [%{module}] %{shortfunc} -> %{level:.4s} %{id:03x}%{color:reset} %{message}'
peer:
id: {{ Peer.ID }}
networkId: {{ .NetworkID }}
address: 127.0.0.1:{{ .PeerPort Peer "Listen" }}
addressAutoDetect: true
listenAddress: 127.0.0.1:{{ .PeerPort Peer "Listen" }}
chaincodeListenAddress: 0.0.0.0:{{ .PeerPort Peer "Chaincode" }}
gomaxprocs: -1
keepalive:
minInterval: 60s
client:
interval: 60s
timeout: 20s
deliveryClient:
interval: 60s
timeout: 20s
gossip:
bootstrap: 127.0.0.1:{{ .PeerPort Peer "Listen" }}
useLeaderElection: true
orgLeader: false
endpoint:
maxBlockCountToStore: 100
maxPropagationBurstLatency: 10ms
maxPropagationBurstSize: 10
propagateIterations: 1
propagatePeerNum: 3
pullInterval: 4s
pullPeerNum: 3
requestStateInfoInterval: 4s
publishStateInfoInterval: 4s
stateInfoRetentionInterval:
publishCertPeriod: 10s
dialTimeout: 3s
connTimeout: 2s
recvBuffSize: 20
sendBuffSize: 200
digestWaitTime: 1s
requestWaitTime: 1500ms
responseWaitTime: 2s
aliveTimeInterval: 5s
aliveExpirationTimeout: 25s
reconnectInterval: 25s
externalEndpoint: 127.0.0.1:{{ .PeerPort Peer "Listen" }}
election:
startupGracePeriod: 15s
membershipSampleInterval: 1s
leaderAliveThreshold: 10s
leaderElectionDuration: 5s
pvtData:
pullRetryThreshold: 60s
transientstoreMaxBlockRetention: 1000
pushAckTimeout: 3s
reconcileBatchSize: 10
reconcileSleepInterval: 10s
reconciliationEnabled: true
events:
address: 127.0.0.1:{{ .PeerPort Peer "Events" }}
buffersize: 100
timeout: 10ms
timewindow: 15m
keepalive:
minInterval: 60s
tls:
enabled: true
clientAuthRequired: false
cert:
file: {{ .PeerLocalTLSDir Peer }}/server.crt
key:
file: {{ .PeerLocalTLSDir Peer }}/server.key
rootcert:
file: {{ .PeerLocalTLSDir Peer }}/ca.crt
clientRootCAs:
files:
- {{ .PeerLocalTLSDir Peer }}/ca.crt
authentication:
timewindow: 15m
fileSystemPath: filesystem
BCCSP:
Default: SW
SW:
Hash: SHA2
Security: 256
FileKeyStore:
KeyStore:
mspConfigPath: {{ .PeerLocalMSPDir Peer }}
localMspId: {{ (.Organization Peer.Organization).MSPID }}
deliveryclient:
reconnectTotalTimeThreshold: 3600s
localMspType: bccsp
profile:
enabled: false
listenAddress: 127.0.0.1:{{ .PeerPort Peer "ProfilePort" }}
adminService:
handlers:
authFilters:
- name: DefaultAuth
- name: ExpirationCheck
decorators:
- name: DefaultDecorator
endorsers:
escc:
name: DefaultEndorsement
validators:
vscc:
name: DefaultValidation
validatorPoolSize:
discovery:
enabled: true
authCacheEnabled: true
authCacheMaxSize: 1000
authCachePurgeRetentionRatio: 0.75
orgMembersAllowedAccess: false
vm:
endpoint: unix:///var/run/docker.sock
docker:
tls:
enabled: false
ca:
file: docker/ca.crt
cert:
file: docker/tls.crt
key:
file: docker/tls.key
attachStdout: true
hostConfig:
NetworkMode: host
LogConfig:
Type: json-file
Config:
max-size: "50m"
max-file: "5"
Memory: 2147483648
chaincode:
builder: $(DOCKER_NS)/fabric-ccenv:$(ARCH)-$(PROJECT_VERSION)
pull: false
golang:
runtime: $(BASE_DOCKER_NS)/fabric-baseos:$(ARCH)-$(BASE_VERSION)
dynamicLink: false
car:
runtime: $(BASE_DOCKER_NS)/fabric-baseos:$(ARCH)-$(BASE_VERSION)
java:
runtime: $(DOCKER_NS)/fabric-javaenv:$(ARCH)-$(PROJECT_VERSION)
node:
runtime: $(BASE_DOCKER_NS)/fabric-baseimage:$(ARCH)-$(BASE_VERSION)
startuptimeout: 300s
executetimeout: 30s
mode: net
keepalive: 0
system:
cscc: enable
lscc: enable
qscc: enable
systemPlugins:
logging:
level: info
shim: warning
format: '%{color}%{time:2006-01-02 15:04:05.000 MST} [%{module}] %{shortfunc} -> %{level:.4s} %{id:03x}%{color:reset} %{message}'
ledger:
blockchain:
state:
stateDatabase: goleveldb
couchDBConfig:
couchDBAddress: 127.0.0.1:5984
username:
password:
maxRetries: 3
maxRetriesOnStartup: 10
requestTimeout: 35s
queryLimit: 10000
maxBatchUpdateSize: 1000
warmIndexesAfterNBlocks: 1
history:
enableHistoryDatabase: true
operations:
listenAddress: 127.0.0.1:{{ .PeerPort Peer "Operations" }}
tls:
enabled: true
cert:
file: {{ .PeerLocalTLSDir Peer }}/server.crt
key:
file: {{ .PeerLocalTLSDir Peer }}/server.key
clientAuthRequired: false
clientRootCAs:
files:
- {{ .PeerLocalTLSDir Peer }}/ca.crt
metrics:
provider: {{ .MetricsProvider }}
statsd:
network: udp
address: {{ if .StatsdEndpoint }}{{ .StatsdEndpoint }}{{ else }}127.0.0.1:8125{{ end }}
writeInterval: 5s
prefix: {{ ReplaceAll (ToLower Peer.ID) "." "_" }}
`