Skip to content

Commit a25e722

Browse files
committed
[FAB-9507] replace "." from resource names
Dot in names is not configtx.yaml friendly, changed it to "/". (The change to benchmark_test.go is unrelated and needed to get this to pass. Suspect the configtx additions exceeds the buffer limit in the test and was triggered after rebase.) Change-Id: I7ecc9f2199819d5b291d9fce60286a43b9c17328 Signed-off-by: Srinivasan Muralidharan <srinivasan.muralidharan99@gmail.com>
1 parent c44bfed commit a25e722

File tree

5 files changed

+40
-40
lines changed

5 files changed

+40
-40
lines changed

core/aclmgmt/resources/resources.go

+22-22
Original file line numberDiff line numberDiff line change
@@ -12,34 +12,34 @@ package resources
1212
//ACLProviders
1313
const (
1414
//Lscc resources
15-
Lscc_Install = "lscc.Install"
16-
Lscc_Deploy = "lscc.Deploy"
17-
Lscc_Upgrade = "lscc.Upgrade"
18-
Lscc_ChaincodeExists = "lscc.ChaincodeExists"
19-
Lscc_GetDeploymentSpec = "lscc.GetDeploymentSpec"
20-
Lscc_GetChaincodeData = "lscc.GetChaincodeData"
21-
Lscc_GetInstantiatedChaincodes = "lscc.GetInstantiatedChaincodes"
22-
Lscc_GetInstalledChaincodes = "lscc.GetInstalledChaincodes"
15+
Lscc_Install = "lscc/Install"
16+
Lscc_Deploy = "lscc/Deploy"
17+
Lscc_Upgrade = "lscc/Upgrade"
18+
Lscc_ChaincodeExists = "lscc/ChaincodeExists"
19+
Lscc_GetDeploymentSpec = "lscc/GetDeploymentSpec"
20+
Lscc_GetChaincodeData = "lscc/GetChaincodeData"
21+
Lscc_GetInstantiatedChaincodes = "lscc/GetInstantiatedChaincodes"
22+
Lscc_GetInstalledChaincodes = "lscc/GetInstalledChaincodes"
2323

2424
//Qscc resources
25-
Qscc_GetChainInfo = "qscc.GetChainInfo"
26-
Qscc_GetBlockByNumber = "qscc.GetBlockByNumber"
27-
Qscc_GetBlockByHash = "qscc.GetBlockByHash"
28-
Qscc_GetTransactionByID = "qscc.GetTransactionByID"
29-
Qscc_GetBlockByTxID = "qscc.GetBlockByTxID"
25+
Qscc_GetChainInfo = "qscc/GetChainInfo"
26+
Qscc_GetBlockByNumber = "qscc/GetBlockByNumber"
27+
Qscc_GetBlockByHash = "qscc/GetBlockByHash"
28+
Qscc_GetTransactionByID = "qscc/GetTransactionByID"
29+
Qscc_GetBlockByTxID = "qscc/GetBlockByTxID"
3030

3131
//Cscc resources
32-
Cscc_JoinChain = "cscc.JoinChain"
33-
Cscc_GetConfigBlock = "cscc.GetConfigBlock"
34-
Cscc_GetChannels = "cscc.GetChannels"
35-
Cscc_GetConfigTree = "cscc.GetConfigTree"
36-
Cscc_SimulateConfigTreeUpdate = "cscc.SimulateConfigTreeUpdate"
32+
Cscc_JoinChain = "cscc/JoinChain"
33+
Cscc_GetConfigBlock = "cscc/GetConfigBlock"
34+
Cscc_GetChannels = "cscc/GetChannels"
35+
Cscc_GetConfigTree = "cscc/GetConfigTree"
36+
Cscc_SimulateConfigTreeUpdate = "cscc/SimulateConfigTreeUpdate"
3737

3838
//Peer resources
39-
Peer_Propose = "peer.Propose"
40-
Peer_ChaincodeToChaincode = "peer.ChaincodeToChaincode"
39+
Peer_Propose = "peer/Propose"
40+
Peer_ChaincodeToChaincode = "peer/ChaincodeToChaincode"
4141

4242
//Events
43-
Event_Block = "event.Block"
44-
Event_FilteredBlock = "event.FilteredBlock"
43+
Event_Block = "event/Block"
44+
Event_FilteredBlock = "event/FilteredBlock"
4545
)

core/scc/qscc/query.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,5 +209,5 @@ func getBlockByTxID(vledger ledger.PeerLedger, rawTxID []byte) pb.Response {
209209
}
210210

211211
func getACLResource(fname string) string {
212-
return "qscc." + fname
212+
return "qscc/" + fname
213213
}

core/scc/qscc/query_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ func TestQueryNonexistentFunction(t *testing.T) {
262262
}
263263

264264
args := [][]byte{[]byte("GetBlocks"), []byte(chainid), []byte("arg1")}
265-
prop := resetProvider("qscc.GetBlocks", chainid, &peer2.SignedProposal{}, nil)
265+
prop := resetProvider("qscc/GetBlocks", chainid, &peer2.SignedProposal{}, nil)
266266
res := stub.MockInvokeWithSignedProposal("1", args, prop)
267267
assert.Equal(t, int32(shim.ERROR), res.Status, "GetBlocks should have failed because the function does not exist")
268268
}

orderer/common/server/benchmark_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ const (
108108
// This is the hard limit for all types of tx, including config tx, which is normally
109109
// larger than 13 KB. Therefore, for config tx not to be rejected, this value cannot
110110
// be less than 13 KB.
111-
AbsoluteMaxBytes = 15 // KB
111+
AbsoluteMaxBytes = 16 // KB
112112
PreferredMaxBytes = 10 // KB
113113
ChannelProfile = localconfig.SampleSingleMSPChannelProfile
114114
)

sampleconfig/configtx.yaml

+15-15
Original file line numberDiff line numberDiff line change
@@ -340,57 +340,57 @@ Application: &ApplicationDefaults
340340
#---Lifecycle System Chaincode (lscc) function to policy mapping for access control---#
341341

342342
#ACL policy for lscc's "getid" function
343-
lscc.ChaincodeExists: /Channel/Application/Readers
343+
lscc/ChaincodeExists: /Channel/Application/Readers
344344

345345
#ACL policy for lscc's "getdepspec" function
346-
lscc.GetDeploymentSpec: /Channel/Application/Readers
346+
lscc/GetDeploymentSpec: /Channel/Application/Readers
347347

348348
#ACL policy for lscc's "getccdata" function
349-
lscc.GetChaincodeData: /Channel/Application/Readers
349+
lscc/GetChaincodeData: /Channel/Application/Readers
350350

351351
#---Query System Chaincode (qscc) function to policy mapping for access control---#
352352

353353
#ACL policy for qscc's "GetChainInfo" function
354-
qscc.GetChainInfo: /Channel/Application/Readers
354+
qscc/GetChainInfo: /Channel/Application/Readers
355355

356356
#ACL policy for qscc's "GetBlockByNumber" function
357-
qscc.GetBlockByNumber: /Channel/Application/Readers
357+
qscc/GetBlockByNumber: /Channel/Application/Readers
358358

359359
#ACL policy for qscc's "GetBlockByHash" function
360-
qscc.GetBlockByHash: /Channel/Application/Readers
360+
qscc/GetBlockByHash: /Channel/Application/Readers
361361

362362
#ACL policy for qscc's "GetTransactionByID" function
363-
qscc.GetTransactionByID: /Channel/Application/Readers
363+
qscc/GetTransactionByID: /Channel/Application/Readers
364364

365365
#ACL policy for qscc's "GetBlockByTxID" function
366-
qscc.GetBlockByTxID: /Channel/Application/Readers
366+
qscc/GetBlockByTxID: /Channel/Application/Readers
367367

368368
#---Configuration System Chaincode (cscc) function to policy mapping for access control---#
369369

370370
#ACL policy for cscc's "GetConfigBlock" function
371-
cscc.GetConfigBlock: /Channel/Application/Readers
371+
cscc/GetConfigBlock: /Channel/Application/Readers
372372

373373
#ACL policy for cscc's "GetConfigTree" function
374-
cscc.GetConfigTree: /Channel/Application/Readers
374+
cscc/GetConfigTree: /Channel/Application/Readers
375375

376376
#ACL policy for cscc's "SimulateConfigTreeUpdate" function
377-
cscc.SimulateConfigTreeUpdate: /Channel/Application/Writers
377+
cscc/SimulateConfigTreeUpdate: /Channel/Application/Writers
378378

379379
#---Miscellanesous peer function to policy mapping for access control---#
380380

381381
#ACL policy for invoking chaincodes on peer
382-
peer.Proposal: /Channel/Application/Writers
382+
peer/Proposal: /Channel/Application/Writers
383383

384384
#ACL policy for chaincode to chaincode invocation
385-
peer.ChaincodeToChaincode: /Channel/Application/Readers
385+
peer/ChaincodeToChaincode: /Channel/Application/Readers
386386

387387
#---Events resource to policy mapping for access control###---#
388388

389389
#ACL policy for sending block events
390-
event.Block: /Channel/Application/Readers
390+
event/Block: /Channel/Application/Readers
391391

392392
#ACL policy for sending filtered block events
393-
event.FilteredBlock: /Channel/Application/Readers
393+
event/FilteredBlock: /Channel/Application/Readers
394394

395395
# Organizations lists the orgs participating on the application side of the
396396
# network.

0 commit comments

Comments
 (0)