@@ -38,7 +38,7 @@ func Fabric() []api.Topology {
3838 fabricTopology .EnableFPC ()
3939 fabricTopology .AddFPC (config .chaincodeName , config .chaincodeImage , config .fpcOptions ... )
4040
41- fabricTopology .Templates = & topology.Templates {ConfigTx : ModifyConfigTxTemplate }
41+ fabricTopology .Templates = & topology.Templates {ConfigTx : ModifyConfigTxTemplate , Core : ModifyCoreTemplate }
4242
4343 // bring hyperledger explorer into the game
4444 // you can reach it http://localhost:8080 with admin:admin
@@ -261,11 +261,11 @@ Profiles:{{ range .Profiles }}
261261 Addresses:{{ range .Orderers }}{{ with $w.Orderer . }}
262262 - 127.0.0.1:{{ $w.OrdererPort . "Listen" }}
263263 {{- end }}{{ end }}
264- BatchTimeout: 2s
264+ BatchTimeout: 1s
265265 BatchSize:
266- MaxMessageCount: 10
266+ MaxMessageCount: 2
267267 AbsoluteMaxBytes: 98 MB
268- PreferredMaxBytes: 2048 KB
268+ PreferredMaxBytes: 4096 KB
269269 Capabilities:
270270 V2_0: true
271271 {{- if eq $w.Consensus.Type "kafka" }}
@@ -350,3 +350,240 @@ Profiles:{{ range .Profiles }}
350350{{- end }}
351351{{ end }}
352352`
353+
354+ const ModifyCoreTemplate = `---
355+ logging:
356+ spec: {{ .Logging.Spec }}
357+ format: {{ .Logging.Format }}
358+
359+ peer:
360+ id: {{ Peer.ID }}
361+ networkId: {{ .NetworkID }}
362+ address: 127.0.0.1:{{ .PeerPort Peer "Listen" }}
363+ addressAutoDetect: true
364+ listenAddress: 127.0.0.1:{{ .PeerPort Peer "Listen" }}
365+ chaincodeListenAddress: 127.0.0.1:{{ .PeerPort Peer "Chaincode" }}
366+ keepalive:
367+ minInterval: 60s
368+ interval: 300s
369+ timeout: 600s
370+ client:
371+ interval: 60s
372+ timeout: 600s
373+ deliveryClient:
374+ interval: 60s
375+ timeout: 20s
376+ gossip:
377+ bootstrap: 127.0.0.1:{{ .PeerPort Peer "Listen" }}
378+ endpoint: 127.0.0.1:{{ .PeerPort Peer "Listen" }}
379+ externalEndpoint: 127.0.0.1:{{ .PeerPort Peer "Listen" }}
380+ useLeaderElection: true
381+ orgLeader: false
382+ membershipTrackerInterval: 5s
383+ maxBlockCountToStore: 100
384+ maxPropagationBurstLatency: 10ms
385+ maxPropagationBurstSize: 10
386+ propagateIterations: 1
387+ propagatePeerNum: 3
388+ pullInterval: 4s
389+ pullPeerNum: 3
390+ requestStateInfoInterval: 4s
391+ publishStateInfoInterval: 4s
392+ stateInfoRetentionInterval:
393+ publishCertPeriod: 10s
394+ dialTimeout: 3s
395+ connTimeout: 2s
396+ recvBuffSize: 20
397+ sendBuffSize: 200
398+ digestWaitTime: 1s
399+ requestWaitTime: 1500ms
400+ responseWaitTime: 2s
401+ aliveTimeInterval: 5s
402+ aliveExpirationTimeout: 25s
403+ reconnectInterval: 25s
404+ election:
405+ startupGracePeriod: 15s
406+ membershipSampleInterval: 1s
407+ leaderAliveThreshold: 10s
408+ leaderElectionDuration: 5s
409+ pvtData:
410+ pullRetryThreshold: 7s
411+ transientstoreMaxBlockRetention: 1000
412+ pushAckTimeout: 3s
413+ btlPullMargin: 10
414+ reconcileBatchSize: 10
415+ reconcileSleepInterval: 10s
416+ reconciliationEnabled: true
417+ skipPullingInvalidTransactionsDuringCommit: false
418+ state:
419+ enabled: true
420+ checkInterval: 10s
421+ responseTimeout: 3s
422+ batchSize: 10
423+ blockBufferSize: 100
424+ maxRetries: 3
425+ events:
426+ address: 127.0.0.1:{{ .PeerPort Peer "Events" }}
427+ buffersize: 100
428+ timeout: 10ms
429+ timewindow: 15m
430+ keepalive:
431+ minInterval: 60s
432+ tls:
433+ enabled: true
434+ clientAuthRequired: {{ .ClientAuthRequired }}
435+ cert:
436+ file: {{ .PeerLocalTLSDir Peer }}/server.crt
437+ key:
438+ file: {{ .PeerLocalTLSDir Peer }}/server.key
439+ clientCert:
440+ file: {{ .PeerLocalTLSDir Peer }}/server.crt
441+ clientKey:
442+ file: {{ .PeerLocalTLSDir Peer }}/server.key
443+ rootcert:
444+ file: {{ .PeerLocalTLSDir Peer }}/ca.crt
445+ clientRootCAs:
446+ files:
447+ - {{ .PeerLocalTLSDir Peer }}/ca.crt
448+ authentication:
449+ timewindow: 15m
450+ fileSystemPath: filesystem
451+ BCCSP:
452+ Default: SW
453+ SW:
454+ Hash: SHA2
455+ Security: 256
456+ FileKeyStore:
457+ KeyStore:
458+ mspConfigPath: {{ .PeerLocalMSPDir Peer }}
459+ localMspId: {{ (.Organization Peer.Organization).MSPID }}
460+ deliveryclient:
461+ reconnectTotalTimeThreshold: 3600s
462+ localMspType: bccsp
463+ profile:
464+ enabled: false
465+ listenAddress: 127.0.0.1:{{ .PeerPort Peer "ProfilePort" }}
466+ handlers:
467+ authFilters:
468+ - name: DefaultAuth
469+ - name: ExpirationCheck
470+ decorators:
471+ - name: DefaultDecorator
472+ endorsers:
473+ escc:
474+ name: DefaultEndorsement
475+ validators:
476+ vscc:
477+ name: DefaultValidation
478+ {{ if .PvtTxSupport }}vscc_pvt:
479+ name: DefaultPvtValidation
480+ library: {{ end }}
481+ {{ if .MSPvtTxSupport }}vscc_mspvt:
482+ name: DefaultMSPvtValidation
483+ library: {{ end }}
484+ {{ if .FabTokenSupport }}vscc_token:
485+ name: DefaultTokenValidation
486+ library: {{ end }}
487+ validatorPoolSize:
488+ discovery:
489+ enabled: true
490+ authCacheEnabled: true
491+ authCacheMaxSize: 1000
492+ authCachePurgeRetentionRatio: 0.75
493+ orgMembersAllowedAccess: false
494+ limits:
495+ concurrency:
496+ qscc: 500
497+
498+ vm:
499+ endpoint: unix:///var/run/docker.sock
500+ docker:
501+ tls:
502+ enabled: false
503+ ca:
504+ file: docker/ca.crt
505+ cert:
506+ file: docker/tls.crt
507+ key:
508+ file: docker/tls.key
509+ attachStdout: true
510+ hostConfig:
511+ NetworkMode: host
512+ LogConfig:
513+ Type: json-file
514+ Config:
515+ max-size: "50m"
516+ max-file: "5"
517+ Memory: 2147483648
518+
519+ chaincode:
520+ builder: $(DOCKER_NS)/fabric-ccenv:$(PROJECT_VERSION)
521+ pull: false
522+ golang:
523+ runtime: $(DOCKER_NS)/fabric-baseos:$(PROJECT_VERSION)
524+ dynamicLink: false
525+ car:
526+ runtime: $(DOCKER_NS)/fabric-baseos:$(PROJECT_VERSION)
527+ java:
528+ runtime: $(DOCKER_NS)/fabric-javaenv:latest
529+ node:
530+ runtime: $(DOCKER_NS)/fabric-nodeenv:latest
531+ installTimeout: 1200s
532+ startuptimeout: 1200s
533+ executetimeout: 1200s
534+ mode: net
535+ keepalive: 0
536+ system:
537+ _lifecycle: enable
538+ cscc: enable
539+ lscc: enable
540+ qscc: enable
541+ logging:
542+ level: debug
543+ shim: debug
544+ format: '%{color}%{time:2006-01-02 15:04:05.000 MST} [%{module}] %{shortfunc} -> %{level:.4s} %{id:03x}%{color:reset} %{message}'
545+ externalBuilders: {{ range .ExternalBuilders }}
546+ - path: {{ .Path }}
547+ name: {{ .Name }}
548+ propagateEnvironment: {{ range .PropagateEnvironment }}
549+ - {{ . }}
550+ {{- end }}
551+ {{- end }}
552+
553+ ledger:
554+ blockchain:
555+ state:
556+ stateDatabase: goleveldb
557+ couchDBConfig:
558+ couchDBAddress: 127.0.0.1:5984
559+ username:
560+ password:
561+ maxRetries: 3
562+ maxRetriesOnStartup: 10
563+ requestTimeout: 35s
564+ queryLimit: 10000
565+ maxBatchUpdateSize: 1000
566+ warmIndexesAfterNBlocks: 1
567+ history:
568+ enableHistoryDatabase: true
569+
570+ operations:
571+ listenAddress: 127.0.0.1:{{ .PeerPort Peer "Operations" }}
572+ tls:
573+ enabled: false
574+ cert:
575+ file: {{ .PeerLocalTLSDir Peer }}/server.crt
576+ key:
577+ file: {{ .PeerLocalTLSDir Peer }}/server.key
578+ clientAuthRequired: {{ .ClientAuthRequired }}
579+ clientRootCAs:
580+ files:
581+ - {{ .PeerLocalTLSDir Peer }}/ca.crt
582+ metrics:
583+ provider: {{ .MetricsProvider }}
584+ statsd:
585+ network: udp
586+ address: {{ if .StatsdEndpoint }}{{ .StatsdEndpoint }}{{ else }}127.0.0.1:8125{{ end }}
587+ writeInterval: 5s
588+ prefix: {{ ReplaceAll (ToLower Peer.ID) "." "_" }}
589+ `
0 commit comments