You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[FAB-4452] Def of anchor peers post channel create
Demonstrate the definition of anchor peers after
the peer network channel has been created.
Now allow for optional setting of peer anchors
during channel create.
Removed references to channel ID where is was not
necessary.
Removed spurious comments from bootstrap.feature.
Added mod_policy to orgs in consortium update.
Now add the subjectAltName extension for TLS and
signing certs.
Changed to less specific use of project_name vs
composition.
Current update of existing channel should work for
insertions.
Changed algorithm for getting channel name for orderer
bootstrap to return id that starts with alpha. This
is to manage recent change for couchDB purposes. This
is a ramification of https://jira.hyperledger.org/browse/FAB-2487.
Renamed OrdererSystemChannelId reference in feature
to ordererSystemChannelId. Also changed cc_spec to
ccSpec.
Bumped wait time from 3 to 5 secs for instantiation
to occur.
Change-Id: I5fb245063ab352b2f07460d5a475cedf84c77ef5
Signed-off-by: Jeff Garratt <[email protected]>
Copy file name to clipboardexpand all lines: bddtests/features/bootstrap.feature
+74-36
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ Feature: Bootstrap
16
16
As a blockchain entrepreneur
17
17
I want to bootstrap a new blockchain network
18
18
19
-
# @doNotDecompose
19
+
@doNotDecompose
20
20
@generateDocs
21
21
Scenario Outline: Bootstrap a development network with 4 peers (2 orgs) and 1 orderer (1 org), each having a single independent root of trust (No fabric-ca, just openssl)
22
22
#creates 1 self-signed key/cert pair per orderer organization
@@ -52,7 +52,7 @@ Feature: Bootstrap
52
52
| Organization |
53
53
| ordererOrg0 |
54
54
55
-
And the ordererBootstrapAdmin generates a GUUID to identify the orderer system chain and refer to it by name as "orderer-system-chain-id"
55
+
And the ordererBootstrapAdmin generates a GUUID to identify the orderer system chain and refer to it by name as "ordererSystemChannelId"
56
56
57
57
# We now have an orderer network with NO peers. Now need to configure and start the peer network
58
58
# This can be currently automated through folder creation of the proper form and placing PEMs.
@@ -72,22 +72,22 @@ Feature: Bootstrap
72
72
73
73
# Order info includes orderer admin/orderer information and address (host:port) from previous steps
74
74
# Only the peer organizations can vary.
75
-
And the ordererBootstrapAdmin using cert alias "bootstrapCertAlias" creates the genesis block "ordererGenesisBlock" for chain "orderer-system-chain-id" for composition "<ComposeFile>" and consensus "<ConsensusType>" with consortiums modification policy "/Channel/Orderer/Admins" using consortiums:
75
+
And the ordererBootstrapAdmin using cert alias "bootstrapCertAlias" creates the genesis block "ordererGenesisBlock" for chain "ordererSystemChannelId" for composition "<ComposeFile>" and consensus "<ConsensusType>" with consortiums modification policy "/Channel/Orderer/Admins" using consortiums:
76
76
| Consortium |
77
77
# | consortium1 |
78
78
79
79
80
-
And the orderer admins inspect and approve the genesis block for chain "orderer-system-chain-id"
80
+
And the orderer admins inspect and approve the genesis block for chain "ordererSystemChannelId"
81
81
82
82
# to be used for setting the orderer genesis block path parameter in composition
83
-
And the orderer admins use the genesis block for chain "orderer-system-chain-id" to configure orderers
83
+
And the orderer admins use the genesis block for chain "ordererSystemChannelId" to configure orderers
84
84
85
85
And we compose "<ComposeFile>"
86
86
87
87
# Sleep as to allow system up time
88
88
And I wait "<SystemUpWaitTime>" seconds
89
89
90
-
Given user "ordererBootstrapAdmin" gives "orderer-system-chain-id" to user "configAdminOrdererOrg0"
90
+
Given user "ordererBootstrapAdmin" gives "ordererSystemChannelId" to user "configAdminOrdererOrg0"
91
91
And user "ordererBootstrapAdmin" gives "ordererGenesisBlock" to user "configAdminOrdererOrg0"
92
92
93
93
And the orderer config admin "configAdminOrdererOrg0" creates a consortium "consortium1" with modification policy "/Channel/Orderer/Admins" for peer orgs who wish to form a network:
@@ -98,9 +98,9 @@ Feature: Bootstrap
98
98
99
99
And user "configAdminOrdererOrg0" using cert alias "config-admin-cert" connects to deliver function on orderer "<orderer0>"
100
100
101
-
And user "configAdminOrdererOrg0" retrieves the latest configuration "latestOrdererConfig" from orderer "<orderer0>" for channel "orderer-system-chain-id"
101
+
And user "configAdminOrdererOrg0" retrieves the latest config update "latestOrdererConfig" from orderer "<orderer0>" for channel "{ordererSystemChannelId}"
102
102
103
-
And the orderer config admin "configAdminOrdererOrg0" creates a consortiums config update "consortiumsConfigUpdate1" using config "latestOrdererConfig" using orderer system channel ID "orderer-system-chain-id" to add consortiums:
103
+
And the orderer config admin "configAdminOrdererOrg0" creates a consortiums config update "consortiumsConfigUpdate1" using config "latestOrdererConfig" using orderer system channel ID "ordererSystemChannelId" to add consortiums:
104
104
| Consortium |
105
105
| consortium1 |
106
106
@@ -113,7 +113,7 @@ Feature: Bootstrap
113
113
114
114
And the user "configAdminOrdererOrg0" creates a ConfigUpdate Tx "consortiumsConfigUpdateTx1" using cert alias "config-admin-cert" using signed ConfigUpdateEnvelope "consortiumsConfigUpdate1Envelope"
115
115
116
-
And the user "configAdminOrdererOrg0" using cert alias "config-admin-cert" broadcasts ConfigUpdate Tx "consortiumsConfigUpdateTx1" to orderer "<orderer0>" to create channel "com.acme.blockchain.jdoe.channel1"
116
+
And the user "configAdminOrdererOrg0" using cert alias "config-admin-cert" broadcasts ConfigUpdate Tx "consortiumsConfigUpdateTx1" to orderer "<orderer0>"
117
117
118
118
119
119
Given the following application developers are defined for peer organizations and each saves their cert as alias
@@ -123,11 +123,6 @@ Feature: Bootstrap
123
123
124
124
And user "configAdminOrdererOrg0" gives "consortium1" to user "dev0Org0"
125
125
126
-
# Need Consortium MSP info and
127
-
# need to add the ChannelWriters ConfigItem (using ChannelWriters ref name),
And the user "dev0Org0" creates a configUpdateEnvelope "createChannelConfigUpdate1Envelope" using configUpdate "createChannelConfigUpdate1"
148
143
@@ -154,7 +149,7 @@ Feature: Bootstrap
154
149
155
150
And the user "dev0Org0" creates a ConfigUpdate Tx "configUpdateTx1" using cert alias "consortium1-cert" using signed ConfigUpdateEnvelope "createChannelConfigUpdate1Envelope"
156
151
157
-
And the user "dev0Org0" using cert alias "consortium1-cert" broadcasts ConfigUpdate Tx "configUpdateTx1" to orderer "<orderer0>" to create channel "com.acme.blockchain.jdoe.channel1"
152
+
And the user "dev0Org0" using cert alias "consortium1-cert" broadcasts ConfigUpdate Tx "configUpdateTx1" to orderer "<orderer0>"
158
153
159
154
# Sleep as the local orderer needs to bring up the resources that correspond to the new channel
160
155
# For the Kafka orderer, this includes setting up a producer and consumer for the channel's partition
@@ -191,6 +186,46 @@ Feature: Bootstrap
191
186
| Peer |
192
187
| peer1 |
193
188
189
+
Given the user "configAdminPeerOrg0" creates an peer anchor set "anchors1" for orgs:
190
+
| User | Peer | Organization |
191
+
| peer0Signer | peer0 | peerOrg0 |
192
+
193
+
And user "configAdminPeerOrg0" using cert alias "config-admin-cert" connects to deliver function on orderer "<orderer0>"
194
+
195
+
And user "configAdminPeerOrg0" retrieves the latest config update "latestChannelConfigUpdate" from orderer "<orderer0>" for channel "com.acme.blockchain.jdoe.channel1"
196
+
197
+
And the user "configAdminPeerOrg0" creates an existing channel config update "existingChannelConfigUpdate1" using config update "latestChannelConfigUpdate"
198
+
| ChannelID | [PeerAnchorSet] |
199
+
| com.acme.blockchain.jdoe.channel1 | anchors1 |
200
+
201
+
202
+
203
+
204
+
205
+
206
+
Given the user "configAdminPeerOrg0" creates a configUpdateEnvelope "existingChannelConfigUpdate1Envelope" using configUpdate "existingChannelConfigUpdate1"
207
+
208
+
209
+
And the user "configAdminPeerOrg0" collects signatures for ConfigUpdateEnvelope "existingChannelConfigUpdate1Envelope" from developers:
210
+
| Developer | CertAlias |
211
+
| configAdminPeerOrg0 | config-admin-cert |
212
+
213
+
And the user "configAdminPeerOrg0" creates a ConfigUpdate Tx "existingChannelConfigUpdateTx1" using cert alias "config-admin-cert" using signed ConfigUpdateEnvelope "existingChannelConfigUpdate1Envelope"
214
+
215
+
216
+
When the user "configAdminPeerOrg0" broadcasts transaction "existingChannelConfigUpdateTx1" to orderer "<orderer0>"
217
+
218
+
And I wait "<BroadcastWaitTime>" seconds
219
+
220
+
And user "configAdminPeerOrg0" sends deliver a seek request on orderer "<orderer0>" with properties:
221
+
| ChainId | Start | End |
222
+
| com.acme.blockchain.jdoe.channel1 | 1 | 1 |
223
+
224
+
Then user "configAdminPeerOrg0" should get a delivery "deliveredExistingChannelConfigUpdateTx1Block" from "<orderer0>" of "1" blocks with "1" messages within "1" seconds
225
+
226
+
227
+
# And I quit
228
+
194
229
Given user "dev0Org1" gives "genesisBlockForMyNewChannel" to user "peer2Admin"
195
230
Given user "dev0Org1" gives "genesisBlockForMyNewChannel" to user "peer3Admin"
196
231
@@ -210,13 +245,18 @@ Feature: Bootstrap
210
245
| Peer |
211
246
| peer3 |
212
247
248
+
Given the user "configAdminPeerOrg1" creates an peer anchor set "anchors1" for orgs:
249
+
| User | Peer | Organization |
250
+
| peer2Signer | peer2 | peerOrg1 |
251
+
252
+
213
253
# Entry point for invoking on an existing channel
214
-
When user "peer0Admin" creates a chaincode spec "cc_spec" with name "example02" of type "GOLANG" for chaincode "github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02" with args
254
+
When user "peer0Admin" creates a chaincode spec "ccSpec" with name "example02" of type "GOLANG" for chaincode "github.com/hyperledger/fabric/examples/chaincode/go/chaincode_example02" with args
215
255
| funcName | arg1 | arg2 | arg3 | arg4 |
216
256
| init | a | 100 | b | 200 |
217
257
218
258
# Under the covers, create a deployment spec, etc.
219
-
And user "peer0Admin" using cert alias "peer-admin-cert" creates a install proposal "installProposal1" for channel "com.acme.blockchain.jdoe.channel1" using chaincode spec "cc_spec"
259
+
And user "peer0Admin" using cert alias "peer-admin-cert" creates a install proposal "installProposal1" for channel "com.acme.blockchain.jdoe.channel1" using chaincode spec "ccSpec"
220
260
221
261
And user "peer0Admin" using cert alias "peer-admin-cert" sends proposal "installProposal1" to endorsers with timeout of "90" seconds with proposal responses "installProposalResponses":
222
262
| Endorser |
@@ -226,10 +266,10 @@ Feature: Bootstrap
226
266
| Endorser |
227
267
| peer0 |
228
268
229
-
Given user "peer0Admin" gives "cc_spec" to user "peer2Admin"
269
+
Given user "peer0Admin" gives "ccSpec" to user "peer2Admin"
230
270
231
271
# Under the covers, create a deployment spec, etc.
232
-
When user "peer2Admin" using cert alias "peer-admin-cert" creates a install proposal "installProposal1" for channel "com.acme.blockchain.jdoe.channel1" using chaincode spec "cc_spec"
272
+
When user "peer2Admin" using cert alias "peer-admin-cert" creates a install proposal "installProposal1" for channel "com.acme.blockchain.jdoe.channel1" using chaincode spec "ccSpec"
233
273
234
274
And user "peer2Admin" using cert alias "peer-admin-cert" sends proposal "installProposal1" to endorsers with timeout of "90" seconds with proposal responses "installProposalResponses":
235
275
| Endorser |
@@ -240,11 +280,11 @@ Feature: Bootstrap
240
280
| peer2 |
241
281
242
282
243
-
Given user "peer0Admin" gives "cc_spec" to user "dev0Org0"
244
-
And user "peer0Admin" gives "cc_spec" to user "configAdminPeerOrg0"
283
+
Given user "peer0Admin" gives "ccSpec" to user "dev0Org0"
284
+
And user "peer0Admin" gives "ccSpec" to user "configAdminPeerOrg0"
245
285
246
286
247
-
When user "configAdminPeerOrg0" using cert alias "config-admin-cert" creates a instantiate proposal "instantiateProposal1" for channel "com.acme.blockchain.jdoe.channel1" using chaincode spec "cc_spec"
287
+
When user "configAdminPeerOrg0" using cert alias "config-admin-cert" creates a instantiate proposal "instantiateProposal1" for channel "com.acme.blockchain.jdoe.channel1" using chaincode spec "ccSpec"
248
288
249
289
And user "configAdminPeerOrg0" using cert alias "config-admin-cert" sends proposal "instantiateProposal1" to endorsers with timeout of "90" seconds with proposal responses "instantiateProposalResponses":
250
290
| Endorser |
@@ -264,24 +304,22 @@ Feature: Bootstrap
264
304
265
305
When the user "configAdminPeerOrg0" creates transaction "instantiateTx1" from proposal "instantiateProposal1" and proposal responses "instantiateProposalResponses" for channel "com.acme.blockchain.jdoe.channel1"
266
306
267
-
And the user "configAdminPeerOrg0" broadcasts transaction "instantiateTx1" to orderer "<orderer1>" on channel "com.acme.blockchain.jdoe.channel1"
307
+
And the user "configAdminPeerOrg0" broadcasts transaction "instantiateTx1" to orderer "<orderer1>"
268
308
269
309
# Sleep as the local orderer ledger needs to create the block that corresponds to the start number of the seek request
270
310
And I wait "<BroadcastWaitTime>" seconds
271
311
272
-
And user "configAdminPeerOrg0" using cert alias "config-admin-cert" connects to deliver function on orderer "<orderer0>"
273
-
274
312
And user "configAdminPeerOrg0" sends deliver a seek request on orderer "<orderer0>" with properties:
275
-
| ChainId | Start | End |
276
-
| com.acme.blockchain.jdoe.channel1 | 1 | 1 |
313
+
| ChainId| Start| End |
314
+
| com.acme.blockchain.jdoe.channel1| 2 | 2 |
277
315
278
316
Then user "configAdminPeerOrg0" should get a delivery "deliveredInstantiateTx1Block" from "<orderer0>" of "1" blocks with "1" messages within "1" seconds
279
317
280
318
# Sleep to allow for chaincode instantiation on the peer
281
-
And I wait "3" seconds
319
+
And I wait "5" seconds
282
320
283
321
# Entry point for invoking on an existing channel
284
-
When user "dev0Org0" creates a chaincode invocation spec "querySpec1" using spec "cc_spec" with input:
322
+
When user "dev0Org0" creates a chaincode invocation spec "querySpec1" using spec "ccSpec" with input:
285
323
| funcName | arg1 |
286
324
| query | a |
287
325
@@ -305,7 +343,7 @@ Feature: Bootstrap
305
343
306
344
307
345
# Entry point for invoking on an existing channel
308
-
When user "dev0Org0" creates a chaincode invocation spec "invocationSpec1" using spec "cc_spec" with input:
346
+
When user "dev0Org0" creates a chaincode invocation spec "invocationSpec1" using spec "ccSpec" with input:
309
347
| funcName | arg1 | arg2 | arg3 |
310
348
| invoke | a | b | 10 |
311
349
@@ -329,14 +367,14 @@ Feature: Bootstrap
329
367
330
368
When the user "dev0Org0" creates transaction "invokeTx1" from proposal "invokeProposal1" and proposal responses "invokeProposal1Responses" for channel "com.acme.blockchain.jdoe.channel1"
331
369
332
-
And the user "dev0Org0" broadcasts transaction "invokeTx1" to orderer "<orderer2>" on channel "com.acme.blockchain.jdoe.channel1"
370
+
And the user "dev0Org0" broadcasts transaction "invokeTx1" to orderer "<orderer2>"
333
371
334
372
# Sleep as the local orderer ledger needs to create the block that corresponds to the start number of the seek request
335
373
And I wait "<BroadcastWaitTime>" seconds
336
374
337
375
And user "dev0Org0" sends deliver a seek request on orderer "<orderer0>" with properties:
338
376
| ChainId | Start | End |
339
-
| com.acme.blockchain.jdoe.channel1 | 2 | 2 |
377
+
| com.acme.blockchain.jdoe.channel1 | 3 | 3 |
340
378
341
379
Then user "dev0Org0" should get a delivery "deliveredInvokeTx1Block" from "<orderer0>" of "1" blocks with "1" messages within "1" seconds
0 commit comments