hyperledger

what is the best way of image storage on hyperledger composer?

送分小仙女□ 提交于 2019-11-30 21:17:23
问题 ipfs or storj hash of image and store file on s3 convert the image to a Base64 string and store string in composer model 回答1: You can use String and base64 encode it - as a field in an Asset for example. The question has been discussed here: How can I convert MP3 file to a Base64 encoded string? and here: How to deal with forms,images,videos of an asset in hyperledger composer . Storing images, scans, audio files is not a 'best practice' - rather, a cryptographic hash of it (referenced off

Hyperledger Fabric1.4 安装

試著忘記壹切 提交于 2019-11-30 18:50:38
Hyperledger Fabric 依赖的软件版本查看官方 github 地址 https://github.com/hyperledger/fabric 目录下文件 /docs/source/prereqs.rst,具体版本根据安装的 Fabric 版本不同而不同。 1 安装依赖工具 为了下载方便,最好将 Ubuntu 的软件镜像源更换为国内,点击 “软件和更新” 将镜像源更换为国内,最好是华为或者阿里的源。更换之后,使用如下命令进行更新: $ sudo apt update 1.1 安装 git 安装 git 工具使用如下命令: $ sudo apt install git 1.2 安装 cURL 安装 cURL 使用如下命令: $ sudo apt install curl 1.3 安装 Docker 查看系统是否已经安装 Docker: $ docker --version 未安装,使用如下命令安装最新版本的 Docker: $ sudo apt install docker.io 安装完之后,查看版本,出现如下字样则安装成功: $ docker --version Docker version 18.09.7, build 2d0083d 设置成非 root 用户也能执行 docker,需要将普通用户加入 docker 组: $ sudo usermod -aG

Hyperledger Fabric altering fabcar example

*爱你&永不变心* 提交于 2019-11-30 17:53:03
问题 I've been working through the fabcar example and have it running it perfectly when no alterations have happened. What I'm trying to do is update the fabcar.go code to add more fields and simply play around w/ the example, however my docker images aren't updating w/ the correct code. To install the chaincode, this command is run on the cli container: docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto

Best Practices to follow while writing Hyperledger Fabric Chaincode

大兔子大兔子 提交于 2019-11-30 16:58:25
What should be some of the best practices to follow to avoid bugs and write efficient Hyperledger Fabric Chaincode? General Guidelines for writing Hyperledger Fabric Chaincodes. Refer to the below link for a detailed description on the same: https://gist.github.com/arnabkaycee/d4c10a7f5c01f349632b42b67cee46db Some steps are concisely mentioned below: Use Chaincode DevMode Use Chaincode Logging Using logging is simple and easy. Use Fabric's inbuilt logger. Fabric provides logging mechanism as follows: For Golang : https://godoc.org/github.com/hyperledger/fabric/core/chaincode/shim

Best Practices to follow while writing Hyperledger Fabric Chaincode

孤街浪徒 提交于 2019-11-30 16:20:20
问题 What should be some of the best practices to follow to avoid bugs and write efficient Hyperledger Fabric Chaincode? 回答1: General Guidelines for writing Hyperledger Fabric Chaincodes. Refer to the below link for a detailed description on the same: https://gist.github.com/arnabkaycee/d4c10a7f5c01f349632b42b67cee46db Some steps are concisely mentioned below: Use Chaincode DevMode Use Chaincode Logging Using logging is simple and easy. Use Fabric's inbuilt logger. Fabric provides logging

Handshake failed with fatal error SSL_ERROR_SSL

杀马特。学长 韩版系。学妹 提交于 2019-11-30 16:13:29
I'm following this tutorial https://hyperledger.github.io/composer/latest/tutorials/deploy-to-fabric-multi-org to deploy a composer blockchain business network to Hyperledger Fabric (multiple organizations) I'm getting the following error however when trying to install the business network though: Installing business network. This may take a minute...E0424 16:44:04.865686000 140735870391104 ssl_transport_security.cc:989] Handshake failed with fatal error SSL_ERROR_SSL: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed. E0424 16:44:04.868503000 140735870391104

Error starting hyperledger fabcar sample application

雨燕双飞 提交于 2019-11-30 16:06:35
I am trying to install hyperledger-fabric sample application from http://hyperledger-fabric.readthedocs.io/en/latest/write_first_app.html I am getting error similar to post mentioned here: hyperledger fabric fabcar error 2017-08-24 07:47:16.826 UTC [grpc] Printf -> DEBU 005 grpc: addrConn.resetTransport failed to create client transport: connection error: desc = "transport: Error while dialing dial tcp 172.18.0.5:7051: getsockopt: connection refused"; Reconnecting to {peer0.org1.example.com:7051 <nil>} Error: Error getting endorser client channel: PER:404 - Error trying to connect to local

How to avoid the Fabric CA beeing a single point of failure?

岁酱吖の 提交于 2019-11-30 14:48:25
if I understood correctly, every peer in a fabric blockchain network (somehow interconnected through gossip) will only accept incoming connections from other peers if they use a HTTPS connection with a public key signed by the Fabric CA. Is that correct? So in my understanding, the Root-CA becomes the single point of failure because one could modify it and from then on modified Root-CA certificates will propagate to the nodes and eventually no node can connect to each other anymore. Is this correct? Let me try to answer the two questions also, perhaps a little more directly. QUESTION1: if I

Hyperledger Caliper Disable TLS

亡梦爱人 提交于 2019-11-30 14:06:45
更多精彩内容请访问我的新博客站点 前言 最近在使用 Hyperledger Caliper 时,想通过 wireshark 抓包来分析 fabric 运行流程中各阶段的数据信息,但是发现 fabric 节点间的通信使用了传输层安全(Transport Layer Security,TLS)协议,使得通信的报文的内容在抓包后无法分析。因此考虑在测试环境中暂时关闭 TLS,从而能够直接查看报文中承载的数据内容。 实现过程 1. 在 docker-compose 的配置文件中修改环境变量 本实验是在 Hyperledger Caliper 的测试环境中进行的,Caliper 测试工具在运行初始阶段会调用 docker-compose 启动 fabric 的网络,启动的 fabric 默认启用了 TLS,可以在其 docker-compose 的启动配置文件 docker-compose.yaml 中看到环境变量: FABRIC_CA_SERVER_TLS_ENABLED=true ORDERER_GENERAL_TLS_ENABLED=true CORE_PEER_TLS_ENABLED=true 以上三个环境变量都设置为 true。如果要 disable TLS,则需在配置文件 docker-compose.yaml 中将这三个环境变量都注释掉,或者将它们设置为 false。即:

Hyperledger caliper 运行环境搭建

只谈情不闲聊 提交于 2019-11-30 14:06:24
前言 Github里caliper的版本应该是最新的,但该版本与 caliper官网 所描述的运行方法 并不适配,simple文件夹下并没有config.json和 fabric.json文件: 因此,最终使用了旧版caliper才跑成功(没有找到正确方法,有人在新版上跑成功了)。 Pre-requisites 按照官网要求,需要安装的基础环境如下: make,g++ NodeJS 8.X node-gyp Docker Docker-compose 注意 :NodeJS版本必须是8.X,否则不会跑通。安装node-gyp的过程中可能会出现 SyntaxError: Block-scoped declarations (let, const, function, class) 这个错误,需要将node-js安装到最新版本。安装完成后再使用nvm把版本切换回来就可以: //切换到指定版本 $ nvm use 8.15 .0 //将该版本设为默认 $ nvm alias default 8.15 .0 //查看当前node版本 $ node - v 安装过程 1.安装 make,g++ 编译工具 sudo apt-get install make g++ 2.安装node.js 这里我使用的nvm安装node.js: //检查可用的node版本 $ nvm ls - remote /