blockchain

Something wrong on deploy chaincode for hyperledger v1.0

怎甘沉沦 提交于 2019-12-02 10:34:13
I have tried to use docker toolbox to setup Hyperledger V1.0 in my local machines. I according to this document: http://hyperledger-fabric.readthedocs.io/en/latest/asset_setup.html But when I tried to deploy chaincode. $node deploy.js I got an error message: info: Returning a new winston logger with default configurations info: [Chain.js]: Constructed Chain instance: name - fabric-client1, securityEnabled: true, TCert download batch size: 10, network mode: true info: [Peer.js]: Peer.const - url: grpc://localhost:8051 options grpc.ssl_target_name_override=tlsca, grpc.default_authority=tlsca

Composite key vs Single key append strings

浪尽此生 提交于 2019-12-02 09:07:52
Watching many examples in Hyperledger Fabric I found two ways to achieved a key: Let's suposse we have two fields visa and type of visa. Visa: "1212323" Type of Visa: "Student Visa" So we can create a key neither: Using CompositeKey function provide by stub key, err := stub.CreateCompositeKey(indexName,[]string{visa, typeVisa}) stub.PutState(key, value) Concatenating the two fields stub.PutState(visa+typeVisa, value) What is the difference between those two approaches? What is the best performance? By using Composite Keys you will have access to extra methods in your chaincode e.g.

Different ways to invoke contract method

杀马特。学长 韩版系。学妹 提交于 2019-12-02 08:59:19
I have one contract with method name as getValues().From Dapp I am invoking contract method as 'contractCAt.getValues.call(function(error,result){...})' this works fine and by using 'contractCAt.getValues(function(error,result){...})' this syntax also works fine.I didn't get any difference between those two ways to invoke contract method.So could anyone help me to give idea about those syntax. See the web3j documentation : contractCAt.getValues.call() is run locally and will not alter the state of your contract on the blockchain. Does not consume any ether. contractCAt.getValues

What are the functional differences between Fabric Javascript SDK and Hyperledger Composer?

主宰稳场 提交于 2019-12-02 08:11:28
Other than the fact that Composer makes deployment and testing of prototype business networks easier and the fact that we don't have to know golang to develop chaincode, what is the difference in the functionalities that these interfaces provide that may lead one to choose one over the other? This article can probably provide you with the answers you need: https://blog.selman.org/2017/07/08/getting-started-with-blockchain-development/ Hyperledger Composer is both an application development framework and set of powerful tools which simplifies and expedites the creation of blockchain

FISCO-BCOS区块链开源平台部署步骤(2)

旧时模样 提交于 2019-12-02 07:40:13
第二章 创世节点部署 2.1 初始化节点环境 本文使用路径为/mydata/nodedata-1/ #创建目录 mkdir -p /mydata/nodedata-1/data/ #存放节点的各种文件 mkdir -p /mydata/nodedata-1/log/ #存放日志 mkdir -p /mydata/nodedata-1/keystore/ #存放账户秘钥 #拷贝节点配置 cd /mydata/FISCO-BCOS/ cp genesis.json config.json log.conf start.sh stop.sh /mydata/nodedata-1/ 2.2 配置文件修改 2.2.1 god帐号配置 cd /mydata/FISCO-BCOS/tool #代码根目录下的tool文件夹 #仅拉取一次npm包即可 cnpm install node accountManager.js > godInfo.txt #得到god帐号地址,注意保存上面生成的godInfo.txt文件,此文件包含管理员的公私钥和地址 cat godInfo.txt |grep address vim /mydata/nodedata-1/genesis.json #将上述得到的address替换该文件中的god字段值 2.2.2 NodeId节点身份配置 节点的唯一标识

IBM BLUEMIX BLOCKCHAIN SDK-DEMO failing

无人久伴 提交于 2019-12-02 07:13:50
问题 I have been working with HFC SDK for Node.js and it used to work, but since last night I am having some problems. When running helloblockchain.js only few times works, most time I get this error when it tries to enroll a new user: E0113 11:56:05.983919636 5288 handshake.c:128] Security handshake failed: {"created":"@1484304965.983872199","description":"Handshake read failed","file":"../src/core/lib/security/transport/handshake.c","file_line":237,"referenced_errors":[{"created":"@1484304965

How to decrypt the transaction payload when confidentiality is turned on?

二次信任 提交于 2019-12-02 06:07:28
问题 The transactions/<transaction_id> API returns a single transaction. But when confidentiality is turned on, the transaction payload is encrypted How can I decrypt this transaction payload when confidentiality is turned on? 回答1: You will only be able to do so if you have the key pair of who sent the transaction (that's why it is confidential). If you are the user that sent the transaction then you can retrieve the ECert and TCert using this. With the certificate you can decrypt the transaction

Using two business cards in the same composer rest server configuration

人盡茶涼 提交于 2019-12-02 03:44:17
I did the tutorial to deploy to a multi org fabric network and it worked successfully . Now i have two admin cards - alice@trade-network , bob@trade-network and two identities/cards issued by them - jdoe@trade-network , dlowe@trade-network Now i have given access control rules stating that jdoe (trader1-org1) and dlowe(trader2-org2) can only view their own records Thus when i connect to their respective business cards i am able to view only their records . Now i can start two rest servers each (2 ports) for jdoe and dlowe which enables view of their records only through their rest api

IBM BLUEMIX BLOCKCHAIN SDK-DEMO failing

牧云@^-^@ 提交于 2019-12-02 03:27:20
I have been working with HFC SDK for Node.js and it used to work, but since last night I am having some problems. When running helloblockchain.js only few times works, most time I get this error when it tries to enroll a new user: E0113 11:56:05.983919636 5288 handshake.c:128] Security handshake failed: {"created":"@1484304965.983872199","description":"Handshake read failed","file":"../src/core/lib/security/transport/handshake.c","file_line":237,"referenced_errors":[{"created":"@1484304965.983866102","description":"FD shutdown","file":"../src/core/lib/iomgr/ev_epoll_linux.c","file_line":948}]}

How to decrypt the transaction payload when confidentiality is turned on?

我的梦境 提交于 2019-12-02 00:20:58
The transactions/<transaction_id> API returns a single transaction. But when confidentiality is turned on, the transaction payload is encrypted How can I decrypt this transaction payload when confidentiality is turned on? You will only be able to do so if you have the key pair of who sent the transaction (that's why it is confidential). If you are the user that sent the transaction then you can retrieve the ECert and TCert using this . With the certificate you can decrypt the transaction's payload. 来源: https://stackoverflow.com/questions/38143344/how-to-decrypt-the-transaction-payload-when