forked from hyperledger/caliper
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
TrustedBlockchain
committed
Jul 6, 2018
1 parent
3a4d85a
commit 1d76697
Showing
232 changed files
with
8,339 additions
and
674 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 |
---|---|---|
|
@@ -22,8 +22,3 @@ node_modules | |
|
||
# Plugins | ||
/src/gui | ||
/src/iroha | ||
|
||
# Contracts for plugins | ||
/src/contract/iroha | ||
|
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
The smallbank benchmark contains a series of transactions to simulate bank operations, including one transaction which creates accounts and others which perform banking transactions such as querying balances, depositing in accounts, paying money, etc. The benchmark intends to provide cross-platform workload for blockchain performance testing in the bank scene. | ||
|
||
At the beginning of the test, a specified number of bank accounts will be generated by submitting create_account transactions, the amount is specified by `accounts` attribute of the configuration. Then random transactions will be generated to simulate operating on those accounts. | ||
|
||
Please note `batch` concept is used in this benchmark, which means multiple transactions may be wrapped inside of a batch and submitted together if the blockchan system supports `batch` feature. For systems which do not support this feature, transactions will be submitted one by one. The transaction amount in a batch is specifed by the `txnPerBatch` attribute of the configuration. The feature can be disabled by setting `txnPerBatch` to 1. | ||
|
||
The transaction generating process may generate conflicting transactions, for example, updating same account's deposite at the same time or nearly at the same time. Some blockchain systems provides some kind of orchestration to decide execution order of conficting transactions, but some blockchain systems may just return errors for later updates if the ahead update has not been completed and let the application decide what to do (e.g re-submitting rejected transactions). Until now Caliper has not provided any application level optimization such as re-submitting for failed transactions for any blockchain system. So please note in this case, conflicting transactions may cause failures for some blockchain systems. | ||
|
||
This documentation is licensed under the Creative Commons Attribution 4.0 International License. You may obtain a copy of the license, titled CC-BY-4.0, at http://creativecommons.org/licenses/by/4.0/. |
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
{ | ||
"blockchain": { | ||
"type": "fabric", | ||
"config": "benchmark/smallbank/fabric.json" | ||
}, | ||
"command" : { | ||
"start": "docker-compose -f network/fabric/simplenetwork/docker-compose.yaml up -d", | ||
"end" : "docker-compose -f network/fabric/simplenetwork/docker-compose.yaml down;docker rm $(docker ps -aq)" | ||
}, | ||
"test": { | ||
"name": "smallbank", | ||
"description" : "This is smallbank benchmark for caliper", | ||
"clients": { | ||
"type": "local", | ||
"number": 5 | ||
}, | ||
"rounds": [ | ||
{ | ||
"label" : "smallOperations", | ||
"txNumber" : [4000], | ||
"rateControl" : [{"type": "fixed-rate", "opts": {"tps" : 200}}], | ||
"arguments": {"accounts":400, "txnPerBatch":10}, | ||
"callback" : "benchmark/smallbank/smallbankOperations.js" | ||
}, | ||
{ | ||
"label" : "query", | ||
"txNumber" : [2000], | ||
"rateControl" : [{"type": "fixed-rate", "opts": {"tps" : 200}}], | ||
"callback" : "benchmark/smallbank/query.js" | ||
}] | ||
}, | ||
"monitor": { | ||
"type": "docker", | ||
"docker":{ | ||
"name": ["all"] | ||
}, | ||
"interval": 1 | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,103 @@ | ||
{ | ||
"fabric": { | ||
"cryptodir": "network/fabric/simplenetwork/crypto-config", | ||
"network": { | ||
"orderer": { | ||
"url": "grpcs://localhost:7050", | ||
"mspid": "OrdererMSP", | ||
"user": { | ||
"key": "network/fabric/simplenetwork/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/keystore/be595291403ff68280a724d7e868521815ad9e2fc8c5486f6d7ce6b62d6357cd_sk", | ||
"cert": "network/fabric/simplenetwork/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/signcerts/Admin@example.com-cert.pem" | ||
}, | ||
"server-hostname": "orderer.example.com", | ||
"tls_cacerts": "network/fabric/simplenetwork/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/ca.crt" | ||
}, | ||
"org1": { | ||
"name": "peerOrg1", | ||
"mspid": "Org1MSP", | ||
"user": { | ||
"key": "network/fabric/simplenetwork/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/0d2b2fc385b10fa59003217e1bb5af2d24a3d762266e287867a1bc290eb44657_sk", | ||
"cert": "network/fabric/simplenetwork/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem" | ||
}, | ||
"ca": { | ||
"url": "https://localhost:7054", | ||
"name": "ca-org1" | ||
}, | ||
"peer1": { | ||
"requests": "grpcs://localhost:7051", | ||
"events": "grpcs://localhost:7053", | ||
"server-hostname": "peer0.org1.example.com", | ||
"tls_cacerts": "network/fabric/simplenetwork/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" | ||
}, | ||
"peer2": { | ||
"requests": "grpcs://localhost:7057", | ||
"events": "grpcs://localhost:7059", | ||
"server-hostname": "peer1.org1.example.com", | ||
"tls_cacerts": "network/fabric/simplenetwork/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt" | ||
} | ||
}, | ||
"org2": { | ||
"name": "peerOrg2", | ||
"mspid": "Org2MSP", | ||
"ca": { | ||
"url": "https://localhost:8054", | ||
"name": "ca-org2" | ||
}, | ||
"peer1": { | ||
"requests": "grpcs://localhost:8051", | ||
"events": "grpcs://localhost:8053", | ||
"server-hostname": "peer0.org2.example.com", | ||
"tls_cacerts": "network/fabric/simplenetwork/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt" | ||
}, | ||
"peer2": { | ||
"requests": "grpcs://localhost:8057", | ||
"events": "grpcs://localhost:8059", | ||
"server-hostname": "peer1.org2.example.com", | ||
"tls_cacerts": "network/fabric/simplenetwork/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt" | ||
} | ||
} | ||
}, | ||
"channel": [ | ||
{ | ||
"name": "mychannel", | ||
"config": "network/fabric/simplenetwork/mychannel.tx", | ||
"organizations": ["org1", "org2"], | ||
"deployed": false | ||
} | ||
], | ||
"chaincodes": [{"id": "smallbank", "path": "contract/fabric/smallbank", "language":"golang", "version": "v0", "channel": "mychannel"}], | ||
"endorsement-policy": { | ||
"identities": [ | ||
{ | ||
"role": { | ||
"name": "member", | ||
"mspId": "Org1MSP" | ||
} | ||
}, | ||
{ | ||
"role": { | ||
"name": "member", | ||
"mspId": "Org2MSP" | ||
} | ||
}, | ||
{ | ||
"role": { | ||
"name": "admin", | ||
"mspId": "Org1MSP" | ||
} | ||
} | ||
], | ||
"policy": { "2-of": [{"signed-by": 0}, {"signed-by": 1}]} | ||
}, | ||
"context": { | ||
"smallOperations": "mychannel", | ||
"query": "mychannel" | ||
} | ||
}, | ||
"info" : { | ||
"Version": "1.1.0", | ||
"Size": "4 Peers", | ||
"Orderer": "Solo", | ||
"Distribution": "Single Host" | ||
} | ||
} |
Oops, something went wrong.