91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

Organizations組織機構怎么配置

發布時間:2021-12-24 17:14:32 來源:億速云 閱讀:101 作者:iii 欄目:互聯網科技

這篇文章主要介紹“Organizations組織機構怎么配置”,在日常操作中,相信很多人在Organizations組織機構怎么配置問題上存在疑惑,小編查閱了各式資料,整理出簡單好用的操作方法,希望對大家解答”Organizations組織機構怎么配置”的疑惑有所幫助!接下來,請跟著小編一起來學習吧!

configtx.yaml是Hyperledger Fabric區塊鏈網絡運維工具configtxgen用于生成通道創世塊或通道交易的配置文件,configtx.yaml的內容直接決定了所生成的創世區塊的內容。

Capabilities / 通道能力配置

Capabilities段用來定義fabric網絡的能力。這是版本v1.0.0引入的一個新的配置段,當與版本v1.0.x的對等節點與排序節點混合組網時不可使用。

Capabilities段定義了fabric程序要加入網絡所必須支持的特性。例如,如果添加了一個新的MSP類型,那么更新的程序可能會根據該類型識別并驗證簽名,但是老版本的程序就沒有辦法驗證這些交易。這可能導致不同版本的fabric程序中維護的世界狀態不一致。

因此,通過定義通道的能力,就明確了不滿足該能力要求的fabric程序,將無法處理交易,除非升級到新的版本。對于v1.0.x的程序而言,如果在Capabilities段定義了任何能力,即使聲明不需要支持這些能力,都會導致其有意崩潰。

Capabilities:
    # Global配置同時應用于排序節點和對等節點,并且必須被兩種節點同時支持。
    # 將該配置項設置為ture表明要求節點具備該能力
    Global: &ChannelCapabilities
        V1_3: true

    # Orderer配置僅應用于排序節點,不需考慮對等節點的升級。將該配置項
    # 設置為true表明要求排序節點具備該能力
    Orderer: &OrdererCapabilities
        V1_1: true

    # Application配置僅應用于對等網絡,不需考慮排序節點的升級。將該配置項
    # 設置為true表明要求對等節點具備該能力
    Application: &ApplicationCapabilities
        V1_3: true

Organizations / 組織機構配置

Organizations配置段用來定義組織機構實體,以便在后續配置中引用。例如,下面的配置文件中,定義了三個機構,可以分別使用ExampleCom、Org1ExampleCom和Org2ExampleCom引用其配置:

Organizations:

    - &ExampleCom
        Name: ExampleCom
        ID: example.com
        AdminPrincipal: Role.ADMIN
        MSPDir: ./ordererOrganizations/example.com/msp
        Policies:
            Readers:
                Type: Signature
                Rule: OR('example.com.member')
            Writers:
                Type: Signature
                Rule: OR('example.com.member')
            Admins:
                Type: Signature
                Rule: OR('example.com.admin')
            Endorsement:
                Type: Signature
                Rule: OR('example.com.member')

    - &Org1ExampleCom
        Name: Org1ExampleCom
        ID: org1.example.com
        MSPDir: ./peerOrganizations/org1.example.com/msp
        AdminPrincipal: Role.ADMIN
        AnchorPeers:
            - Host: peer0.org1.example.com
              Port: 7051
        Policies:
            Readers:
                Type: Signature
                Rule: OR('org1.example.com.member')
            Writers:
                Type: Signature
                Rule: OR('org1.example.com.member')
            Admins:
                Type: Signature
                Rule: OR('org1.example.com.admin')
            Endorsement:
                Type: Signature
                Rule: OR('org1.example.com.member')

    - &Org2ExampleCom
        Name: Org2ExampleCom
        ID: org2.example.com
        MSPDir: ./peerOrganizations/org2.example.com/msp
        AdminPrincipal: Role.ADMIN
        AnchorPeers:
            - Host: peer0.org2.example.com
              Port: 7051
        Policies:
            Readers:
                Type: Signature
                Rule: OR('org2.example.com.member')
            Writers:
                Type: Signature
                Rule: OR('org2.example.com.member')
            Admins:
                Type: Signature
                Rule: OR('org2.example.com.admin')
            Endorsement:
                Type: Signature
                Rule: OR('org2.example.com.member')

Orderer / 排序節點配置

Orderer配置段用來定義要編碼寫入創世區塊或通道交易的排序節點參數。

Orderer: &OrdererDefaults

    # 排序節點類型用來指定要啟用的排序節點實現,不同的實現對應不同的共識算法。
    # 目前可用的類型為:solo和kafka
    OrdererType: solo
    Addresses:
        - orderer0.example.com:7050

    BatchTimeout: 2s
    BatchSize:
        MaxMessageCount: 10
        AbsoluteMaxBytes: 98 MB
        PreferredMaxBytes: 512 KB

    MaxChannels: 0
    Kafka:
        Brokers:
            - kafka0:9092
            - kafka1:9092
            - kafka2:9092
            - kafka3:9092

    Organizations:

    # 定義本層級的排序節點策略,其權威路徑為 /Channel/Orderer/<PolicyName>
    Policies:
        Readers:
            Type: ImplicitMeta
            Rule: ANY Readers
        Writers:
            Type: ImplicitMeta
            Rule: ANY Writers
        Admins:
            Type: ImplicitMeta
            Rule: MAJORITY Admins
        # BlockValidation配置項指定了哪些簽名必須包含在區塊中,以便對等節點進行驗證
        BlockValidation:
            Type: ImplicitMeta
            Rule: ANY Writers

    # Capabilities配置描述排序節點層級的能力需求,這里直接引用
    # 前面Capabilities配置段中的OrdererCapabilities配置項
    Capabilities:
        <<: *OrdererCapabilities

Channel / 通道配置

Channel配置段用來定義要寫入創世區塊或配置交易的通道參數。

Channel: &ChannelDefaults
    # 定義本層級的通道訪問策略,其權威路徑為 /Channel/<PolicyName>
    Policies:
        Readers:
            Type: ImplicitMeta
            Rule: ANY Readers
        # Writes策略定義了調用Broadcast API提交交易的許可規則
        Writers:
            Type: ImplicitMeta
            Rule: ANY Writers
        # Admin策略定義了修改本層級配置的許可規則
        Admins:
            Type: ImplicitMeta
            Rule: MAJORITY Admins

    # Capabilities配置描通道層級的能力需求,這里直接引用
    # 前面Capabilities配置段中的ChannelCapabilities配置項
    Capabilities:
        <<: *ChannelCapabilities

Application / 應用配置

Application配置段用來定義要寫入創世區塊或配置交易的應用參數。

Application: &ApplicationDefaults
    ACLs: &ACLsDefault
        # ACLs配置段為系統中各種資源提供默認的策略。
        # 這里所說的“資源”,可以是系統鏈碼的函數,例如qscc系統鏈碼的GetBlockByNumber方法
        # 也可以是其他資源,例如誰可以接收區塊事件。
        # 這個配置段不是用來定義資源或API,而僅僅是定義資源的訪問控制策略
        # 
        # 用戶可以在通道定義中重寫這些默認策略

        #---New Lifecycle System Chaincode (_lifecycle) function to policy mapping for access control--#

        # _lifecycle系統鏈碼CommitChaincodeDefinition函數的ACL定義
        _lifecycle/CommitChaincodeDefinition: /Channel/Application/Writers

        # _lifecycle系統鏈碼的QueryChaincodeDefinition函數的ACL定義
        _lifecycle/QueryChaincodeDefinition: /Channel/Application/Readers

        # _lifecycle系統鏈碼的QueryNamespaceDefinitions函數的ACL定義
        _lifecycle/QueryNamespaceDefinitions: /Channel/Application/Readers

        #---Lifecycle System Chaincode (lscc) function to policy mapping for access control---#

        # lscc系統鏈碼的getid函數的ACL定義
        lscc/ChaincodeExists: /Channel/Application/Readers

        # lscc系統鏈碼的getdepspec函數的ACL定義
        lscc/GetDeploymentSpec: /Channel/Application/Readers

        # lscc系統鏈碼的getccdata函數的ACL定義
        lscc/GetChaincodeData: /Channel/Application/Readers

        # lscc系統鏈碼的getchaincodes函數的ACL定義
        lscc/GetInstantiatedChaincodes: /Channel/Application/Readers

        #---Query System Chaincode (qscc) function to policy mapping for access control---#

        # qscc系統鏈碼的GetChainInfo函數的ACL定義
        qscc/GetChainInfo: /Channel/Application/Readers

        # qscc系統鏈碼的GetBlockByNumber函數的ACL定義
        qscc/GetBlockByNumber: /Channel/Application/Readers

        # qscc系統 鏈碼的GetBlockByHash函數的ACL定義
        qscc/GetBlockByHash: /Channel/Application/Readers

        # qscc系統鏈碼的GetTransactionByID函數的ACL定義
        qscc/GetTransactionByID: /Channel/Application/Readers

        # qscc系統鏈碼GetBlockByTxID函數的ACL定義
        qscc/GetBlockByTxID: /Channel/Application/Readers

        #---Configuration System Chaincode (cscc) function to policy mapping for access control---#

        # cscc系統鏈碼的GetConfigBlock函數的ACl定義
        cscc/GetConfigBlock: /Channel/Application/Readers

        # cscc系統鏈碼的GetConfigTree函數的ACL定義
        cscc/GetConfigTree: /Channel/Application/Readers

        # cscc系統鏈碼的SimulateConfigTreeUpdate函數的ACL定義
        cscc/SimulateConfigTreeUpdate: /Channel/Application/Readers

        #---Miscellanesous peer function to policy mapping for access control---#

        # 訪問對等節點上的鏈碼的ACL策略定義
        peer/Propose: /Channel/Application/Writers

        # 從鏈碼中訪問其他鏈碼的ACL策略定義
        peer/ChaincodeToChaincode: /Channel/Application/Readers

        #---Events resource to policy mapping for access control###---#

        # 發送區塊事件的ACL策略定義
        event/Block: /Channel/Application/Readers

        # 發送過濾的區塊事件的ACL策略定義
        event/FilteredBlock: /Channel/Application/Readers

    # Organizations配置列出參與到網絡中的機構清單
    Organizations:

    # 定義本層級的應用控制策略,其權威路徑為 /Channel/Application/<PolicyName>
    Policies: &ApplicationDefaultPolicies
        Readers:
            Type: ImplicitMeta
            Rule: "ANY Readers"
        Writers:
            Type: ImplicitMeta
            Rule: "ANY Writers"
        Admins:
            Type: ImplicitMeta
            Rule: "MAJORITY Admins"
        LifecycleEndorsement:
            Type: ImplicitMeta
            Rule: "ANY Endorsement"
        Endorsement:
            Type: ImplicitMeta
            Rule: "ANY Endorsement"

    # Capabilities配置描述應用層級的能力需求,這里直接引用
    # 前面Capabilities配置段中的ApplicationCapabilities配置項
    Capabilities:
        <<: *ApplicationCapabilities

Profiles / 配置入口

Profiles配置段用來定義用于configtxgen工具的配置入口。包含委員會(consortium)的配置入口可以用來生成排序節點的創世區塊。如果在排序節點的創世區塊中正確定義了consortium的成員,那么可以僅使用機構成員名稱和委員會的名稱來生成通道創建請求。

Profiles:

    # SampleInsecureSolo定義了一個使用Solo排序節點的簡單配置
    SampleInsecureSolo:
        <<: *ChannelDefaults
        Orderer:
            <<: *OrdererDefaults
            Organizations:
                - *ExampleCom
            Capabilities:
                <<: *OrdererCapabilities
        Application:
            <<: *ApplicationDefaults
            Organizations:
                - *ExampleCom
            Capabilities:
                <<: *ApplicationCapabilities
            Policies:
                Readers:
                  Type: ImplicitMeta
                  Rule: ANY Readers
                Writers:
                  Type: ImplicitMeta
                  Rule: ANY Writers
                Admins:
                  Type: ImplicitMeta
                  Rule: MAJORITY Admins
                LifecycleEndorsement:
                  Type: ImplicitMeta
                  Rule: ANY Endorsement
                Endorsement:
                  Type: ImplicitMeta
                  Rule: ANY Endorsement
        Consortiums:
            SampleConsortium:
                Organizations:
                    - *Org1ExampleCom
                    - *Org2ExampleCom

    # SampleInsecureKafka定義了一個使用Kfaka排序節點的配置
    SampleInsecureKafka:
        <<: *ChannelDefaults
        Orderer:
            <<: *OrdererDefaults
            OrdererType: kafka
            Addresses:
                - orderer0.example.com:7050
                - orderer1.example.com:7050
                - orderer2.example.com:7050
            Organizations:
                - *ExampleCom
            Capabilities:
                <<: *OrdererCapabilities
        Application:
            <<: *ApplicationDefaults
            Organizations:
                - *ExampleCom
            Capabilities:
                <<: *ApplicationCapabilities
            Policies:
                Readers:
                  Type: ImplicitMeta
                  Rule: ANY Readers
                Writers:
                  Type: ImplicitMeta
                  Rule: ANY Writers
                Admins:
                  Type: ImplicitMeta
                  Rule: MAJORITY Admins
                LifecycleEndorsement:
                  Type: ImplicitMeta
                  Rule: ANY Endorsement
                Endorsement:
                  Type: ImplicitMeta
                  Rule: ANY Endorsement
        Consortiums:
            SampleConsortium:
                Organizations:
                    - *ExampleCom
                    - *Org1ExampleCom
                    - *Org2ExampleCom

    # SampleSingleMSPSolo定義了一個使用Solo排序節點、包含單一MSP的配置
    SampleSingleMSPSolo:
        Orderer:
            <<: *OrdererDefaults
            Organizations:
                - *ExampleCom
            Capabilities:
                <<: *OrdererCapabilities
        Application:
            <<: *ApplicationDefaults
            Organizations:
                - *ExampleCom
            Capabilities:
                <<: *ApplicationCapabilities
            Policies:
                Readers:
                  Type: ImplicitMeta
                  Rule: ANY Readers
                Writers:
                  Type: ImplicitMeta
                  Rule: ANY Writers
                Admins:
                  Type: ImplicitMeta
                  Rule: MAJORITY Admins
                LifecycleEndorsement:
                  Type: ImplicitMeta
                  Rule: ANY Endorsement
                Endorsement:
                  Type: ImplicitMeta
                  Rule: ANY Endorsement
        Consortiums:
            SampleConsortium:
                Organizations:
                    - *ExampleCom
                    - *Org1ExampleCom
                    - *Org2ExampleCom

    # SampleEmptyInsecureChannel定義了一個不包含成員與訪問控制策略的通道
    SampleEmptyInsecureChannel:
        Capabilities:
            <<: *ChannelCapabilities
        Consortium: SampleConsortium
        Application:
            Organizations:
                - *ExampleCom
            Capabilities:
                <<: *ApplicationCapabilities
            Policies:
                Readers:
                  Type: ImplicitMeta
                  Rule: ANY Readers
                Writers:
                  Type: ImplicitMeta
                  Rule: ANY Writers
                Admins:
                  Type: ImplicitMeta
                  Rule: MAJORITY Admins
                LifecycleEndorsement:
                  Type: ImplicitMeta
                  Rule: ANY Endorsement
                Endorsement:
                  Type: ImplicitMeta
                  Rule: ANY Endorsement

    # SysTestChannel定義了一個用于測試的通道
    SysTestChannel:
        <<: *ChannelDefaults
        Capabilities:
            <<: *ChannelCapabilities
        Consortium: SampleConsortium
        Application:
            <<: *ApplicationDefaults
            Organizations:
                - *Org1ExampleCom
                - *Org2ExampleCom
            Capabilities:
                <<: *ApplicationCapabilities
            Policies:
                Readers:
                  Type: ImplicitMeta
                  Rule: ANY Readers
                Writers:
                  Type: ImplicitMeta
                  Rule: ANY Writers
                Admins:
                  Type: ImplicitMeta
                  Rule: MAJORITY Admins
                LifecycleEndorsement:
                  Type: ImplicitMeta
                  Rule: ANY Endorsement
                Endorsement:
                  Type: ImplicitMeta
                  Rule: ANY Endorsement

    # SampleSingleMSPChannel定義了一個僅包含單一成員機構的通道。
    # 該配置通常與SampleSingleMSPSolo或SampleSingleMSPKafka同時使用
    SampleSingleMSPChannel:
        <<: *ChannelDefaults
        Capabilities:
            <<: *ChannelCapabilities
        Consortium: SampleConsortium
        Application:
            <<: *ApplicationDefaults
            Organizations:
                - *Org1ExampleCom
                - *Org2ExampleCom
            Capabilities:
                <<: *ApplicationCapabilities
            Policies:
                Readers:
                  Type: ImplicitMeta
                  Rule: ANY Readers
                Writers:
                  Type: ImplicitMeta
                  Rule: ANY Writers
                Admins:
                  Type: ImplicitMeta
                  Rule: MAJORITY Admins
                LifecycleEndorsement:
                  Type: ImplicitMeta
                  Rule: ANY Endorsement
                Endorsement:
                  Type: ImplicitMeta
                  Rule: ANY Endorsement

到此,關于“Organizations組織機構怎么配置”的學習就結束了,希望能夠解決大家的疑惑。理論與實踐的搭配能更好的幫助大家學習,快去試試吧!若想繼續學習更多相關知識,請繼續關注億速云網站,小編會繼續努力為大家帶來更多實用的文章!

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

颍上县| 拉萨市| 英超| 丰城市| 重庆市| 公主岭市| 五台县| 龙泉市| 建阳市| 新疆| 浦县| 唐河县| 兰西县| 清水县| 松溪县| 泸水县| 西盟| 绥滨县| 普格县| 神池县| 来安县| 封丘县| 沈丘县| 远安县| 五指山市| 白朗县| 师宗县| 始兴县| 勃利县| 温宿县| 辰溪县| 平遥县| 神木县| 会昌县| 乌兰浩特市| 中超| 汝城县| 教育| 崇左市| 扎赉特旗| 龙里县|