blockchain

Corda Controller Node

拜拜、爱过 提交于 2019-12-08 09:56:39
问题 With respect to Corda Nodes, Controller node serves as network map and offers validating notary service. What if the controller node is shut down? Will the other nodes function independently ? 回答1: There is no concept of a "Controller" node in Corda. We simply gace the node that played the role of both the network map and notary the name "Controller" in our example application. In real deployments, these roles would be separate. Regarding the shutdown of the network map/notary: If the network

Hyperledger Fabric 1.4: Getting an error while trying to connect ChannelEventHub.connect(true). Error: Error connect the ChannelEventhub to peer

点点圈 提交于 2019-12-08 09:31:44
问题 This is a follow-up Question to the one which I asked previously(here) and I am trying to implement the solution suggested by @david_k. I am using the Fabcar example as a base and building up on that. I ran the startFabric.sh, I got the message that "Successfully submitted proposal to join channel" docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin@org1.example.com/msp" peer0.org1.example.com peer channel create -o orderer.example.com

How is the source code protected from being tampered with in a blockchain?

懵懂的女人 提交于 2019-12-08 05:16:01
问题 class Block{ constructor(timestamp, transactions, previousHash = ''){ this.timestamp = timestamp; this.transactions = transactions; this.previousHash = previousHash; this.hash = this.calculateHash(); this.nonce = 0; } calculateHash(){ return SHA256(this.previousHash + JSON.stringify(this.transactions) + this.timestamp + this.nonce).toString(); } mineBlock(difficulty){ while(this.hash.substring(0, difficulty) !== Array(difficulty + 1).join("0")){ this.nonce++; this.hash = this.calculateHash();

getting Error: Expected a Resource or Concept have checked older posts too but it's not helping me out with my code

时光怂恿深爱的人放手 提交于 2019-12-08 03:32:50
问题 I have two transactions GoodsMovement and Payment, Goodsmovement will track delivery of Goods and Payment transaction will check for payments if goods are delivered. I'm working on below code: /** * New model file */ namespace org.acme.paysystem enum PaymentStatus{ o PARTIALLY_PAID o TOTAL_AMOUNT_PAID o NOT_PAID } enum DeliveryStatus{ o DELIVERED o IN_TRANSIT } asset Goods identified by billNo{ o String billNo o Double billAmount o DateTime billDate o DeliveryStatus deliveryStatus o

how to invoke chaincode function from itself to record sub transactions

霸气de小男生 提交于 2019-12-08 02:48:21
We want to invoke one of the functions from go language chaincode itself. The reason for doing so is that we want to create separate transaction blocks for some logics based on flow. For example, if we have a function named ' transferFund ' and within that, we are reading balances of two persons (let it be a function named ' readBalance '). We want 3 blocks to be created: 1 for ' transferFund ' and 2 for ' readBalance ' To invoke another chaincode within your chaincode you can use stub.InvokeChaincode(chaincodeName, queryArgs, channelName) where channelName can be empty if you want to call

Can a World State variable be accessed by a chaincode different from the one that deployed it?

≡放荡痞女 提交于 2019-12-07 22:39:12
问题 If a chaincode A stores a variable V to the World State can this variable V be accessed by another chaincode B? In other words, are variables in the World State access protected? If it is not possible, how can I make chaincode B read the variables from chaincode A (I need it for my use case)? 回答1: No, variables stored by some chaincode A can only be accessed by the same chaincode A. So if a chaincode B tries to access the variable V, access will be denied. If you wanted to access such

How to fix “FAILED to execute End-2-End Scenario” in Hyperledger Fabric?

时光怂恿深爱的人放手 提交于 2019-12-07 18:03:16
问题 I'm trying running up Fabric samples that is provided here: https://github.com/hyperledger/fabric-samples/tree/release-1.2/first-network I followed all the instructions of Fabric docs from: https://hyperledger-fabric.readthedocs.io/en/release-1.2/build_network.html , but encountered an error "FAILED to execute End-2-End Scenario". Following is the output after I entered ./byfn.sh up in terminal. I didn't even find any similar problems on google and stackoverflow ./byfn.sh up Starting for

How to resolve this error (t: Identifier cannot extend from super type) on Hyperledger Composer playground?

拥有回忆 提交于 2019-12-07 13:40:27
问题 Im following the Hyperledger tutorial Youtube Link and the instructor modifies a sample contract. However with the current version of Hyperledger fabric playground which can be accessed online, there is no mention of state after entering the accountTransfer function. This leads to an error as shown below: How to solve the same? I have tried searching for answers but I couldnt find any which addresses this specific issue. 回答1: t: stands for transaction. you have two problems in your model

How to get all existing channels in Hyperledger 1.0 (Node SDK)

ⅰ亾dé卋堺 提交于 2019-12-07 12:11:53
问题 I am using the Node SDK with Hyperledger 1.0 and want to check if a channel with a specific name exists. Is there a way to query all existing channels? And is there a way to get a channel by name? 回答1: You cannot see all available channels, while you can leverage CSCC (Configuration System Chaincode) GetChannels API to get a list of channels client eligible to. You just need to invoke chaincode named CSCC. The CSCC is the system chaincode, meaning it inherently built in into peer binary and

Issue to run curl command in windows 7 Docker Quickstart Terminal

烈酒焚心 提交于 2019-12-07 09:00:56
问题 I am trying out the steps for setting up a sample hyperledger fabric1.0 network as per the steps mentioned here on windows 7. As part of this I am following these steps for Hyperledger Fabric Samples. Since my OS is Windows7 64bit , I am using Docker Toolbox But my problem here is, while running the following command in Docker Quickstart Terminal curl -sSL https://goo.gl/iX9dek ¦ bash I am getting the error bash: line 1: syntax error near unexpected token `newline' bash: line 1: <HTML> I also