blockchain

Truffle command not found after installation

╄→гoц情女王★ 提交于 2019-12-05 00:53:52
I installed truffle through npm with the following: sudo npm install -g truffle but when I run truffle list on the console it just gives me bash: truffle: command not found Please make sure you have the latest version of npm and node installed. I had the same issue, I updated npm and node to latest version and it worked. npm install -g truffle works. I had a similar problem. I ran npm i -g truffle and then when I tried to run truffle init I got an error: zsh: command not found: truffle . What solved it for me is to create a local node_modules with truffle installed in it, and then run that

Can blockchain be stored in SQL or even noSQL database?

和自甴很熟 提交于 2019-12-04 22:31:21
问题 I have read that: The blockchain database isn’t stored in any single location, meaning the records it keeps are truly public and easily verifiable. No centralized version of this information exists for a hacker to corrupt. Hosted by millions of computers simultaneously, its data is accessible to anyone on the internet. So my question is can we store blockchain in for example sql? or it can only be stored in a database that works on its own? 回答1: Currently decentralized blockchain applications

Hyperledger transaction verification

寵の児 提交于 2019-12-04 22:28:11
In case of Bitcoin transaction the verification/validation involves looking at the input UTXO balance etc... But in Hyperledger the transaction (if I may) "just" carries the data (function name and data-string) for the target smart contract. Does it mean that there is no necessity of validation (apart from the syntax) of the transaction? If yes what has to checked and against what? Can anyone pls give me an example use-case? If there is no validation, then is my understanding correct that the blockchain is "just" a ledger without any verification on the transactions. If something goes wrong

Immutability in Hyperledger Fabric

狂风中的少年 提交于 2019-12-04 21:44:01
Can someone explain how the immutability is implemented in Hyperledger Fabric? If we have private channel with little amount of peers, how it can be guaranteed, that one side hasn't changed data in it's ledger? In order to guarantee that no party in the channel has tampered data in its own favor you need to present sophisticated endorsement policy to include all required parties and make sure they adequately represented within endorsement policy. Hence making it obligatory for client which issues new transaction to get endorsement from all interested parties, hence ensuring that all have same

How to fetch asset modification history in hyperledger fabric

亡梦爱人 提交于 2019-12-04 19:39:26
I am using IBM bluemix blockchain service to tryout some smart contract logic for my asset sharing demo. Is there anyway to query the asset modified history in hyperledger fabric network. I have checked with documentations for both fabric 0.6 and 1.0 versions, but I can find only the stub.pushState(key,value_json) and stub.getState(key) to interact width the ledger. But using stub.getState(key) , I can fetch only the latest entry of the key, but how can I fetch and display the series of changes/modification written for the same key. I have iterated through the block using {peeraddress}/Block

Where does hyperledger fabric store the database for the blockchain?

谁都会走 提交于 2019-12-04 11:07:57
问题 I have hyperledger fabric network setup on my local machine with a single validating node. I am developing a chaincode and would like to clear my blockchain. I have read that the hyperledger fabric stores the database under /var/hyperledger. However, I do not see this hyperledger directory under /var. Is there another location for this directory? My development platform is MAC and I am using docker-compose to start my hyperledger fabric network. 回答1: The Hyperledger Fabric stores the database

how to generate certificates for new peers in Organization in Hyperledger Fabric 1.0

你说的曾经没有我的故事 提交于 2019-12-04 09:47:10
问题 I am using Hyperledger Fabric 1.0 fabric-node-sdk tutorial (https ://github.com/hyperledger/fabric-sdk-node/test ). And I have setup the two organization each 1 with peer(peer0 in org1 and peer2 in org2). My requirement is to add one more peer in each organization(peer1 in Org1 and peer3 in Org2). I believe need to create peer1 and peer3 folder inside \tls folder and place some ".pem" files example: "src\github.com\hyperledger\fabric-sdk-node\test\fixtures\tls\peers\peer1" "src\github.com

PBFT algorithm in hyperledger

北城以北 提交于 2019-12-04 07:35:12
问题 Can anyone explain PBFT Algorithm in detail without giving any link for the same? And how it works in hyperledger . So, once the transaction is sent to the blockchain : Who validates the transaction? How the consensus is achieved on the transaction? How the transaction is committed to the blockchain? 回答1: "Hyperledger" is a blockchain consortium under The Linux Foundation. Currently there are at least 4 different implementations of blockchain frameworks under Hyperledger: Fabric (IBM) Corda

Why is Git not considered a “block chain”?

偶尔善良 提交于 2019-12-04 07:22:06
问题 Git's internal data structure is a tree of data objects, wherein each objects only points to its predecessor. Each data block is hashed. Modifying (bit error or attack) an intermediate block will be noticed when the saved hash und the actual hash deviate. How is this concept different from block chain? Git is not listed as an example of block chains, but at least in summaries, both data structure descriptions look alike: data block, single direction reverse linking, hashes, ...). So where is

Difference of Geth or Ganache

房东的猫 提交于 2019-12-04 06:05:59
问题 Hi I am new to blockchain topic and I am trying to make an Ethereum smart contract. First step I installed truffle and when I try to migrate it throws an error because I have no ethereum client. For solving this problem truffle develop, ganache, geth are recommended but I couldnt decide to which one is more suitable and I dont understand the difference of ganache and geth. Basically are they serving same thing or not? Here is error: Could not connect to your Ethereum client with the following