regarding “peer channel join -b mychannel.block”, it uses the following environment variable to decide which peers you are referring to. if you want to join all peers in the 2 org, change the peer0 org1. Iterate between the peer number and org number.

CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp CORE_PEER_ADDRESS=peer0.org2.example.com:7051 CORE_PEER_LOCALMSPID=”Org2MSP” CORE_PEER_TLS_ROOTCERT_FILE=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt

if you proposal gets declined on peer chaincode invoke, recall if you changed and iterated between the peers during install and instantiating of chaincode as the default requires min org1 and org2’s approval

peer chaincode install -n mycc -v 1.0 -p github.com/chaincode/chaincode_example02/go/ peer chaincode instantiate -o orderer.example.com:7050 –tls –cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C $CHANNEL_NAME -n mycc -v 1.0 -c ‘{“Args”:[“init”,”a”, “100”, “b”,”200”]}’ -P “AND (‘Org1MSP.peer’,’Org2MSP.peer’)”

in times of error, check the logs docker logs -f < whichever node you want to check on >

< whichever node you want to check on > e.g. cli or (dev-peer0.org2.example.com-mycc-1.0) if chaincode deployed on peer

Writing your first App

On node, Suggestion: install nvm (you might need 2 diff ver of node) https://github.com/IBM-Blockchain/marbles/issues/185 Use Node V6 to npm install to get rid of above issue ^ havent tried doing on fresh vm, unsure if unique https://stackoverflow.com/questions/51198611/hyperledger-fabric-fabcar-node-enrolladmin-js/51399273#51399273 Use Node V8 to npm rebuild and node run

Upgrading network components

Need two different versions of fabric sample (images, bin etc..), refer to older docs for installation of the docker images, else, the upgrade/downgrade might fail so /v11/fabric-sample/ /v12/fabric-sample/ for reference: sudo -s mkdir v12 mkdir v11 cd v12 curl -sSL http://bit.ly/2ysbOFE | bash -s 1.2.0 cd ../v11 curl -sSL https://goo.gl/6wtTN5 | bash -s 1.1.0

./byfn.sh upgrade (upgrades to latest, so it’s hyperledger/fabric-orderer:latest)

./byfn.sh upgrade -i 1.2.x (i’m getting error of ERROR: no such image: hyperledger/fabric-orderer:-1.2.0: invalid reference format) even though 1.2.0 is installed, i believe it’s either a bug of format string or i really fucked up (hard to fuck up when copy paste tbh)

export IMAGE_TAG=$(go env GOARCH)-1.2.0-stable Look out for this, go gave environment variable of amd for the vm im using when im using x86_64, take note of your image name also. i have 1.2.0,x86_64-1.1.0 and latest but no x86_64-1.2.0 nor amd-1.2.0 nor x86_64-latest

export CC_CONTAINERS=$(docker ps -a grep dev-$PEER awk ‘{print $1}’) (-a they missed out, no -a means only show nodes that are up)

my cli got no more jq after update, can apt-get

Goh Puay Hiang

Hi, I own this website

gphofficial gphofficial


Published