Skip to content

Commit 6f4d26d

Browse files
authored
Feat: Add orderers and channels in connection profile (#595)
1 parent 2f62139 commit 6f4d26d

11 files changed

+1413
-81
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
* Full support for Fabric 3.0.0 and drop solo consensus
2020
[#513](https://github.com/hyperledger-labs/fablo/pull/513)
2121

22+
### Bug Fixes
23+
* Fix connection profile issues (CA URL, missing orderers and channels sections)
24+
[#340](https://github.com/hyperledger-labs/fablo/issues/340)
25+
2226
## 2.1.0
2327

2428
### Features
@@ -144,7 +148,7 @@
144148
## 0.3.0
145149

146150
### Features
147-
* Add [Fablo REST](https://github.com/fablo-io/fablo-rest/) support
151+
* Add [Fablo REST](https://github.com/fablo-io/fablo-rest/) support
148152
* By default all peers are anchor peers
149153
* Support `postGenerate` hook
150154
* Added support for [Orderer sharding](https://github.com/hyperledger-labs/fablo/issues/220) (multiple orderer groups).

e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-peer-dev-mode.json.test.ts.snap

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,11 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode-peer-dev-mode.json should cre
216216
"verify": false
217217
}
218218
}
219+
},
220+
"orderers": {
221+
"orderer0.group1.orderer.example.com": {
222+
"url": "grpc://localhost:7030"
223+
}
219224
}
220225
}
221226
"
@@ -243,6 +248,9 @@ certificateAuthorities:
243248
caName: ca.orderer.example.com
244249
httpOptions:
245250
verify: false
251+
orderers:
252+
orderer0.group1.orderer.example.com:
253+
url: grpc://localhost:7030
246254
"
247255
`;
248256
@@ -278,6 +286,16 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode-peer-dev-mode.json should cre
278286
"verify": false
279287
}
280288
}
289+
},
290+
"orderers": {
291+
"orderer0.group1.orderer.example.com": {
292+
"url": "grpc://localhost:7030"
293+
}
294+
},
295+
"channels": {
296+
"my-channel1": {
297+
"peers": {}
298+
}
281299
}
282300
}
283301
"
@@ -305,6 +323,12 @@ certificateAuthorities:
305323
caName: ca.org1.example.com
306324
httpOptions:
307325
verify: false
326+
orderers:
327+
orderer0.group1.orderer.example.com:
328+
url: grpc://localhost:7030
329+
channels:
330+
my-channel1:
331+
peers: {}
308332
"
309333
`;
310334

e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-ccaas.json.test.ts.snap

Lines changed: 54 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -214,11 +214,22 @@ exports[`samples/fablo-config-hlf3-1org-1chaincode-raft-ccaas.json should create
214214
"ca.orderer.example.com": {
215215
"url": "https://localhost:7020",
216216
"caName": "ca.orderer.example.com",
217+
"httpOptions": {
218+
"verify": false
219+
},
217220
"tlsCACerts": {
218221
"path": "<absolute path>/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/ca.orderer.example.com-cert.pem"
222+
}
223+
}
224+
},
225+
"orderers": {
226+
"orderer0.group1.orderer.example.com": {
227+
"url": "grpcs://localhost:7030",
228+
"tlsCACerts": {
229+
"path": "<absolute path>/samples/fablo-target/fabric-config/crypto-config/ordererOrganizations/orderer.example.com/orderers/orderer0.group1.orderer.example.com/tls/ca.crt"
219230
},
220-
"httpOptions": {
221-
"verify": false
231+
"grpcOptions": {
232+
"ssl-target-name-override": "orderer0.group1.orderer.example.com"
222233
}
223234
}
224235
}
@@ -251,11 +262,19 @@ certificateAuthorities:
251262
ca.orderer.example.com:
252263
url: https://localhost:7020
253264
caName: ca.orderer.example.com
265+
httpOptions:
266+
verify: false
254267
tlsCACerts:
255268
path: >-
256269
<absolute path>/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/ca.orderer.example.com-cert.pem
257-
httpOptions:
258-
verify: false
270+
orderers:
271+
orderer0.group1.orderer.example.com:
272+
url: grpcs://localhost:7030
273+
tlsCACerts:
274+
path: >-
275+
<absolute path>/samples/fablo-target/fabric-config/crypto-config/ordererOrganizations/orderer.example.com/orderers/orderer0.group1.orderer.example.com/tls/ca.crt
276+
grpcOptions:
277+
ssl-target-name-override: orderer0.group1.orderer.example.com
259278
"
260279
`;
261280
@@ -293,13 +312,29 @@ exports[`samples/fablo-config-hlf3-1org-1chaincode-raft-ccaas.json should create
293312
"ca.org1.example.com": {
294313
"url": "https://localhost:7040",
295314
"caName": "ca.org1.example.com",
315+
"httpOptions": {
316+
"verify": false
317+
},
296318
"tlsCACerts": {
297319
"path": "<absolute path>/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem"
320+
}
321+
}
322+
},
323+
"orderers": {
324+
"orderer0.group1.orderer.example.com": {
325+
"url": "grpcs://localhost:7030",
326+
"tlsCACerts": {
327+
"path": "<absolute path>/samples/fablo-target/fabric-config/crypto-config/ordererOrganizations/orderer.example.com/orderers/orderer0.group1.orderer.example.com/tls/ca.crt"
298328
},
299-
"httpOptions": {
300-
"verify": false
329+
"grpcOptions": {
330+
"ssl-target-name-override": "orderer0.group1.orderer.example.com"
301331
}
302332
}
333+
},
334+
"channels": {
335+
"my-channel1": {
336+
"peers": {}
337+
}
303338
}
304339
}
305340
"
@@ -330,11 +365,22 @@ certificateAuthorities:
330365
ca.org1.example.com:
331366
url: https://localhost:7040
332367
caName: ca.org1.example.com
368+
httpOptions:
369+
verify: false
333370
tlsCACerts:
334371
path: >-
335372
<absolute path>/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem
336-
httpOptions:
337-
verify: false
373+
orderers:
374+
orderer0.group1.orderer.example.com:
375+
url: grpcs://localhost:7030
376+
tlsCACerts:
377+
path: >-
378+
<absolute path>/samples/fablo-target/fabric-config/crypto-config/ordererOrganizations/orderer.example.com/orderers/orderer0.group1.orderer.example.com/tls/ca.crt
379+
grpcOptions:
380+
ssl-target-name-override: orderer0.group1.orderer.example.com
381+
channels:
382+
my-channel1:
383+
peers: {}
338384
"
339385
`;
340386

e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,11 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode.json should create proper e2e
223223
"verify": false
224224
}
225225
}
226+
},
227+
"orderers": {
228+
"orderer0.group1.orderer.example.com": {
229+
"url": "grpc://localhost:7030"
230+
}
226231
}
227232
}
228233
"
@@ -253,6 +258,9 @@ certificateAuthorities:
253258
caName: ca.orderer.example.com
254259
httpOptions:
255260
verify: false
261+
orderers:
262+
orderer0.group1.orderer.example.com:
263+
url: grpc://localhost:7030
256264
"
257265
`;
258266
@@ -292,6 +300,16 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode.json should create proper e2e
292300
"verify": false
293301
}
294302
}
303+
},
304+
"orderers": {
305+
"orderer0.group1.orderer.example.com": {
306+
"url": "grpc://localhost:7030"
307+
}
308+
},
309+
"channels": {
310+
"my-channel1": {
311+
"peers": {}
312+
}
295313
}
296314
}
297315
"
@@ -322,6 +340,12 @@ certificateAuthorities:
322340
caName: ca.org1.example.com
323341
httpOptions:
324342
verify: false
343+
orderers:
344+
orderer0.group1.orderer.example.com:
345+
url: grpc://localhost:7030
346+
channels:
347+
my-channel1:
348+
peers: {}
325349
"
326350
`;
327351

e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.test.ts.snap

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,11 @@ exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml should cr
281281
"verify": false
282282
}
283283
}
284+
},
285+
"orderers": {
286+
"orderer0.group1.orderer.example.com": {
287+
"url": "grpc://localhost:7030"
288+
}
284289
}
285290
}
286291
"
@@ -314,6 +319,9 @@ certificateAuthorities:
314319
caName: ca.orderer.example.com
315320
httpOptions:
316321
verify: false
322+
orderers:
323+
orderer0.group1.orderer.example.com:
324+
url: grpc://localhost:7030
317325
"
318326
`;
319327
@@ -357,6 +365,16 @@ exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml should cr
357365
"verify": false
358366
}
359367
}
368+
},
369+
"orderers": {
370+
"orderer0.group1.orderer.example.com": {
371+
"url": "grpc://localhost:7030"
372+
}
373+
},
374+
"channels": {
375+
"my-channel1": {
376+
"peers": {}
377+
}
360378
}
361379
}
362380
"
@@ -390,6 +408,12 @@ certificateAuthorities:
390408
caName: ca.org1.example.com
391409
httpOptions:
392410
verify: false
411+
orderers:
412+
orderer0.group1.orderer.example.com:
413+
url: grpc://localhost:7030
414+
channels:
415+
my-channel1:
416+
peers: {}
393417
"
394418
`;
395419
@@ -433,6 +457,16 @@ exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml should cr
433457
"verify": false
434458
}
435459
}
460+
},
461+
"orderers": {
462+
"orderer0.group1.orderer.example.com": {
463+
"url": "grpc://localhost:7030"
464+
}
465+
},
466+
"channels": {
467+
"my-channel1": {
468+
"peers": {}
469+
}
436470
}
437471
}
438472
"
@@ -466,6 +500,12 @@ certificateAuthorities:
466500
caName: ca.org2.example.com
467501
httpOptions:
468502
verify: false
503+
orderers:
504+
orderer0.group1.orderer.example.com:
505+
url: grpc://localhost:7030
506+
channels:
507+
my-channel1:
508+
peers: {}
469509
"
470510
`;
471511

0 commit comments

Comments
 (0)