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

ERC20 caliper benchmark get stuck in loop #269

Open victoryeo opened 1 month ago

victoryeo commented 1 month ago

ERC20 caliper benchmark get stuck in loop

2024.07.31-09:15:49.562 info [caliper] [default-observer] [50 txns with Round 0 Transaction Info] - Submitted: 50 Succ: 0 Fail:0 Unfinished:50 (the same message keep repeating.....)

victoryeo commented 1 month ago

If i Ctrl-C and run the test again, it shows: 2024.07.31-10:40:45.851 error [caliper] [ethereum-connector] Failed tx on ERC20; calling method: transfer; nonce: 0x64 2024.07.31-10:40:45.851 error [caliper] [ethereum-connector] Error: Returned error: Known transaction

victoryeo commented 1 month ago

The besu node is started with this private key: 0xa67bee5d6fb43acd42e307eb67547ab5006ad2fbb9567829e9b4b2ef3580acea If change the private key, the caliper benchmark test won't work and test get stuck with the below: info [caliper] [default-observer] [50 txns with Round 0 Transaction Info] - Submitted: 50 Succ: 0 Fail:0 Unfinished:50

davidkel commented 1 month ago

Running the following against a clean clone of caliper-benchmarks

        npm install --only=prod @hyperledger/caliper-cli@0.6.0
        npx caliper bind --caliper-bind-sut besu:latest
        npx caliper --version
        npx caliper launch manager \
        --caliper-benchconfig benchmarks/scenario/ERC-20/config.yaml \
        --caliper-networkconfig networks/besu/1node-clique/erc20networkconfig.json \
        --caliper-workspace .
        npx caliper launch manager \
        --caliper-benchconfig benchmarks/scenario/ERC-721/config.yaml \
        --caliper-networkconfig networks/besu/1node-clique/erc721networkconfig.json \
        --caliper-workspace .
        npx caliper launch manager --caliper-benchconfig benchmarks/scenario/simple/config.yaml --caliper-networkconfig networks/besu/1node-clique/networkconfig.json --caliper-workspace .

All of these work for me. Can you describe what you did differently to this ?

victoryeo commented 1 month ago

Sure, i run a besu node from command line (the genesis.json and keys/key are from networks/besu/1node-clique/data and keys):

./bin/besu --data-path=./tmpDir --genesis-file=./genesis.json --node-private-key-file=./keys/key --revert-reason-enabled --rpc-ws-enabled=true --rpc-ws-host=0.0.0.0 --host-allowlist=*  --rpc-ws-apis=ADMIN,ETH,MINER,WEB3,NET,PRIV,EEA --graphql-http-enabled --discovery-enabled=false --min-gas-price=0

and empty the command section in json file

        "blockchain": "ethereum",
        "command" : {}
    },

the benchmark test would work

victoryeo commented 1 month ago

but once i modify keys/key to other private key. the benchmark test would fail.

davidkel commented 1 month ago

@victoryeo ok, so unfortunately I have no knowledge of ethereum or besu so not much more I can do. Maybe @aklenik can help here