After finishing the <Using Private Data in Fabric> lab, the next day found only "install-fabric.sh" file under the directory, the rest files are all disappear.
Follow the process to rebuild from scratch
mkdir fabric-samples
cd fabric-samples
curl -sSLO https://raw.githubusercontent.com/hyperledger/fabric/main/scripts/install-fabric.sh && chmod x install-fabric.sh
./install-fabric.sh docker samples
./install-fabric.sh binary
cd fabric-samples/test-network
./network.sh up
./network.sh createChannel
The peer0.org1 has failed to join channel 'mychannel'
./network.sh createChannel
Joining org1 peer to the channel...
Using organization 1
peer channel join -b ./channel-artifacts/mychannel.block
res=1
peer channel join -b ./channel-artifacts/mychannel.block
res=1
peer channel join -b ./channel-artifacts/mychannel.block
res=1
peer channel join -b ./channel-artifacts/mychannel.block
res=1
2023-01-24 11:17:52.305 AEDT 0001 INFO [channelCmd] InitCmdFactory -> Endorser and orderer connections initialized
Error: proposal failed (err: bad proposal response 500: "JoinChain" for channelID = mychannel failed because of validation of configuration block, because of Failed capabilities check: [Application capability V2_5 is required but not supported])
After 5 attempts, peer0.org1 has failed to join channel 'mychannel'
Expected to see
Channel 'mychannel' created
Joining org1 peer to the channel...
Joining org2 peer to the channel...
Anchor peer set for org 'Org1MSP' on channel 'mychannel'
Anchor peer set for org 'Org2MSP' on channel 'mychannel'
Channel 'mychannel' joined
CodePudding user response:
In your configtx.yaml which you can find inside the "configtx" folder, you need to change the value of Application from 2_5 to 2_0:
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.5 for Application enables the new non-backwards compatible
# features of fabric v2.5, namely the ability to purge private data.
# Prior to enabling V2.5 application capabilities, ensure that all
# peers on a channel are at v2.5.0 or later.
--> HERE V2_0: true
At least it worked for me. If I have been useful to you, leave me a positive feedback ;)
CodePudding user response:
The Fabric V2.5 release with merging to the main branch caused it. There are two ways to solve that:
- Change the line V2_5: true to V2_0: true in test-network/configtx/configtx.yaml
- Rollback the branch version: git reset --hard 124adb43f964c4ef62836c547bba851a4d10bfb3