Hey, I am trying to run ethereum benchmarks on my existing blockchain so far I have come across multiple error including
Gas Issue (Apparently the contract compiled by my truffle does not have a gas specified which I have to manually specify while executing the benchmarks)
After specifying gas price in the contract build I don't still don't get it in the init.js so I have to specify again.
contx.contracts.ProofC.gas = 67219750
contx.contracts.ProofC.estimateGas = 60000000
The above two issues I have overcome but not I am getting nonce issues. In run inside init.js I am repeatedly getting same nonce back which causes the first transaction to run and all others to fail.
Please note that I was able to run the existing sample benchmark flawlessly but for actual benchmark of my existing contract I have to use oraclize and as its running fine using web3 and metamask I just want to get performance indicators of my existing setup also right now i am not concerned with the gas estimate or cost i just want to have a benchmark on performance not the gas price used.
I have been stuck in this issue from a month please guide me and let me know anything you need.
Thanks in advance. Any help will be much appreciated.
Truffle using to compile the contracts:
module.exports = {
// See http://truffleframework.com/docs/advanced/configuration
// for more about customizing your Truffle configuration!
networks: {
development: {
host: "127.0.0.1",
port: 8545,
network_id: "*" // Match any network id
}
},
compilers: {
solc: {
version: "0.4.24",
settings: {
optimizer: {
enabled: true,
runs: 2000
},
},
optimizer: {
enabled: true,
runs: 2000
},
}
}
Hey, I am trying to run ethereum benchmarks on my existing blockchain so far I have come across multiple error including
Gas Issue (Apparently the contract compiled by my truffle does not have a gas specified which I have to manually specify while executing the benchmarks)
After specifying gas price in the contract build I don't still don't get it in the init.js so I have to specify again. contx.contracts.ProofC.gas = 67219750 contx.contracts.ProofC.estimateGas = 60000000
The above two issues I have overcome but not I am getting nonce issues. In run inside init.js I am repeatedly getting same nonce back which causes the first transaction to run and all others to fail.
Please note that I was able to run the existing sample benchmark flawlessly but for actual benchmark of my existing contract I have to use oraclize and as its running fine using web3 and metamask I just want to get performance indicators of my existing setup also right now i am not concerned with the gas estimate or cost i just want to have a benchmark on performance not the gas price used.
I have been stuck in this issue from a month please guide me and let me know anything you need. Thanks in advance. Any help will be much appreciated.
Truffle using to compile the contracts:
module.exports = { // See http://truffleframework.com/docs/advanced/configuration // for more about customizing your Truffle configuration! networks: { development: { host: "127.0.0.1", port: 8545, network_id: "*" // Match any network id } }, compilers: { solc: { version: "0.4.24", settings: { optimizer: { enabled: true, runs: 2000 }, }, optimizer: { enabled: true, runs: 2000 }, } }
}; ============================ OUTPUT ================
========================= init.js ======================================
'use strict';
const web3 = require('web3')
module.exports.info = 'Creating Proof chain.';
let bc, contx; let runTimes = 0 module.exports.init = function (blockchain, context, args) { bc = blockchain; contx = context;
};
module.exports.run = async function () { let args;
};
module.exports.end = function () { return Promise.resolve(); };
================== Run Command ============== npx caliper launch master --caliper-bind-sut ethereum:latest --caliper-benchconfig benchmarks/samples/ethereum/config.yaml --caliper-networkconfig networks/ethereum/1node/ethereum.json --caliper-workspace ./