Hyperledger fabric2.4 搭建自己的网络

2023-10-31

1、使用cryptogen工具生成证书

1.1 将fabric-samples/bin目录下的二进制文件复制到/usr/local/bin目录,以便全局使用这些命令

cd fabric-samples/bin
cp * /usr/local/bin

1.2 新建文件夹 fixtures,存放我们网络的相关文件

mkdir fixtures

1.3 使用cryptogen工具生成crypto-config.yaml文件

cryptogen showtemplate > crypto-config.yaml

OrdererOrgs:配置Orderer节点,生产环境应该有多个实例,否则可能会有单点故障问题

PeerOrgs:配置节点组织,下面文件配置1个组织:Org1,Template.Count:1,定义组织中节点数为1个,User.Count,定义组织中普通用户数,每个组织默认有一个管理员用户admin
下面我们查看一下crypto-config.yaml文件内容

# 定义orderer节点
OrdererOrgs:
  - Name: Orderer0
    Domain: maakees.com
    EnableNodeOUs: false
    Specs:
      - Hostname: orderer0

# 定义组织中的排序节点
# 下面内容只定义1个组织,每个组织有1个peer节点,1个普通用户
PeerOrgs:
  # Org1
  - Name: Org1
    Domain: org1.maakees.com
    EnableNodeOUs: false
    Template:
      Count: 1
    Users:
      Count: 1

1.4 使用上面的配置文件生成证书

cryptogen generate --config=crypto-config.yaml

会生成一个文件夹crypto-config文件夹,里面是orderer节点和peer节点的证书
在这里插入图片描述
证书生成完毕,进行下一步操作!!!

2、使用cryptogen生成创世块文件和通道文件

2.1 创建通道:将官方示例fabric-samples/test-network/configtx/configtx.yaml文件复制到自己的目录fixtures下,修改configtx.yaml文件配置自己的通道,修改后的配置如下:

# Copyright IBM Corp. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#

---
################################################################################
#
#   Section: Organizations
#
#   - This section defines the different organizational identities which will
#   be referenced later in the configuration.
#
################################################################################
Organizations:

    # SampleOrg defines an MSP using the sampleconfig.  It should never be used
    # in production but may be used as a template for other definitions
    - &OrdererOrg
        # DefaultOrg defines the organization which is used in the sampleconfig
        # of the fabric.git development environment
        Name: OrdererOrg

        # ID to load the MSP definition as
        ID: OrdererMSP

        # MSPDir is the filesystem path which contains the MSP configuration
        MSPDir: ./crypto-config/ordererOrganizations/maakees.com/msp

        # Policies defines the set of policies at this level of the config tree
        # For organization policies, their canonical path is usually
        #   /Channel/<Application|Orderer>/<OrgName>/<PolicyName>
        Policies:
            Readers:
                Type: Signature
                Rule: "OR('OrdererMSP.member')"
            Writers:
                Type: Signature
                Rule: "OR('OrdererMSP.member')"
            Admins:
                Type: Signature
                Rule: "OR('OrdererMSP.admin')"

        OrdererEndpoints:
            - orderer0.maakees.com:7050

    - &Org1
        # DefaultOrg defines the organization which is used in the sampleconfig
        # of the fabric.git development environment
        Name: Org1MSP

        # ID to load the MSP definition as
        ID: Org1MSP

        MSPDir: ./crypto-config/peerOrganizations/org1.maakees.com/msp

        # Policies defines the set of policies at this level of the config tree
        # For organization policies, their canonical path is usually
        #   /Channel/<Application|Orderer>/<OrgName>/<PolicyName>
        Policies:
            Readers:
                Type: Signature
                Rule: "OR('Org1MSP.member')"
            Writers:
                Type: Signature
                Rule: "OR('Org1MSP.member')"
            Admins:
                Type: Signature
                Rule: "OR('Org1MSP.admin')"
            Endorsement:
                Type: Signature
                Rule: "OR('Org1MSP.member')"
################################################################################
#
#   SECTION: Capabilities
#
#   - This section defines the capabilities of fabric network. This is a new
#   concept as of v1.1.0 and should not be utilized in mixed networks with
#   v1.0.x peers and orderers.  Capabilities define features which must be
#   present in a fabric binary for that binary to safely participate in the
#   fabric network.  For instance, if a new MSP type is added, newer binaries
#   might recognize and validate the signatures from this type, while older
#   binaries without this support would be unable to validate those
#   transactions.  This could lead to different versions of the fabric binaries
#   having different world states.  Instead, defining a capability for a channel
#   informs those binaries without this capability that they must cease
#   processing transactions until they have been upgraded.  For v1.0.x if any
#   capabilities are defined (including a map with all capabilities turned off)
#   then the v1.0.x peer will deliberately crash.
#
################################################################################
Capabilities:
    # Channel capabilities apply to both the orderers and the peers and must be
    # supported by both.
    # Set the value of the capability to true to require it.
    Channel: &ChannelCapabilities
        # V2_0 capability ensures that orderers and peers behave according
        # to v2.0 channel capabilities. Orderers and peers from
        # prior releases would behave in an incompatible way, and are therefore
        # not able to participate in channels at v2.0 capability.
        # Prior to enabling V2.0 channel capabilities, ensure that all
        # orderers and peers on a channel are at v2.0.0 or later.
        V2_0: true

    # Orderer capabilities apply only to the orderers, and may be safely
    # used with prior release peers.
    # Set the value of the capability to true to require it.
    Orderer: &OrdererCapabilities
        # V2_0 orderer capability ensures that orderers behave according
        # to v2.0 orderer capabilities. Orderers from
        # prior releases would behave in an incompatible way, and are therefore
        # not able to participate in channels at v2.0 orderer capability.
        # Prior to enabling V2.0 orderer capabilities, ensure that all
        # orderers on channel are at v2.0.0 or later.
        V2_0: true

    # Application capabilities apply only to the peer network, and may be safely
    # used with prior release orderers.
    # Set the value of the capability to true to require it.
    Application: &ApplicationCapabilities
        # V2_0 application capability ensures that peers behave according
        # to v2.0 application capabilities. Peers from
        # prior releases would behave in an incompatible way, and are therefore
        # not able to participate in channels at v2.0 application capability.
        # Prior to enabling V2.0 application capabilities, ensure that all
        # peers on channel are at v2.0.0 or later.
        V2_0: true

################################################################################
#
#   SECTION: Application
#
#   - This section defines the values to encode into a config transaction or
#   genesis block for application related parameters
#
################################################################################
Application: &ApplicationDefaults

    # Organizations is the list of orgs which are defined as participants on
    # the application side of the network
    Organizations:

    # Policies defines the set of policies at this level of the config tree
    # For Application policies, their canonical path is
    #   /Channel/Application/<PolicyName>
    Policies:
        Readers:
            Type: ImplicitMeta
            Rule: "ANY Readers"
        Writers:
            Type: ImplicitMeta
            Rule: "ANY Writers"
        Admins:
            Type: ImplicitMeta
            Rule: "MAJORITY Admins"
        LifecycleEndorsement:
            Type: Signature
            Rule: "OR('Org1MSP.member')"
        Endorsement:
            Type: Signature
            Rule: "OR('Org1MSP.member')"

    Capabilities:
        <<: *ApplicationCapabilities
################################################################################
#
#   SECTION: Orderer
#
#   - This section defines the values to encode into a config transaction or
#   genesis block for orderer related parameters
#
################################################################################
Orderer: &OrdererDefaults

    # Orderer Type: The orderer implementation to start
    OrdererType: etcdraft
    # Addresses used to be the list of orderer addresses that clients and peers
    # could connect to.  However, this does not allow clients to associate orderer
    # addresses and orderer organizations which can be useful for things such
    # as TLS validation.  The preferred way to specify orderer addresses is now
    # to include the OrdererEndpoints item in your org definition
    Addresses:
        - orderer0.maakees.com:7050

    EtcdRaft:
        Consenters:
        - Host: orderer0.maakees.com
          Port: 7050
          ClientTLSCert: ./crypto-config/ordererOrganizations/maakees.com/orderers/orderer0.maakees.com/tls/server.crt
          ServerTLSCert: ./crypto-config/ordererOrganizations/maakees.com/orderers/orderer0.maakees.com/tls/server.crt

    # Batch Timeout: The amount of time to wait before creating a batch
    BatchTimeout: 2s

    # Batch Size: Controls the number of messages batched into a block
    BatchSize:

        # Max Message Count: The maximum number of messages to permit in a batch
        MaxMessageCount: 10

        # Absolute Max Bytes: The absolute maximum number of bytes allowed for
        # the serialized messages in a batch.
        AbsoluteMaxBytes: 99 MB

        # Preferred Max Bytes: The preferred maximum number of bytes allowed for
        # the serialized messages in a batch. A message larger than the preferred
        # max bytes will result in a batch larger than preferred max bytes.
        PreferredMaxBytes: 512 KB

    # Organizations is the list of orgs which are defined as participants on
    # the orderer side of the network
    Organizations:

    # Policies defines the set of policies at this level of the config tree
    # For Orderer policies, their canonical path is
    #   /Channel/Orderer/<PolicyName>
    Policies:
        Readers:
            Type: ImplicitMeta
            Rule: "ANY Readers"
        Writers:
            Type: ImplicitMeta
            Rule: "ANY Writers"
        Admins:
            Type: ImplicitMeta
            Rule: "MAJORITY Admins"
        # BlockValidation specifies what signatures must be included in the block
        # from the orderer for the peer to validate it.
        BlockValidation:
            Type: ImplicitMeta
            Rule: "ANY Writers"

################################################################################
#
#   CHANNEL
#
#   This section defines the values to encode into a config transaction or
#   genesis block for channel related parameters.
#
################################################################################
Channel: &ChannelDefaults
    # Policies defines the set of policies at this level of the config tree
    # For Channel policies, their canonical path is
    #   /Channel/<PolicyName>
    Policies:
        # Who may invoke the 'Deliver' API
        Readers:
            Type: ImplicitMeta
            Rule: "ANY Readers"
        # Who may invoke the 'Broadcast' API
        Writers:
            Type: ImplicitMeta
            Rule: "ANY Writers"
        # By default, who may modify elements at this config level
        Admins:
            Type: ImplicitMeta
            Rule: "MAJORITY Admins"

    # Capabilities describes the channel level capabilities, see the
    # dedicated Capabilities section elsewhere in this file for a full
    # description
    Capabilities:
        <<: *ChannelCapabilities

################################################################################
#
#   Profile
#
#   - Different configuration profiles may be encoded here to be specified
#   as parameters to the configtxgen tool
#
################################################################################
Profiles:

    OneOrgsApplicationGenesis:
        <<: *ChannelDefaults
        Orderer:
            <<: *OrdererDefaults
            Organizations:
                - *OrdererOrg
            Capabilities: *OrdererCapabilities
        Consortiums:
            SampleConsortium:
                Organizations:
                    - *Org1

    MyChannel:
        Consortium: SampleConsortium
        <<: *ChannelDefaults
        Application:
            <<: *ApplicationDefaults
            Organizations:
                - *Org1

            Capabilities:
                <<: *ApplicationCapabilities

2.2 生成创世块,OneOrgsApplicationGenesis必须和configtx.yaml文件中Profiles的OneOrgsApplicationGenesis一致

configtxgen -outputBlock ./channel-artifacts/genesis.block -profile OneOrgsApplicationGenesis -channelID fixtures-channel

在这里插入图片描述
创世块已经生成成功,查看目录会多出一个channel-artifacts文件夹,只包含genesis.block文件

2.3 生成通道文件,MyChannel必须和configtx.yaml文件中Profiles的MyChannel一致,通道名称不能有大写字母

configtxgen -outputCreateChannelTx ./channel-artifacts/channel.tx -profile MyChannel -channelID mychannel

在这里插入图片描述
通道文件创建成功,channel-artifacts目录多出一个channel.tx个文件

坑:上面两步channelID不能一样,否则后面执行 peer channel create 命令时会报错:
在这里插入图片描述

3、部署节点

3.1 编写docker-compose.yaml 文件:

version: '2'

volumes:
  orderer0.maakees.com:
  peer0.org1.maakees.com:

networks:
  maakees:

services:

  orderer0.maakees.com:
    container_name: orderer0.maakees.com
    image: hyperledger/fabric-orderer:2.4.4
    environment:
      - FABRIC_LOGGING_SPEC=DEBUG
      - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0
      - ORDERER_GENERAL_LISTENPORT=7050
      - ORDERER_GENERAL_GENESISMETHOD=file
      - ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block
      - ORDERER_GENERAL_LOCALMSPID=OrdererMSP
      - ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp
      # enabled TLS
      - ORDERER_GENERAL_TLS_ENABLED=true
      - ORDERER_GENERAL_TLS_PRIVATEKEY=/var/hyperledger/orderer/tls/server.key
      - ORDERER_GENERAL_TLS_CERTIFICATE=/var/hyperledger/orderer/tls/server.crt
      - ORDERER_GENERAL_TLS_ROOTCAS=[/var/hyperledger/orderer/tls/ca.crt]
    working_dir: /opt/gopath/src/github.com/hyperledger/fabric
    command: orderer
    volumes:
      - ./channel-artifacts/genesis.block:/var/hyperledger/orderer/orderer.genesis.block
      - ./crypto-config/ordererOrganizations/maakees.com/orderers/orderer0.maakees.com/msp:/var/hyperledger/orderer/msp
      - ./crypto-config/ordererOrganizations/maakees.com/orderers/orderer0.maakees.com/tls/:/var/hyperledger/orderer/tls
      - orderer0.maakees.com:/var/hyperledger/production/orderer
    ports:
      - 7050:7050
    networks:
      - maakees

  peer0.org1.maakees.com:
    container_name: peer0.org1.maakees.com
    image: hyperledger/fabric-peer:2.4.4
    environment:
      #Generic peer variables
      - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock
      # the following setting starts chaincode containers on the same
      # bridge network as the peers
      # https://docs.docker.com/compose/networking/
      - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=fixtures_maakees
      - FABRIC_LOGGING_SPEC=DEBUG
      #- FABRIC_LOGGING_SPEC=DEBUG
      - CORE_PEER_TLS_ENABLED=true
      - CORE_PEER_PROFILE_ENABLED=true
      - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/fabric/tls/server.crt
      - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/fabric/tls/server.key
      - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/fabric/tls/ca.crt
      # Peer specific variabes
      - CORE_PEER_ID=peer0.org1.maakees.com
      - CORE_PEER_ADDRESS=peer0.org1.maakees.com:7051
      - CORE_PEER_LISTENADDRESS=0.0.0.0:7051
      - CORE_PEER_CHAINCODEADDRESS=peer0.org1.maakees.com:7052
      - CORE_PEER_CHAINCODELISTENADDRESS=0.0.0.0:7052
      - CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org1.maakees.com:9051
      - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.maakees.com:7051
      - CORE_PEER_LOCALMSPID=Org1MSP
    volumes:
      - /var/run/:/host/var/run/
      - ./crypto-config/peerOrganizations/org1.maakees.com/peers/peer0.org1.maakees.com/msp:/etc/hyperledger/fabric/msp
      - ./crypto-config/peerOrganizations/org1.maakees.com/peers/peer0.org1.maakees.com/tls:/etc/hyperledger/fabric/tls
      - peer0.org1.maakees.com:/var/hyperledger/production
    working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
    command: peer node start
    ports:
      - 7051:7051
    depends_on:
      - orderer0.maakees.com
    networks:
      - maakees


  ca.org1.maakees.com:
    image: hyperledger/fabric-ca:1.5.4
    container_name: ca.org1.maakees.com
    environment:
      - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
      - FABRIC_CA_SERVER_CA_NAME=ca.org1.maakees.com
      - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.org1.maakees.com-cert.pem
      - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/priv_sk
      - FABRIC_CA_SERVER_TLS_ENABLED=true
      - FABRIC_CA_SERVER_TLS_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.org1.maakees.com-cert.pem
      - FABRIC_CA_SERVER_TLS_KEYFILE=/etc/hyperledger/fabric-ca-server-config/priv_sk
    ports:
      - 7054:7054
    command: sh -c 'fabric-ca-server start -b admin:adminpw -d'
    volumes:
      - ./crypto-config/peerOrganizations/org1.maakees.com/ca/:/etc/hyperledger/fabric-ca-server-config
    networks:
      - maakees

  cli1:
    container_name: cli1
    image: hyperledger/fabric-tools:latest
    labels:
      service: hyperledger-fabric
    tty: true
    stdin_open: true
    environment:
      - GOPATH=/opt/gopath
      - FABRIC_LOGGING_SPEC=INFO
      - FABRIC_CFG_PATH=/etc/hyperledger/peercfg
      #- FABRIC_LOGGING_SPEC=DEBUG
      - CORE_PEER_TLS_ENABLED=true
      - CORE_PEER_LOCALMSPID=Org1MSP
      - CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/peerOrganizations/org1.maakees.com/peers/peer0.org1.maakees.com/tls/ca.crt
      - CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/peerOrganizations/org1.maakees.com/users/Admin@org1.maakees.com/msp
      - CORE_PEER_ADDRESS=peer0.org1.maakees.com:7051
    working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer
    command: /bin/bash
    volumes:
      - /var/run/:/host/var/run/
      - ./chaincode/go:/opt/gopath/src/github.com/hyperledger/fabric-cluster/chaincode/go
      - ./crypto-config:/opt/gopath/src/github.com/hyperledger/fabric/peer/organizations
      - ./channel-artifacts:/opt/gopath/src/github.com/hyperledger/fabric/peer/channel-artifacts
    depends_on:
      - peer0.org1.maakees.com
    networks:
      - maakees

3.2 启动docker容器:

docker-compose up -d

在这里插入图片描述
执行 docker ps,查看容器,可以看到4个容器已经在运行了
在这里插入图片描述
3.3 执行 docker exec -it cli1 bash 进入 peer0 容器中,并创建通道:

# 创建通道
peer channel create -o orderer0.maakees.com:7050 -c mychannel -f ./channel-artifacts/channel.tx --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/ordererOrganizations/maakees.com/msp/tlscacerts/tlsca.maakees.com-cert.pem

会生成mychannel.block文件
在这里插入图片描述
3.3 将节点加入通道:peer channel join -b mychannel.block

bash-5.1# peer channel join -b mychannel.block
2022-07-01 18:55:22.215 UTC 0001 INFO [channelCmd] InitCmdFactory -> Endorser and orderer connections initialized
2022-07-01 18:55:22.385 UTC 0002 INFO [channelCmd] executeJoin -> Successfully submitted proposal to join channel

本教程只有一个组织,如果有多个组织需要将节点加入通道,可按如下步骤操作:

# 将cli1的mychannel.block复制到本地
docker cp cli1:/opt/gopath/src/github.com/hyperledger/fabric/peer/mychannel.block ./
# 将mychannel.block复制到cli2容器
docker cp ./mychannel.block cli2:/opt/gopath/src/github.com/hyperledger/fabric/peer
# 进入cli2容器
docker exec -it cli2 bash
# 将节点加入通道
peer channel join -b mychannel.block

4、部署链码

4.1 安装链码,链码使用官方示例:fabric-samples/chaincode/sacc/sacc.go,将示例文件夹复制到chaincode/go文件夹
链码的生命周期:打包、安装、批准、提交

# 1、进入cli1容器
docker exec -it cli1 bash
# 2、进入链码文件夹 —— docker-composer.yaml文件中cli节点配置volumes中的./chaincode/go/映射目录
cd /opt/gopath/src/github.com/hyperledger/fabric-cluster/chaincode/go/
# 3、安装go依赖
go env -w GOPROXY=https://goproxy.cn,direct
go mod init
go mod vendor
# 4、打包链码
peer lifecycle chaincode package sacc.tar.gz --path /opt/gopath/src/github.com/hyperledger/fabric-cluster/chaincode/go --label sacc_1
# 5、安装链码
peer lifecycle chaincode install sacc.tar.gz
# 6、链码审批
peer lifecycle chaincode approveformyorg --channelID mychannel --name sacc --version 1.0 --init-required --package-id sacc_1:f43aa8d08ca0e35aa89d92c5956465b6970365cfe734edcb708716b13ad35ee0 --sequence 1 --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/ordererOrganizations/maakees.com/orderers/orderer0.maakees.com/msp/tlscacerts/tlsca.maakees.com-cert.pem
# 7、检查是否批准
peer lifecycle chaincode checkcommitreadiness --channelID mychannel --name sacc --version 1.0 --init-required  --sequence 1 --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/ordererOrganizations/example.com/orderers/orderer0.maakees.com/msp/tlscacerts/tlsca.maakees.com-cert.pem --output json
# 8、提交链码,多个组织只需在命令行继续增加,peerAddresses和tlsRootCertFiles参数,无需切换到其他cli执行
peer lifecycle chaincode commit -o orderer0.maakees.com:7050 --channelID mychannel --name sacc --version 1.0 --init-required  --sequence 1 --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/ordererOrganizations/maakees.com/orderers/orderer0.maakees.com/msp/tlscacerts/tlsca.maakees.com-cert.pem --peerAddresses peer0.org1.maakees.com:7051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/peerOrganizations/org1.maakees.com/peers/peer0.maakees.com/tls/ca.crt

如果执行安装出现如下错误:
Error: chaincode install failed with status: 500 - failed to invoke backing implementation of ‘InstallChaincode’: could not build chaincode: docker build failed: docker image inspection failed: Get “http://unix.sock/images/dev-peer0.org1.maakees.com-sacc_1-1e522d86a763da75be8d9370effd75339189beab263c97d3170bd83ef1771920-b075dbd70ebcbcb687051446db2f8f04f03ad0520ca43eea5c3731b8d2586097/json”: dial unix /host/var/run/docker.sock: connect: no such file or directory

解决:
此问题是由适用于 macOS 的较新版本的 Docker Desktop 引起的。要解决此问题,请在 Docker 桌面首选项中取消选中Use gRPC FUSE for file sharing以使用旧版 osxfs 文件共享,然后单击应用并重新启动。

如果要将链码安装到其他节点,操作类似3.3

4.1 调用链码

peer chaincode invoke -o orderer0.maakees.com:7050 --isInit --ordererTLSHostnameOverride orderer0.maakees.com --tls true --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/ordererOrganizations/maakees.com/orderers/orderer0.maakees.com/msp/tlscacerts/tlsca.maakees.com-cert.pem --channelID mychannel --name sacc --peerAddresses peer0.org1.maakees.com:7051 --tlsRootCertFiles /opt/gopath/src/github.com/hyperledger/fabric/peer/organizations/peerOrganizations/org1.maakees.com/peers/peer0.org1.maakees.com/tls/ca.crt -c '{"Args":["a","bb"]}'

在这里插入图片描述
链码调用成功 环境搭建完毕!!!

5、停止网络

docker-compose down

在这里插入图片描述

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Hyperledger fabric2.4 搭建自己的网络 的相关文章

  • IDEA中修改workspace.xml内容,保存后自动被删除

    最近在做一个SpringBoot的分布式项目 由于项目里面有多个启动器 每次查找启动类文件来启动服务效率就很低 于是想到用Run Dashboard来管理启动类 由于是新的电脑装的IDEA没有自动开启这个工具 因此需要手动开启一下 开启方式

随机推荐

  • 【Docker】安装Presto连接Hive、mysql、oracle、postgresql、SQL server等7种类型数据库

    目录 1 简介 2 下载安装 1 下载镜像 2 下载presto客户端jar文件 3 将hadoop配置拷贝到容器 4 新增hive properties配置文件 5 重启容器 在linux命令行下 3 测试连接 4 其他类型数据库配置连接
  • Java 两点经纬度计算距离和角度

    角度 计算两点对于正北方向的朝向角度 0 360 param start format latitude 30 longitude 120 param end private static double bearing List
  • UEFI入门必读的12本书

    作者简介 罗冰 系统安全 特别是物理隔离领域 专家 主导开发网络隔离卡 双网隔离机 国产隔离系统 单向光传输等各类安全产品 拥有十几项发明和实用新型专利 致力于UEFI技术的研究 实践和推广 在CSDN和知乎上设有 UEFI开发探索 专栏
  • UE4(unreal engine4)蒙太奇动画删除不想要的帧数

    UE4系列文章目录 文章目录 UE4系列文章目录 前言 一 问题原因 二 具体操作步骤 前言 UE4 unreal engine4 蒙太奇动画删除不想要的帧数 当我们在UE4中导入一个fbx骨骼动画 当我们想要截取动画中某些不想用的帧时 点
  • 软件版本号命名规范_产品版本命名的规范与规则

    上一篇文章我们对产品的版本迭代的方法进行了一些总结 本篇文章我会针对产品的版本命名 验收 发布这三个层面 来总结一下我自己的想法 希望能对大家有所帮助 01 产品版本命名的规范与规则 1 1 版本命名规范 软件版本号由主版本号 次版本号 修
  • springboot后台获取不到前台Vue日期问题解决

    一 实体类字段写法如下 JsonFormat pattern yyyy MM dd timezone GMT 8 private Date sendTime Vue使用element ui写法
  • 4.2、Flink任务怎样读取文件中的数据

    目录 1 前言 2 readTextFile 已过时 不推荐使用 3 readFile 已过时 不推荐使用 4 fromSource FileSource 推荐使用 1 前言 思考 读取文件时可以设置哪些规则呢 1 文件的格式 txt cs
  • (二)程序语言设计基础

    目录 1 程序设计语言概述 1 1 基本概念 1 1 1 低级语言和高级语言 1 1 2 编译程序和解释程序 1 1 3 程序设计语言的定义 1 1 4 程序设计语言的分类 1 2 程序设计语言的基本成分 1 2 1 数据成分 1 2 2
  • 2022最新android设备uuid、udid使用教程​

    前言 udid UDID是Unique Device Identifier的缩写 中文意思是设备唯一标识 uuid UUID是Universally Unique Identifier的缩写 中文意思是通用唯一识别码 简言之 udid对应某
  • elasticsearch 中text与keyword的区别

    创建索引 PUT ellis mappings properties name type text fields keyword type keyword ignore above 256 age type long 我们可以看到name类
  • VBA常用语法

    最近接触了一下VBA编程 才知道Excel还能编程 而且还如此强大 真的是惊呆了 话不多说 先了解一下VBA常用的语法吧 1 基础语法 高级for循环 Function deleteArrayByIndex list As String D
  • oracle获取随机记录

    oracle获取随机记录 select from select from ford car order by dbms random value where rownum lt 1001
  • 【vision transformer】DETR原理及代码详解(三)

    transformer 端到端目标检测DETR项目实践及代码详解 Paddle Detr git PaddleViT object detection DETR at develop BR IDL PaddleViT GitHub 数据集及
  • Redis SDS简单动态字符串

    结构体定义 本质上说就是用C语言来实现基本的面向对象 来对底层的字符串进行表示 方便上层使用 为调用者减少负担 typedef char sds struct sdshdr int len int free char buf 举例常用操作
  • 搭建JMeter分布式测试环境

    分布式测试概述 现在我们来了解如何使用多台机器来执行压力测试 也就是所谓的分布式测试 当我们模拟大量的并发虚拟用户时 比如我们要起10万 100万甚至更多的并发用户时 一台负载机器可能就满足不了我们需要的用户量 此时 就需要使用多台主机搭建
  • Git入门--自定义标签

    忽略特殊文件 忽略某些文件时 需要编写 gitignore gitignore文件本身要放到版本库里 并且可以对 gitignore做版本管理 配置别名 git config global alias co checkout 用co来代替c
  • FFmpeg源码分析:av_register_all()注册封装器与解封装器

    FFmpeg中av register all 函数用于注册所有muxers demuxers与protocols FFmpeg4 0以前是用链表存储muxer demuxer FFmpeg4 0以后改为数组存储 并且av register
  • SPP原理和代码

    空间金字塔池化 Spatial Pyramid Pooling SPP 原理和代码实现 Pytorch 一 为什么需要SPP 首先需要知道为什么需要SPP 我们都知道卷积神经网络 CNN 由卷积层和全连接层组成 其中卷积层对于输入数据的大小
  • 众享比特董事长严挺:数字藏品在国内有三大发展趋势

    2022年11月2日 巴比特主办的温州元宇宙月系列活动之 数字藏品 虚拟人 元宇宙营销新策略 论坛在温州召开 众享比特董事长严挺 众享链网发起人严挺出席论坛并进行主题为 元宇宙在国内落地的一些实践分享 的演讲 温州元宇宙主题月秉承 拥抱数字
  • Hyperledger fabric2.4 搭建自己的网络

    1 使用cryptogen工具生成证书 1 1 将fabric samples bin目录下的二进制文件复制到 usr local bin目录 以便全局使用这些命令 cd fabric samples bin cp usr local bi