-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge "[FAB-3546 PTE supports multi-orderers]"
- Loading branch information
Showing
6 changed files
with
199 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -429,23 +429,35 @@ where: | |
The service credentials contain the information of the network and are stored in the `SCFiles` directory. The following is a sample of the service credentials json file: | ||
``` | ||
{ | ||
"test-network": { | ||
"orderer": { | ||
"name": "OrdererMSP", | ||
"mspid": "OrdererMSP", | ||
"mspPath": "./crypto-config", | ||
"adminPath": "./crypto-config/ordererOrganizations/example.com/users/[email protected]/msp", | ||
"comName": "example.com", | ||
"url": "grpcs://localhost:5005", | ||
"server-hostname": "orderer0.example.com", | ||
"tls_cacerts": "./crypto-config/ordererOrganizations/example.com/orderers/orderer0.example.com/msp/cacerts/ca.example.com-cert.pem" | ||
"orderer": { | ||
"orderer0": { | ||
"name": "OrdererMSP", | ||
"mspid": "OrdererMSP", | ||
"mspPath": "./crypto-config", | ||
"adminPath": "./crypto-config/ordererOrganizations/example.com/users/[email protected]/msp", | ||
"comName": "example.com", | ||
"url": "grpcs://localhost:7050", | ||
"server-hostname": "orderer0.example.com", | ||
"tls_cacerts": "./crypto-config/ordererOrganizations/example.com/orderers/orderer0.example.com/msp/cacerts/ca.example.com-cert.pem" | ||
}, | ||
"orderer1": { | ||
"name": "OrdererMSP", | ||
"mspid": "OrdererMSP", | ||
"mspPath": "./crypto-config", | ||
"adminPath": "./crypto-config/ordererOrganizations/example.com/users/[email protected]/msp", | ||
"comName": "example.com", | ||
"url": "grpcs://localhost:8050", | ||
"server-hostname": "orderer1.example.com", | ||
"tls_cacerts": "./crypto-config/ordererOrganizations/example.com/orderers/orderer1.example.com/msp/cacerts/ca.example.com-cert.pem" | ||
} | ||
}, | ||
"org1": { | ||
"name": "Org1MSP", | ||
"mspid": "Org1MSP", | ||
"mspPath": "./crypto-config", | ||
"adminPath": "./crypto-config/peerOrganizations/org1.example.com/users/[email protected]/msp", | ||
"comName": "example.com", | ||
"ordererID": "orderer0", | ||
"ca": { | ||
"url":"https://localhost:7054", | ||
"name": "ca-org1" | ||
|
@@ -471,6 +483,7 @@ The service credentials contain the information of the network and are stored in | |
"mspPath": "./crypto-config", | ||
"adminPath": "./crypto-config/peerOrganizations/org2.example.com/users/[email protected]/msp", | ||
"comName": "example.com", | ||
"ordererID": "orderer1", | ||
"ca": { | ||
"url":"https://localhost:8054", | ||
"name": "ca-org2" | ||
|
@@ -494,6 +507,8 @@ The service credentials contain the information of the network and are stored in | |
} | ||
``` | ||
## Sending transactions to multiple orderers | ||
PTE supports multi orderers by specifying an orderer to each organization using `ordererID` in the Service credentials json file. Then PTE will direct all transactions target the peers in that organization to the specified orderer. | ||
## Creating a local Fabric network | ||
- If you do not yet have the Fabric docker images in your local docker registry, please either build them from Fabric source or download them from dockerhub. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,71 @@ | ||
{ | ||
"test-network": { | ||
"orderer": { | ||
"name": "OrdererOrg1", | ||
"mspid": "OrdererOrg1", | ||
"mspPath": "/root/gopath/src/github.com/hyperledger/fabric/common/tools/cryptogen/crypto-config", | ||
"adminPath": "/root/gopath/src/github.com/hyperledger/fabric/common/tools/cryptogen/crypto-config/ordererOrganizations/example.com/users/[email protected]/msp", | ||
"comName": "example.com", | ||
"url": "grpcs://10.120.223.35:5005", | ||
"server-hostname": "example.com", | ||
"tls_cacerts": "/root/gopath/src/github.com/hyperledger/fabric/common/tools/cryptogen/crypto-config/ordererOrganizations/example.com/orderers/orderer1.example.com/msp/cacerts/ca.example.com-cert.pem" | ||
"orderer1": { | ||
"name": "OrdererMSP", | ||
"mspid": "OrdererMSP", | ||
"mspPath": "./crypto-config", | ||
"adminPath": "./crypto-config/ordererOrganizations/example.com/users/[email protected]/msp", | ||
"comName": "example.com", | ||
"url": "grpcs://localhost:7050", | ||
"server-hostname": "orderer0.example.com", | ||
"tls_cacerts": "./crypto-config/ordererOrganizations/example.com/orderers/orderer0.example.com/msp/cacerts/ca.example.com-cert.pem" | ||
}, | ||
"orderer2": { | ||
"name": "OrdererMSP", | ||
"mspid": "OrdererMSP", | ||
"mspPath": "./crypto-config", | ||
"adminPath": "./crypto-config/ordererOrganizations/example.com/users/[email protected]/msp", | ||
"comName": "example.com", | ||
"url": "grpcs://localhost:8050", | ||
"server-hostname": "orderer1.example.com", | ||
"tls_cacerts": "./crypto-config/ordererOrganizations/example.com/orderers/orderer1.example.com/msp/cacerts/ca.example.com-cert.pem" | ||
} | ||
}, | ||
"org1": { | ||
"name": "PeerOrg1", | ||
"mspid": "PeerOrg1", | ||
"mspPath": "/root/gopath/src/github.com/hyperledger/fabric/common/tools/cryptogen/crypto-config", | ||
"adminPath": "/root/gopath/src/github.com/hyperledger/fabric/common/tools/cryptogen/crypto-config/peerOrganizations/org1.example.com/users/[email protected]/msp", | ||
"name": "Org1MSP", | ||
"mspid": "Org1MSP", | ||
"mspPath": "./crypto-config", | ||
"adminPath": "./crypto-config/peerOrganizations/org1.example.com/users/[email protected]/msp", | ||
"comName": "example.com", | ||
"ordererID": "orderer1", | ||
"ca": { | ||
"url":"https://10.120.223.35:7054", | ||
"url":"https://localhost:7054", | ||
"name": "ca-org1" | ||
}, | ||
"username": "admin", | ||
"secret": "adminpw", | ||
"peer1": { | ||
"requests": "grpcs://10.120.223.35:7061", | ||
"events": "grpcs://10.120.223.35:6051", | ||
"requests": "grpcs://localhost:7051", | ||
"events": "grpcs://localhost:7053", | ||
"server-hostname": "peer0.org1.example.com", | ||
"tls_cacerts": "/root/gopath/src/github.com/hyperledger/fabric/common/tools/cryptogen/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem" | ||
}, | ||
"peer2": { | ||
"requests": "grpcs://10.120.223.35:7062", | ||
"events": "grpcs://10.120.223.35:6052", | ||
"server-hostname": "peer1.org1.example.com", | ||
"tls_cacerts": "/root/gopath/src/github.com/hyperledger/fabric/common/tools/cryptogen/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem" | ||
"tls_cacerts": "./crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem" | ||
} | ||
}, | ||
"org2": { | ||
"name": "PeerOrg2", | ||
"mspid": "PeerOrg2", | ||
"mspPath": "/root/gopath/src/github.com/hyperledger/fabric/common/tools/cryptogen/crypto-config", | ||
"adminPath": "/root/gopath/src/github.com/hyperledger/fabric/common/tools/cryptogen/crypto-config/peerOrganizations/org2.example.com/users/[email protected]/msp", | ||
"name": "Org2MSP", | ||
"mspid": "Org2MSP", | ||
"mspPath": "./crypto-config", | ||
"adminPath": "./crypto-config/peerOrganizations/org2.example.com/users/[email protected]/msp", | ||
"comName": "example.com", | ||
"ordererID": "orderer2", | ||
"ca": { | ||
"url":"https://10.120.223.35:7055", | ||
"url":"https://localhost:8054", | ||
"name": "ca-org2" | ||
}, | ||
"username": "admin", | ||
"secret": "adminpw", | ||
"peer1": { | ||
"requests": "grpcs://10.120.223.35:7063", | ||
"events": "grpcs://10.120.223.35:6053", | ||
"requests": "grpcs://localhost:9051", | ||
"events": "grpcs://localhost:9053", | ||
"server-hostname": "peer0.org2.example.com", | ||
"tls_cacerts": "/root/gopath/src/github.com/hyperledger/fabric/common/tools/cryptogen/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp/cacerts/ca.org2.example.com-cert.pem" | ||
"tls_cacerts": "./crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp/cacerts/ca.org2.example.com-cert.pem" | ||
}, | ||
"peer2": { | ||
"requests": "grpcs://10.120.223.35:7064", | ||
"events": "grpcs://10.120.223.35:6054", | ||
"requests": "grpcs://localhost:10051", | ||
"events": "grpcs://localhost:10053", | ||
"server-hostname": "peer1.org2.example.com", | ||
"tls_cacerts": "/root/gopath/src/github.com/hyperledger/fabric/common/tools/cryptogen/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/msp/cacerts/ca.org2.example.com-cert.pem" | ||
"tls_cacerts": "./crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/msp/cacerts/ca.org2.example.com-cert.pem" | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,97 @@ | ||
{ | ||
"test-network": { | ||
"orderer": { | ||
"name": "OrdererOrg1", | ||
"mspid": "OrdererOrg1", | ||
"mspPath": "/root/gopath/src/github.com/hyperledger/fabric/common/tools/cryptogen/crypto-config", | ||
"adminPath": "/root/gopath/src/github.com/hyperledger/fabric/common/tools/cryptogen/crypto-config/ordererOrganizations/example.com/users/[email protected]/msp", | ||
"comName": "example.com", | ||
"url": "grpcs://10.120.223.35:5005", | ||
"server-hostname": "example.com", | ||
"tls_cacerts": "/root/gopath/src/github.com/hyperledger/fabric/common/tools/cryptogen/crypto-config/ordererOrganizations/example.com/orderers/orderer1.example.com/msp/cacerts/ca.example.com-cert.pem" | ||
"orderer0": { | ||
"name": "OrdererMSP", | ||
"mspid": "OrdererMSP", | ||
"mspPath": "./crypto-config", | ||
"adminPath": "./crypto-config/ordererOrganizations/example.com/users/[email protected]/msp", | ||
"comName": "example.com", | ||
"url": "grpcs://localhost:8050", | ||
"server-hostname": "orderer0.example.com", | ||
"tls_cacerts": "./crypto-config/ordererOrganizations/example.com/orderers/orderer0.example.com/msp/cacerts/ca.example.com-cert.pem" | ||
}, | ||
"orderer1": { | ||
"name": "OrdererMSP", | ||
"mspid": "OrdererMSP", | ||
"mspPath": "./crypto-config", | ||
"adminPath": "./crypto-config/ordererOrganizations/example.com/users/[email protected]/msp", | ||
"comName": "example.com", | ||
"url": "grpcs://localhost:8050", | ||
"server-hostname": "orderer1.example.com", | ||
"tls_cacerts": "./crypto-config/ordererOrganizations/example.com/orderers/orderer1.example.com/msp/cacerts/ca.example.com-cert.pem" | ||
}, | ||
"orderer2": { | ||
"name": "OrdererMSP", | ||
"mspid": "OrdererMSP", | ||
"mspPath": "./crypto-config", | ||
"adminPath": "./crypto-config/ordererOrganizations/example.com/users/[email protected]/msp", | ||
"comName": "example.com", | ||
"url": "grpcs://localhost:9050", | ||
"server-hostname": "orderer2.example.com", | ||
"tls_cacerts": "./crypto-config/ordererOrganizations/example.com/orderers/orderer2.example.com/msp/cacerts/ca.example.com-cert.pem" | ||
}, | ||
"orderer3": { | ||
"name": "OrdererMSP", | ||
"mspid": "OrdererMSP", | ||
"mspPath": "./crypto-config", | ||
"adminPath": "./crypto-config/ordererOrganizations/example.com/users/[email protected]/msp", | ||
"comName": "example.com", | ||
"url": "grpcs://localhost:10050", | ||
"server-hostname": "orderer3.example.com", | ||
"tls_cacerts": "./crypto-config/ordererOrganizations/example.com/orderers/orderer3.example.com/msp/cacerts/ca.example.com-cert.pem" | ||
} | ||
}, | ||
"org1": { | ||
"name": "PeerOrg1", | ||
"mspid": "PeerOrg1", | ||
"mspPath": "/root/gopath/src/github.com/hyperledger/fabric/common/tools/cryptogen/crypto-config", | ||
"adminPath": "/root/gopath/src/github.com/hyperledger/fabric/common/tools/cryptogen/crypto-config/peerOrganizations/org1.example.com/users/[email protected]/msp", | ||
"name": "Org1MSP", | ||
"mspid": "Org1MSP", | ||
"mspPath": "./crypto-config", | ||
"adminPath": "./crypto-config/peerOrganizations/org1.example.com/users/[email protected]/msp", | ||
"comName": "example.com", | ||
"ordererID": "orderer2", | ||
"ca": { | ||
"url":"https://10.120.223.35:7054", | ||
"url":"https://localhost:7054", | ||
"name": "ca-org1" | ||
}, | ||
"username": "admin", | ||
"secret": "adminpw", | ||
"peer1": { | ||
"requests": "grpcs://10.120.223.35:7061", | ||
"events": "grpcs://10.120.223.35:6051", | ||
"requests": "grpcs://localhost:7051", | ||
"events": "grpcs://localhost:7053", | ||
"server-hostname": "peer0.org1.example.com", | ||
"tls_cacerts": "/root/gopath/src/github.com/hyperledger/fabric/common/tools/cryptogen/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem" | ||
"tls_cacerts": "./crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem" | ||
}, | ||
"peer2": { | ||
"requests": "grpcs://10.120.223.35:7062", | ||
"events": "grpcs://10.120.223.35:6052", | ||
"server-hostname": "peer1.org1.example.com", | ||
"tls_cacerts": "/root/gopath/src/github.com/hyperledger/fabric/common/tools/cryptogen/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem" | ||
} | ||
"requests": "grpcs://localhost:8051", | ||
"events": "grpcs://localhost:8053", | ||
"server-hostname": "peer1.org1.example.com", | ||
"tls_cacerts": "./crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem" | ||
} | ||
}, | ||
"org2": { | ||
"name": "PeerOrg2", | ||
"mspid": "PeerOrg2", | ||
"mspPath": "/root/gopath/src/github.com/hyperledger/fabric/common/tools/cryptogen/crypto-config", | ||
"adminPath": "/root/gopath/src/github.com/hyperledger/fabric/common/tools/cryptogen/crypto-config/peerOrganizations/org2.example.com/users/[email protected]/msp", | ||
"name": "Org2MSP", | ||
"mspid": "Org2MSP", | ||
"mspPath": "./crypto-config", | ||
"adminPath": "./crypto-config/peerOrganizations/org2.example.com/users/[email protected]/msp", | ||
"comName": "example.com", | ||
"ordererID": "orderer3", | ||
"ca": { | ||
"url":"https://10.120.223.35:7055", | ||
"url":"https://localhost:8054", | ||
"name": "ca-org2" | ||
}, | ||
"username": "admin", | ||
"secret": "adminpw", | ||
"peer1": { | ||
"requests": "grpcs://10.120.223.35:7063", | ||
"events": "grpcs://10.120.223.35:6053", | ||
"requests": "grpcs://localhost:9051", | ||
"events": "grpcs://localhost:9053", | ||
"server-hostname": "peer0.org2.example.com", | ||
"tls_cacerts": "/root/gopath/src/github.com/hyperledger/fabric/common/tools/cryptogen/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp/cacerts/ca.org2.example.com-cert.pem" | ||
"tls_cacerts": "./crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp/cacerts/ca.org2.example.com-cert.pem" | ||
}, | ||
"peer2": { | ||
"requests": "grpcs://10.120.223.35:7064", | ||
"events": "grpcs://10.120.223.35:6054", | ||
"requests": "grpcs://localhost:10051", | ||
"events": "grpcs://localhost:10053", | ||
"server-hostname": "peer1.org2.example.com", | ||
"tls_cacerts": "/root/gopath/src/github.com/hyperledger/fabric/common/tools/cryptogen/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/msp/cacerts/ca.org2.example.com-cert.pem" | ||
"tls_cacerts": "./crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/msp/cacerts/ca.org2.example.com-cert.pem" | ||
} | ||
} | ||
} | ||
|
Oops, something went wrong.