caliper icon indicating copy to clipboard operation
caliper copied to clipboard

[Declarative Workload] Add selected contract and function information to the generated parameters

Open aklenik opened this issue 4 years ago • 0 comments

Please share the technical limitation of Caliper that you encountered.

The data provided by the declarative workload module only contains the parameter names and values: https://github.com/hyperledger/caliper/blob/f0553d1bf05711a671db99af0704c5e1b5fb816d/packages/caliper-core/lib/worker/workload/declarative/declarative-workload-module-base.js#L73

More information is needed for the user to build a TX request, namely the smart contract and function name.

Please detail your feature idea that could alleviate the limitation.

The Contract and Function classes should also include their name (which needs to be saved) in their generator functions.

Please share some details about your use case if possible, and how the new feature would make Caliper a better performance benchmarking framework.

No response

Please share any suggestions about the new feature's code/configuration API (using formatted YAML segments or pseudo-code).

Currently, this is the structure of a generated object (originating from the Function class):

param1: value1
param2: value2

It should look like this on the Function level (the function name should be added):

function: function1
parameters:
    param1: value1
    param2: value2

Then the Contract class can extend this structure with its own name:

contract: contract1
function: function1
parameters:
    param1: value1
    param2: value2

aklenik avatar Jan 19 '22 10:01 aklenik