添加新组织时,是否需要应用锚点?
When adding a new org, do you need to apply the anchors?
我一直在关注 http://hyperledger-fabric.readthedocs.io/en/release-1.1/channel_update_tutorial.html 以将新组织添加到我的网络中,但是我注意到一些关于锚点的问题需要澄清。
在新组织的新 configtx.yaml 文件中,有一个用于锚点的部分,并将 peer0 配置为锚点。
Organizations:
- &Org3
# DefaultOrg defines the organization which is used in the sampleconfig
# of the fabric.git development environment
Name: Org3MSP
# ID to load the MSP definition as
ID: Org3MSP
MSPDir: crypto-config/peerOrganizations/org3.example.com/msp
AnchorPeers:
# AnchorPeers defines the location of peers which can be used
# for cross org gossip communication. Note, this value is only
# encoded in the genesis block in the Application section context
- Host: peer0.org3.example.com
Port: 7051
但是指南从不运行创建 anchor.tx 文件的命令。
例如
configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org3MSPanchors.tx -channelID $CHANNEL_NAME -asOrg Org3MSP
并且从不运行 CLI 容器命令来添加这个新锚点
例如
peer channel update -o orderer.example.com:7050 -c $CHANNEL_NAME -f ./channel-artifacts/Org3MSPanchors.tx
我继续按照步骤操作,在成功将新组织加入频道后,我在其他组织的同行的八卦日志中看到他们似乎发现了新组织。
我的问题是,这是否意味着在新的 configtx.yaml 文件中配置的新组织的锚节点会在新组织加入时自动添加,或者我是否错过了阅读日志但我仍然需要将新组织的锚点添加到频道?
好吧,让我澄清一下。 peer 能够发现新组织的事实是由于新组织的 peer 使用了通道中已有组织的 anchor peer。因此,在您的实验中,似乎发现了新的同行。
流程如下,一旦节点加入通道,它就会学习可用的锚点并将自己介绍给所有锚点,从而使组织的其他节点能够扩展成员资格。为了保持这个过程的对称性,最好让所有组织发布他们的锚点。因此,尽管文档中缺少这些步骤,但我还是建议您遵循这些步骤并为新组织更新锚点。
我一直在关注 http://hyperledger-fabric.readthedocs.io/en/release-1.1/channel_update_tutorial.html 以将新组织添加到我的网络中,但是我注意到一些关于锚点的问题需要澄清。
在新组织的新 configtx.yaml 文件中,有一个用于锚点的部分,并将 peer0 配置为锚点。
Organizations:
- &Org3
# DefaultOrg defines the organization which is used in the sampleconfig
# of the fabric.git development environment
Name: Org3MSP
# ID to load the MSP definition as
ID: Org3MSP
MSPDir: crypto-config/peerOrganizations/org3.example.com/msp
AnchorPeers:
# AnchorPeers defines the location of peers which can be used
# for cross org gossip communication. Note, this value is only
# encoded in the genesis block in the Application section context
- Host: peer0.org3.example.com
Port: 7051
但是指南从不运行创建 anchor.tx 文件的命令。
例如
configtxgen -profile TwoOrgsChannel -outputAnchorPeersUpdate ./channel-artifacts/Org3MSPanchors.tx -channelID $CHANNEL_NAME -asOrg Org3MSP
并且从不运行 CLI 容器命令来添加这个新锚点
例如
peer channel update -o orderer.example.com:7050 -c $CHANNEL_NAME -f ./channel-artifacts/Org3MSPanchors.tx
我继续按照步骤操作,在成功将新组织加入频道后,我在其他组织的同行的八卦日志中看到他们似乎发现了新组织。
我的问题是,这是否意味着在新的 configtx.yaml 文件中配置的新组织的锚节点会在新组织加入时自动添加,或者我是否错过了阅读日志但我仍然需要将新组织的锚点添加到频道?
好吧,让我澄清一下。 peer 能够发现新组织的事实是由于新组织的 peer 使用了通道中已有组织的 anchor peer。因此,在您的实验中,似乎发现了新的同行。
流程如下,一旦节点加入通道,它就会学习可用的锚点并将自己介绍给所有锚点,从而使组织的其他节点能够扩展成员资格。为了保持这个过程的对称性,最好让所有组织发布他们的锚点。因此,尽管文档中缺少这些步骤,但我还是建议您遵循这些步骤并为新组织更新锚点。