一个(Hyperledger Fabric)组织的对等组织成功加入了不该加入的渠道

时间:2019-10-10 09:23:17

标签: hyperledger-fabric

我正在测试部署在本地计算机上的Hyperledger Fabric(1.4.3)网络上的某些功能。组织的对等方(根据configtx.yaml)无法访问通道,可以获取块,并在不应该访问通道时加入通道。在此之后,对等方显示一些警告日志,“ peer channel getinfo”失败了……但是事实是“ peer channel fetch”和“ peer channel join”成功了。

该网络由2个组织组成。 org0有1个订购者和2个对等体。 org1有2个订购者和2个对等实体。订购服务的共识是Raft。

用于这些测试的加密材料是由来自以下机构的cryptogen生成的:

# crypto-config.yaml

OrdererOrgs:

  - Name: org0
    Domain: org0
    EnableNodeOUs: true
    Users:
      Count: 1
    Specs:
      - Hostname: orderer0
      - Hostname: peer0
      - Hostname: peer1

  - Name: org1
    Domain: org1
    EnableNodeOUs: true
    Users:
      Count: 1
    Specs:
      - Hostname: orderer0
      - Hostname: orderer1
      - Hostname: peer0
      - Hostname: peer1

我的configtx.yaml看起来像:

Organizations:
    - &Org0
        Name: org0
        ID: org0
        MSPDir: crypto-config/ordererOrganizations/org0/msp
        Policies:
            Readers:
                Type: Signature
                Rule: "OR('org0.member')"
            Writers:
                Type: Signature
                Rule: "OR('org0.member')"
            Admins:
                Type: Signature
                Rule: "OR('org0.admin')"
        AnchorPeers:
            - Host: peer0.org0
              Port: 7051
    - &Org1
        Name: org1
        ID: org1
        MSPDir: crypto-config/ordererOrganizations/org1/msp
        Policies:
            Readers:
                Type: Signature
                Rule: "OR('org1.member')"
            Writers:
                Type: Signature
                Rule: "OR('org1.member')"
            Admins:
                Type: Signature
                Rule: "OR('org1.admin')"
        AnchorPeers:
            - Host: peer0.org1
              Port: 8051
Capabilities:
    Channel: &ChannelCapabilities
        V1_4_2: true
    Orderer: &OrdererCapabilities
        V1_4_2: true
    Application: &ApplicationCapabilities
        V1_4_2: true
        V1_3: false
        V1_2: false
        V1_1: false
Application: &ApplicationDefaults
    Organizations:        
    ACLs: &ACLsDefault
        lscc/ChaincodeExists: /Channel/Application/Readers
        lscc/GetDeploymentSpec: /Channel/Application/Readers
        lscc/GetChaincodeData: /Channel/Application/Readers
        lscc/GetInstantiatedChaincodes: /Channel/Application/Readers
        qscc/GetChainInfo: /Channel/Application/Readers
        qscc/GetBlockByNumber: /Channel/Application/Readers
        qscc/GetBlockByHash: /Channel/Application/Readers
        qscc/GetTransactionByID: /Channel/Application/Readers
        qscc/GetBlockByTxID: /Channel/Application/Readers
        cscc/GetConfigBlock: /Channel/Application/Readers
        cscc/GetConfigTree: /Channel/Application/Readers
        cscc/SimulateConfigTreeUpdate: /Channel/Application/Readers
        # cscc/JoinChain: /Channel/Application/Writers
        peer/Propose: /Channel/Application/Writers
        peer/ChaincodeToChaincode: /Channel/Application/Readers
        event/Block: /Channel/Application/Readers
        event/FilteredBlock: /Channel/Application/Readers
    Policies:
        Readers:
            Type: ImplicitMeta
            Rule: "ANY Readers"
        Writers:
            Type: ImplicitMeta
            Rule: "ANY Writers"
        Admins:
            Type: ImplicitMeta
            Rule: "MAJORITY Admins"
    Capabilities:
        <<: *ApplicationCapabilities
Orderer: &OrdererDefaults
    OrdererType: etcdraft    
    EtcdRaft:
        Consenters:
        - Host: orderer0.org0
          Port: 7050
          ClientTLSCert: crypto-config/ordererOrganizations/org0/orderers/orderer0.org0/tls/server.crt
          ServerTLSCert: crypto-config/ordererOrganizations/org0/orderers/orderer0.org0/tls/server.crt
        - Host: orderer0.org1
          Port: 7050
          ClientTLSCert: crypto-config/ordererOrganizations/org1/orderers/orderer0.org1/tls/server.crt
          ServerTLSCert: crypto-config/ordererOrganizations/org1/orderers/orderer0.org1/tls/server.crt
        - Host: orderer1.org1
          Port: 7050
          ClientTLSCert: crypto-config/ordererOrganizations/org1/orderers/orderer1.org1/tls/server.crt
          ServerTLSCert: crypto-config/ordererOrganizations/org1/orderers/orderer1.org1/tls/server.crt    
    Addresses:
        - orderer0.org0:7050
        - orderer0.org1:7050
        - orderer1.org1:7050
    Organizations:
        - *Org0
        - *Org1
    BatchTimeout: 1s
    BatchSize:
        MaxMessageCount: 10
        AbsoluteMaxBytes: 99 MB
        PreferredMaxBytes: 512 KB
    Organizations:
    Policies:
        Readers:
            Type: ImplicitMeta
            Rule: "ANY Readers"
        Writers:
            Type: ImplicitMeta
            Rule: "ANY Writers"
        Admins:
            Type: ImplicitMeta
            Rule: "MAJORITY Admins"
        BlockValidation:
            Type: ImplicitMeta
            Rule: "ANY Writers"
Channel: &ChannelDefaults
    Policies:
        Readers:
            Type: ImplicitMeta
            Rule: "ANY Readers"
        Writers:
            Type: ImplicitMeta
            Rule: "ANY Writers"
        Admins:
            Type: ImplicitMeta
            Rule: "MAJORITY Admins"
    Capabilities:
        <<: *ChannelCapabilities
Profiles:
    Raft:
        <<: *ChannelDefaults
        Capabilities:
            <<: *ChannelCapabilities
        Orderer:
            <<: *OrdererDefaults
            Capabilities:
                <<: *OrdererCapabilities
        Application:
            <<: *ApplicationDefaults
            Organizations:
                - *Org0
                - *Org1
        Consortiums:
            SampleConsortium:
                Organizations:
                    - *Org0
                    - *Org1
            Org0Consortium:
                Organizations:
                    - *Org0
            Org1Consortium:
                Organizations:
                    - *Org1
    TwoOrgsChannel:
        Consortium: SampleConsortium
        <<: *ChannelDefaults
        Application:
            <<: *ApplicationDefaults
            Organizations:
                - *Org0
                - *Org1
            Capabilities:
                <<: *ApplicationCapabilities
    Org0Channel:
        Consortium: Org0Consortium
        <<: *ChannelDefaults
        Application:
            <<: *ApplicationDefaults
            Organizations:
                - *Org0
            Capabilities:
                <<: *ApplicationCapabilities
    Org1Channel:
        Consortium: Org1Consortium
        <<: *ChannelDefaults
        Application:
            <<: *ApplicationDefaults
            Organizations:
                - *Org1
            Capabilities:
                <<: *ApplicationCapabilities

org0对等方成功加入了定义为Org1Channel的通道,但不成功。加入后,对等日志将定期显示:

2019-10-10 06:44:30.979 UTC [gossip.gossip] Gossip -> WARN 10cf29 Failed obtaining gossipChannel of [111 114 103 49] aborting

对于“ org1” ASCII,“ 111 114 103 49”是十进制。

“对等频道getinfo”在加入后失败,但事实是“对等频道获取”和“对等频道加入”之前成功了,而实际上不成功。

知道为什么会这样吗? org0组织是订购服务的一部分吗?

0 个答案:

没有答案