dongmingh / PTEv2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Performance Traffic Engine v2 - PTEv2

The Performance Traffic Engine v2 (PTEv2) uses high level SDKs Hyperledger Fabric SDK Node to interact with Hyperledger Fabric networks while retaining all the features of PTE, such as flexibility and scalability. PTEv2 is operated in the same way as PTE.

What's New in PTEv2

queryResult

A new parameter, queryResult, is added to the User Input File to write every query transaction result to PTE log when set to TRUE. The default is FALSE. This parameter is set to TRUE if invokeCheck is TRUE.

transient map

Three transient map related parameters are added in the ccOpt section of the User Input File to alter chaincode transient map.

"ccOpt": {
    ... ,
    "transMapKey": [],
    "transMapKeyIdx": [],
    "transMapKeyType": []
}

where

  • transMapKey: the key of the transient map of the payload
  • transMapKeyIdx: a list of keys in transient map to be altered
  • transMapKeyType: a list of key types corresponding to the transMapKeyIdx

Example

For marbles02 private chaincode, the invoke transient map are

"invoke": {
    "move": {
        "fcn": "initMarble",
        "transientMap": {"marble": {"name": "marble", "color": "blue", "size": 35, "owner": "tom", "price": 99}},
        "args": []
    }
}

If the transMap parameters are set to

"ccOpt": {
    ... ,
    "transMapKey": ["marble"],
    "transMapKeyIdx": ["name", "owner", "price"],
    "transMapKeyType": ["string", "string", "integer"]
}

Then PTEv2 will generate a unique name, a unique owner, and a random number as price for each transaction. The transient map will be like

{"marble": {"name": "<generated-name>", "color": "blue", "size": 35, "owner": "<generated-owner>", "price": <generated-random-number>}}

Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License.

About


Languages

Language:JavaScript 100.0%