Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure Problem #168

Open
JhinQaQ opened this issue Feb 17, 2022 · 3 comments
Open

Configure Problem #168

JhinQaQ opened this issue Feb 17, 2022 · 3 comments
Labels
bug Something isn't working ethereum good first issue Good for newcomers help wanted Extra attention is needed

Comments

@JhinQaQ
Copy link

JhinQaQ commented Feb 17, 2022

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
Copy link
Contributor

davidkel commented Feb 17, 2022

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

  • npm install --only=prod @hyperledger/caliper-cli
  • npx caliper bind --caliper-bind-sut ethereum
  • npx caliper launch manager --caliper-workspace ./ --caliper-networkconfig networks/ethereum/1node-clique/networkconfig.json --caliper-benchconfig benchmarks/scenario/simple/config.yaml --caliper-flow-only-start
  • npx caliper launch manager --caliper-workspace ./ --caliper-networkconfig networks/ethereum/1node-clique/networkconfig.json --caliper-benchconfig benchmarks/scenario/simple/config.yaml --caliper-flow-skip-start --caliper-flow-skip-end

And then to bring down the docker container

  • npx caliper launch manager --caliper-workspace ./ --caliper-networkconfig networks/ethereum/1node-clique/networkconfig.json --caliper-benchconfig benchmarks/scenario/simple/config.yaml --caliper-flow-only-end

@JhinQaQ
Copy link
Author

JhinQaQ commented Feb 18, 2022

It works. Thank u!

@davidkel davidkel added the good first issue Good for newcomers label Feb 24, 2022
@davidkel davidkel added the help wanted Extra attention is needed label Mar 12, 2022
@IqraSA
Copy link

IqraSA commented Aug 30, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ethereum good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants