hyperledger / caliper-benchmarks

Sample benchmark files for Hyperledger Caliper https://wiki.hyperledger.org/display/caliper
https://hyperledger.github.io/caliper-benchmarks/
Apache License 2.0
113 stars 120 forks source link

Configure Problem #168

Open JhinQaQ opened 2 years ago

JhinQaQ commented 2 years ago

what should I configure here when using Ethereum?

--caliper-workspace --caliper-benchconfig --caliper-networkconfig


Error: Benchmark configuration file path is not set
I always get this error.
Thanks
davidkel commented 2 years ago

It looks as though the ethereum setup in caliper-benchmarks is broken. The setup of the docker image is broken and the following changes need to be made

File: networks/ethereum/1node-clique/caliper-ethereum-clique.Dockerfile change

FROM ethereum/client-go:stable

to

FROM ethereum/client-go:v1.10.12

File: networks/ethereum/1node-clique/docker-compose.yml delete the command: line and replace with

    command:
      - --unlock=0xc0A8e4D217eB85b812aeb1226fAb6F588943C2C2
      - --password=/root/.ethereum/keystore/password
      - --mine
      - --miner.threads=2
      - --miner.etherbase=0xc0A8e4D217eB85b812aeb1226fAb6F588943C2C2
      - --miner.gasprice=1
      - --ws
      - --ws.addr=0.0.0.0
      - --ws.origins='*'
      - --ws.api=admin,eth,miner,personal,web3
      - --allow-insecure-unlock
      - --nodiscover

file: networks/ethereum/1node-clique/networkconfig.json I removed some stuff so it now looks like

{
    "caliper": {
        "blockchain": "ethereum",
        "command" : {
            "start": "docker-compose -f ./networks/ethereum/1node-clique/docker-compose.yml up -d && sleep 10s",
            "end" : "docker-compose -f ./networks/ethereum/1node-clique/docker-compose.yml down"
          }
    },
    "ethereum": {
        "url": "ws://localhost:8546",
        "contractDeployerAddress": "0xc0A8e4D217eB85b812aeb1226fAb6F588943C2C2",
        "contractDeployerAddressPassword": "password",
        "fromAddress": "0xc0A8e4D217eB85b812aeb1226fAb6F588943C2C2",
        "fromAddressPassword": "password",
        "transactionConfirmationBlocks": 2,
        "contracts": {
            "simple": {
                "path": "src/ethereum/simple/simple.json"
            }
        }
    }
}

To run is also not trivial and I get unexpected errors unless I perform the steps exactly, so in your caliper-benchmarks directory

And then to bring down the docker container

JhinQaQ commented 2 years ago

It works. Thank u!

IqraSA commented 2 years ago

Screenshot from 2022-08-30 17-00-59 Hi I switched to Linux and followed exactly the steps you have mentioned but I am getting this error from the launch maanger.js