Giter Site home page Giter Site logo

caliper-min's People

Contributors

lung21 avatar nvrdftd avatar ruan0007 avatar zhu-ch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

caliper-min's Issues

Reproduce experiments in SIGMOD 20 paper

Hi, I follow the README.md under the path "caliper-min/benchmark/custom/". When I run experiment using the command such as "./exp.sh "workload/intro/empty.json" "sharp"", it occurs some errors as follows:

Start experiment on Fabric SHARP for workload intro/empty
----------Launch Fabric------------
Creating network "simpledocker_basic" with the default driver
Creating orderer.example.com ... done
Creating peer0.org1.example.com ... done
----------Run the benchmark------------
module.js:549
    throw err;
    ^

Error: Cannot find module 'commander'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at main (/home/ada/go/src/github.com/hyperledger/caliper-min/benchmark/custom/main.js:42:19)
    at Object.<anonymous> (/home/ada/go/src/github.com/hyperledger/caliper-min/benchmark/custom/main.js:91:1)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
--------- Shut down Fabric-------------
WARNING: The BLOCK_SIZE variable is not set. Defaulting to a blank string.
WARNING: The TXN_SPAN_LIMIT variable is not set. Defaulting to a blank string.
WARNING: The CC_TYPE variable is not set. Defaulting to a blank string.
Stopping peer0.org1.example.com ... done
Stopping orderer.example.com    ... done
Removing peer0.org1.example.com ... done
Removing orderer.example.com    ... done
Removing network simpledocker_basic
----------Process the logs for more measurements------------
Traceback (most recent call last):
  File "fabric_log_script/process_occ-sharp_orderer.py", line 100, in <module>
    sys.exit(main())
  File "fabric_log_script/process_occ-sharp_orderer.py", line 74, in main
    print "Process Txn Delay (us)\t", totalProcessTxnDelay / scheduleTxnCount
ZeroDivisionError: integer division or modulo by zero
    Dump orderer measurements  to result/17-04/sharp/intro/empty/orderer.stat
Finish experiment on Fabric SHARP for workload intro/empty

Problem instantiating chaincode

Greetings. I am trying to use your Caliper variant with the BFT-SMaRt ordering service for Fabric. However, I am having trouble with progressing beyond chaincode instantiation. I am able to create the channel and install the chaincode for the smallbank benchmark without issues, but then when it is time to actually instantiate it, I get this error:

node main.js -c fabric-config.json -n ../../network/fabric/bftsmart/setup.json 
TAP version 13
# #######Caliper Test######
Creating empty stat file in /data/ruanpc/exp_stat/caliper/12-08/smallbank/fabric-config.json.res
sleep 5
# create mychannel......
ok 1 created mychannel successfully
# Sleep 5s......
# Join channel......
# join mychannel
ok 2 Successfully joined mychannel
# install all chaincodes......
ok 3 Installed chaincode smallbank successfully in all peers
# Instantiate chaincode......
not ok 4 Failed to instantiate chaincodes, Error: Failed to send instantiate due to error: Error: Failed to send instantiate proposal due to error: Error: "targets" parameter not specified and no peers are set on this Channel instance or specfied for this channel in the network at Channel._getTargets (/root/caliper/node_modules/fabric-client/lib/Channel.js:3541:10) at Channel._sendChaincodeProposal (/root/caliper/node_modules/fabric-client/lib/Channel.js:2581:22) at Channel.sendInstantiateProposal (/root/caliper/node_modules/fabric-client/lib/Channel.js:2540:15) at Client.newDefaultKeyValueStore.then.then.then (/root/caliper/packages/caliper-min/src/fabric/e2eUtils.js:486:28) at <anonymous> at Client.newDefaultKeyValueStore.then.then.then.then (/root/caliper/packages/caliper-min/src/fabric/e2eUtils.js:564:15) at <anonymous> at Client.newDefaultKeyValueStore.then.then.then.then.then (/root/caliper/packages/caliper-min/src/fabric/e2eUtils.js:573:15) at <anonymous>
  ---
    operator: fail
    at: chaincodes.reduce.then.catch (/root/caliper/packages/caliper-min/src/fabric/instantiate-chaincode.js:64:19)
    stack: |-
      Error: Failed to instantiate chaincodes, Error: Failed to send instantiate due to error: Error: Failed to send instantiate proposal due to error: Error: "targets" parameter not specified and no peers are set on this Channel instance or specfied for this channel in the network 
          at Channel._getTargets (/root/caliper/node_modules/fabric-client/lib/Channel.js:3541:10)
          at Channel._sendChaincodeProposal (/root/caliper/node_modules/fabric-client/lib/Channel.js:2581:22)
          at Channel.sendInstantiateProposal (/root/caliper/node_modules/fabric-client/lib/Channel.js:2540:15)
          at Client.newDefaultKeyValueStore.then.then.then (/root/caliper/packages/caliper-min/src/fabric/e2eUtils.js:486:28)
          at <anonymous>
          at Client.newDefaultKeyValueStore.then.then.then.then (/root/caliper/packages/caliper-min/src/fabric/e2eUtils.js:564:15)
          at <anonymous>
          at Client.newDefaultKeyValueStore.then.then.then.then.then (/root/caliper/packages/caliper-min/src/fabric/e2eUtils.js:573:15)
          at <anonymous>
          at Test.assert [as _assert] (/root/caliper/packages/caliper-min/node_modules/tape/lib/test.js:225:54)
          at Test.bound [as _assert] (/root/caliper/packages/caliper-min/node_modules/tape/lib/test.js:77:32)
          at Test.fail (/root/caliper/packages/caliper-min/node_modules/tape/lib/test.js:318:10)
          at Test.bound [as fail] (/root/caliper/packages/caliper-min/node_modules/tape/lib/test.js:77:32)
          at chaincodes.reduce.then.catch (/root/caliper/packages/caliper-min/src/fabric/instantiate-chaincode.js:64:19)
          at <anonymous>
  ...
fabric.installSmartContract() failed, Error: Fabric: instantiate chaincodes failed
    at chaincodes.reduce.then.catch (/root/caliper/packages/caliper-min/src/fabric/instantiate-chaincode.js:65:31)
    at <anonymous>
info: [demo.js]: [Transaction Info] - Submitted: 0 Succ: 0 Fail:0 Unfinished:0
unexpected error, Error: Fabric: instantiate chaincodes failed
    at chaincodes.reduce.then.catch (/root/caliper/packages/caliper-min/src/fabric/instantiate-chaincode.js:65:31)
    at <anonymous>
 sleep 5

From what I can understand, this is something that happens within Caliper itself, and not an error in any of the components of Fabric. This leads me to infer that the problem must be on my network configuration file. Here it is the configuration I am using:

{
  "fabric": {
    "channel": [
      {
        "config": "/root/fabric/bftsmart/config/mychannel.tx",
        "deployed": false,
        "name": "mychannel",
        "organizations": [
          "lasige",
          "ibm"
        ]
      }
    ],
    "cryptodir": "/root/fabric/bftsmart/config/crypto-config",
    "endorsement-policy": {
      "identities": [
        {
          "role": {
            "mspId": "LaSIGEMSP",
            "name": "member"
          }
        },
        {
          "role": {
            "mspId": "IBMMSP",
            "name": "member"
          }
        }
      ],
      "policy": {
        "2-of": [
          {
            "signed-by": 0
          },
          {
            "signed-by": 1
          }
        ]
      }
    },
    "network": {
      "orderers": [
        {
          "mspid": "FrontendsMSP",
          "server-hostname": "1000.frontend.bft",
          "tls_cacerts": "/root/fabric/bftsmart/config/crypto-config/ordererOrganizations/frontend.bft/users/[email protected]/tls/ca.crt",
          "url": "grpc://s2:7050",
          "user": {
            "cert": "/root/fabric/bftsmart/config/crypto-config/ordererOrganizations/frontend.bft/users/[email protected]/msp/signcerts/[email protected]",
            "key": "/root/fabric/bftsmart/config/crypto-config/ordererOrganizations/frontend.bft/users/[email protected]/msp/keystore/key.pem"
          }
        },
        {
          "mspid": "FrontendsMSP",
          "server-hostname": "2000.frontend.bft",
          "tls_cacerts": "/root/fabric/bftsmart/config/crypto-config/ordererOrganizations/frontend.bft/users/[email protected]/tls/ca.crt",
          "url": "grpc://s3:8050",
          "user": {
            "cert": "/root/fabric/bftsmart/config/crypto-config/ordererOrganizations/frontend.bft/users/[email protected]/msp/signcerts/[email protected]",
            "key": "/root/fabric/bftsmart/config/crypto-config/ordererOrganizations/frontend.bft/users/[email protected]/msp/keystore/key.pem"
          }
        }
      ],
      "lasige": {
        "mspid": "LaSIGEMSP",
        "name": "peerlasige",
        "peer0": {
          "requests": "grpc://s7:7051",
          "server-hostname": "0.peer.lasige.bft",
          "tls_cacerts": "/root/fabric/bftsmart/config/crypto-config/peerOrganizations/lasige.bft/peers/0.peer.lasige.bft/tls/ca.crt"
        },
        "user": {
          "cert": "/root/fabric/bftsmart/config/crypto-config/peerOrganizations/lasige.bft/users/[email protected]/msp/signcerts/[email protected]",
          "key": "/root/fabric/bftsmart/config/crypto-config/peerOrganizations/lasige.bft/users/[email protected]/msp/keystore/key.pem"
        }
      },
      "ibm": {
        "mspid": "IBMMSP",
        "name": "peeribm",
        "peer0": {
          "requests": "grpc://s9:8051",
          "server-hostname": "0.peer.ibm.bft",
          "tls_cacerts": "/root/fabric/bftsmart/config/crypto-config/peerOrganizations/ibm.bft/peers/0.peer.ibm.bft/tls/ca.crt"
        },
        "user": {
          "cert": "/root/fabric/bftsmart/config/crypto-config/peerOrganizations/ibm.bft/users/[email protected]/msp/signcerts/[email protected]",
          "key": "/root/fabric/bftsmart/config/crypto-config/peerOrganizations/ibm.bft/users/[email protected]/msp/keystore/key.pem"
        }
      }
    }
  },
  "info": {
    "Distribution": "Single Host",
    "Orderer": "bftsmart",
    "Size": "Multi Peers",
    "Version": "1.3.0"
  }
}

I based this configuration in your own samples. What could I be missing?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.