Fabric 1.4.1引入Raft排序服务, 运维界比较出名的etcd实现的orderer服务。...docker-compose-etcdraft2.yaml, 基于orderer-base覆盖 orderer-base: image: hyperledger/fabric-orderer...: /opt/gopath/src/github.com/hyperledger/fabric command: orderer 额外的一些etcd配置参数看不到, 我们去启动的orderer容器的配置文件看下...docker exec -it -e LINES=(tput lines) -e COLUMNS=(tput cols) orderer.example.com bash 查看配置文件/etc/hyperledger...WALDir: /var/hyperledger/production/orderer/etcdraft/wal # SnapDir specifies the location at which
/fabric-samples.git 查看版本分支 git tag 查看版本分支 切换项目版本 git checkout release1.0 查看当前项目的版本 git branch #删除已命名的分支...-1.0.5.tar.gz -C /home/go/src/github.com/hyperledger/fabric-samples 下载dockerimages执行文件复制并在fabric-samples...目录下的fabcar目录中 cd fabric-samples/fabcar 查看package.json文件 查看`package.json`文件 cat package.json Fabcar准备环境.../byfn.sh -m down出现错误的解决方法: https://segmentfault.com/a/1190000014221967 执行node registerUser.js出现错误:Failed...Please provide identity type"}]] 执行`node registerUser.js `出现错误 编辑 node registerUser.js文件 vim node
2. kafka 排序服务安装 所有的代码已分享在 https://github.com/zealzeng/kafka-orderer-demo 2.1 安装环境 官方文档有一些简单的描述 https:...fabric 1.4年前已正式发布, 是一个长期维护的版本, 适合用于生产环境。.../crypto-config/ordererOrganizations/example.com/orderers/orderer1.example.com/msp:/var/hyperledger/orderer.../crypto-config/ordererOrganizations/example.com/orderers/orderer1.example.com/tls/:/var/hyperledger/orderer.../fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer1.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
配备的 Hyperledger Fabric 区块链网络包含两个组织、每个组织两个对等节点,以及一个 Solo 订购服务。...在 区块链基础:术语表和用例 中适当了解,然后在 Hyperledger Fabric 术语表 中更深入钻研。...它还修复了 v1.0.4 中未解决的 configtxlator 工具中的错误。)其他选项包括手动收集签名或让客户端应用程序借助 NodeSDK 支持以编程方式收集需要的签名。...使用 file命令验证 JSON 文件的已解码内容,看看是否已成功解码,如图 6 所示。...用于检查和验证的容器日志文件 ?
/hyperledger git clone -b master https://github.com/hyperledger/fabric-samples.git cd fabric-samples...3.二进制工具下载 下载地址:https://nexus.hyperledger.org/content/repositories/releases/org/hyperledger/fabric/hyperledger-fabric...cd ~/hyperledger/fabric-samples/first-network ....): // 如果已加入环境变量可直接执行cryptogen generate ...../fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
一、hyperledger fabric 基础环境搭建 一、下载fabric-samples、二进制文件、镜像文件 1、进入gopath目录下,创建目录src/github.com/hyperledger...3、执行bootstrap.sh下载fabric-samples、二进制文件、docker镜像,网络不好的同学耐心等待哈。 ?...设置FABRIC配置文件路径 export FABRIC_CFG_PATH=$PWD ? 生成创世区块 ...../fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem.../fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
是Hyperledger Fabric官方最详细的例子, 目录对应 fabric-samples/first-network, 动手时间到。...Hyperledger Fabric启动入口 复习下Hyperledger Fabric基础的网络篇,启动一个区块链网络首先要搭建什么?如果不清楚最好看完基础篇。答案是Orderer服务。...具体生成了什么内容了, 我们看下当前目录下的crypto-config文件夹: [root@localhost crypto-config]# pwd /mnt/sda3/fabric-samples/..., server.crt, ca.crt都有了, 差创世块genesis.block文件了, 使用以下命令行创建 [root@localhost first-network]# export FABRIC_CFG_PATH...genesis.block, 容器中映射为 /var/hyperledger/orderer/orderer.genesis.block configtxgen命令实际读取的配置文件默认为configtxgen.yaml
src/github.com/hyperledger/fabric-samples/first-network ..../fabric-chaincode-evm:/opt/gopath/src/github.com/hyperledger/fabric-chaincode-evm 关闭网络(如果它已启动): ..../fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem.../fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem.../fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
2 环境搭建 2.1 搭建虚拟机环境 2.1.1 生成配置文件 使用版本:Ubuntu 18.04 LTS 执行以下命令后,将生成Vagrantfile配置文件 $ vagrant init ubuntu...= "js-fabric" end 2.1.3 拉取镜像并启动 根据配置文件拉取镜像并创建Ubuntu18.04虚拟机 $ vagrant up 在Virtualbox看到虚拟机已启动 [image.png...chmod +x scripts/bootstrap.sh 下载必备二进制文件和docker镜像 # ....========= All GOOD, BYFN execution completed =========== 启动错误处理: 如遇到错误: 2020-04-16 04:24:25.272 UTC.../fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
解决方法:删除锁定的文件 执行命令:sudo rm /var/lib/dpkg/lock 4、安装docker #### step 1: 安装必要的一些系统工具 执行命令: sudo apt-get...执行命令:cd ~/go/src/github.com/hyperledger 执行命令:git clone https://github.com/hyperledger/fabric.git 6.2...8 、启动Fabric网络并完成ChainCode的测试 我们仍然停留在e2e_cli文件夹,这里提供了启动、关闭Fabric网络的自动化脚本。.../fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem.../fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
/fabric-samples/first-network mkdir -p channel-artifacts configtx.yaml 该文件总共有六个配置段: Organizations:定义了各组织机构的名称.../channel-artifacts/Org1MSPanchors.tx --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric...=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.../channel-artifacts/Org2MSPanchors.tx --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric.../fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem
输入以下内容: rootProject.name = 'fabric-chaincode-gradle' 1.2 build.gradle 在左侧的项目文件面板中,可以看到build.gradle。...1.3 Chaincode文件 在左侧的项目文件面板中,在src>main>java下,右键单击它并选择New>Java Class: ?...; import org.hyperledger.fabric.shim.ChaincodeBase; import org.hyperledger.fabric.shim.ChaincodeStub;...,你应该拥有所有需要的文件和目录): cd fabric-samples/chaincode/chaincode_example02/ mv java java_01 mkdir java 现在,将项目目录中的以下突出显示的文件复制到...如果你看到以下错误(而不是其他错误),那就OKAY,继续执行下一步骤 !!!!!!!!!!!!!!!
Fabric联盟链搭建 请参看:快速带你上手Hyperledger Fabric环境搭建+开发测试 3 跨链网络搭建 本节将基于上节搭建好的FISCO-BCOS联盟链以及Hyperledger Fabric.../example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem conf/chains/fabric.../fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem.../fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem...锁定自己的1个BTC资产,并设置一个较长的锁定时间 t1, 并设置了获取该BTC的一个条件:如果Bob能够提供h的原始值s就可以得到该BTC Bob观察到Alice合约中锁定了一个BTC, 然后Bob锁定自己的
本文分享如何对已安装的合约进行版本更新。...二、环境准备 区块链网络安装:《Hyperledger Fabric 2.x 环境搭建》 智能合约安装:《Hyperledger Fabric 2.x 自定义智能合约》 执行以下命令,可以看到已安装的合约信息...重新安装合约 再次分别为 peer0.org1 和 peer0.org2 两个机构安装合约: peer lifecycle chaincode install mycc.tar.gz 执行以下命令,重新查看已安装的合约信息...ordererTLSHostnameOverride orderer.example.com \ --tls \ --cafile ${MSP_PATH}/ordererOrganizations/example.com/orderers...ordererTLSHostnameOverride orderer.example.com \ --tls \ --cafile ${MSP_PATH}/ordererOrganizations/example.com/orderers
IMAGE TAG ID hyperledger/fabric-tools x86_64-1.0.0 0403fd1c72c7 hyperledger/fabric-orderer x86_64-1.0.0...e317ca5638ba hyperledger/fabric-peer x86_64-1.0.0 6830dcd7b9b5 hyperledger/fabric-ccenv x86_64-1.0.0...7182c260a5ca hyperledger/fabric-ca x86_64-1.0.0 a15c59ecda5b hyperledger/fabric-baseimage x86_64-0.3.1...编辑以下两个 Fabric 集群的定义文件: a....yaml 文件中的 command 是为了防止 CLI pod 自动退出,CLI 的默认工作目录为/opt/gopath/src/github.com/hyperledger/fabric/peer。
二、环境准备 1、部署好 Fabric 的测试网络,按照上一篇文章《Hyperledger Fabric 2.x 环境搭建》的内容执行第1至5步 - 启动好两个 peer 节点和一个 orderer...FABRIC_PATH=/opt/gopath/src/github.com/hyperledger/fabric-samples export FABRIC_CFG_PATH=${FABRIC_PATH.../hyperledger/fabric-maven 依赖合约sdk org.hyperledger.fabric-chaincode-java...} 通过插件 maven-shade-plugin 指定 mainClass 为 org.hyperledger.fabric.contract.ContractRouter...新版本所有合约的 mainClass 都为 org.hyperledger.fabric.contract.ContractRouter src/
Hyperledger Fabric智能合约调用示例.文中所使用的合约为官网示例 1. 安装npm yum install npm -y 2....安装 sdk npm install fabric-network@1.4.10 4. 调用sdk 4.1....生成证书 根据文档https://cloud.tencent.com/document/product/663/38395 进行生成用户公私钥,其中out_sk文件放置到wallet目录下,csr文件登录控制台并上传至用户证书模块...编写Connection Profile 新建Fabric SDK 文档中所描述的 Connection Profile https://hyperledger-fabric.readthedocs.io...mspid:NeworgMSP-bclpbtf9w1ne peers:peer0.neworg.bclpbtf9w1ne 组织管理页可以看到,选择当前帐号所在的组织的相关信息 image.png orderers
在 1.0 版中,Peer 节点可分为 peers 节点和 orderers 节点。...Hyperledger Fabric 的分层架构设计如图下所示。 ?...Hyperledger Fabric 的分层架构设计 Hyperledger Fabric 可以分为7层,分别是存储层、数据层、通道层、网络层、共识层、合约层、应用层。...合约层是 Hyperledger Fabric 的智能合约层 Blockchain,Blockchain 默认由 Go 语言实现。...应用层是 Hyperledger Fabric 的各个应用程序。
今天HyperLedger Fabric放出了1.0 Beta版的镜像,按照命名上来说,这应该是一个基本可用的版本了,所以我赶紧第一时间下载下来,把玩把玩。...运行以下脚本将当前用户添加到Docker的组中 sudo usermod -aG docker studyzy 重新登录当前用户,接下来修改 Docker 服务配置(/etc/default/docker 文件...1.0 Beta 2.1下载官方自动化部署脚本 我们首先创建一个文件夹,用于存放自动化部署的脚本。.../fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/cacerts/ca.example.com-cert.pem.../fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/cacerts/ca.example.com-cert.pem
一、说明 在上一篇文章中 《Hyperledger Fabric 2.x 自定义智能合约》 分享了智能合约的安装并使用 cli 客户端进行合约的调用;本文将使用 Java 代码基于 fabric-gateway-java...Fabric Gateway SDK 实现Fabric的编程模型,提供了一系列简单的API给应用程序与Fabric区块链网络进行交互; 网络拓扑图: 应用程序将各自的网络交互委托给其网关,每个网关都了解网络信道拓扑...二、Mavn依赖 添加网关sdk的依赖: org.hyperledger.fabric fabric-gateway-java...证书文件从 fabric-samples 的 test-network 目录中复制 ordererOrganizations 与 peerOrganizations 文件夹: 3.2....SpringBoot配置 在 application.yml 中添加以下内容,用于访问网关的相关配置: fabric: # wallet文件夹路径(自动创建) walletDirectory:
领取专属 10元无门槛券
手把手带您无忧上云