Update with new chaincode lifecycle
parent
6619e8d6bf
commit
2cbc254965
|
@ -57,7 +57,7 @@ ready: # create/join channel, install/instantiate cc
|
|||
|
||||
make update_anchors
|
||||
|
||||
make cc_test # test_cc_install test_cc_instantiate test_cc_invoke_query
|
||||
make cc_test # test_cc_install test_cc_approve test_cc_commit test_cc_invoke_query
|
||||
|
||||
make test_lscc # test lscc operations
|
||||
make test_qscc # test qscc operations
|
||||
|
@ -84,7 +84,7 @@ ready: # create/join channel, install/instantiate cc
|
|||
channel_test: test_channel_create test_channel_join test_channel_list test_channel_getinfo
|
||||
|
||||
# chaincode related operations
|
||||
cc_test: test_cc_install test_cc_instantiate test_cc_invoke_query
|
||||
cc_test: test_cc_install test_cc_approve test_cc_commit test_cc_invoke_query
|
||||
|
||||
restart: stop start
|
||||
|
||||
|
@ -141,9 +141,17 @@ test_cc: # test chaincode, deprecated
|
|||
fi
|
||||
|
||||
test_cc_install: # Install the chaincode
|
||||
@echo "Install chaincode on the fabric network"
|
||||
@echo "Install chaincode to all peers"
|
||||
@docker exec -it fabric-cli bash -c "cd /tmp; bash scripts/test_cc_install.sh"
|
||||
|
||||
test_cc_approve: # Approve the chaincode definition
|
||||
@echo "Approve the chaincode by all orgs"
|
||||
@docker exec -it fabric-cli bash -c "cd /tmp; bash scripts/test_cc_approve.sh"
|
||||
|
||||
test_cc_commit: # Commit the chaincode definition
|
||||
@echo "Commit the chaincode by any org"
|
||||
@docker exec -it fabric-cli bash -c "cd /tmp; bash scripts/test_cc_commit.sh"
|
||||
|
||||
test_cc_instantiate: # Instantiate the chaincode
|
||||
@echo "Instantiate chaincode on the fabric network"
|
||||
@docker exec -it fabric-cli bash -c "cd /tmp; bash scripts/test_cc_instantiate.sh"
|
||||
|
|
|
@ -59,6 +59,7 @@ services:
|
|||
environment:
|
||||
- ORDERER_GENERAL_CLUSTER_SENDBUFFERSIZE=10
|
||||
- ORDERER_GENERAL_TLS_ENABLED=true
|
||||
- FABRIC_LOGGING_SPEC=DEBUG
|
||||
volumes:
|
||||
- ./crypto-config/ordererOrganizations/example.com/orderers/orderer0.example.com/msp:/var/hyperledger/orderer/msp
|
||||
- ./crypto-config/ordererOrganizations/example.com/orderers/orderer0.example.com/tls/:/var/hyperledger/orderer/tls
|
||||
|
@ -92,8 +93,8 @@ services:
|
|||
environment:
|
||||
- ORDERER_GENERAL_CLUSTER_SENDBUFFERSIZE=10
|
||||
volumes:
|
||||
- ./crypto-config/ordererOrganizations/example.com/orderers/orderer1.example.com/msp:/var/hyperledger/orderer/msp
|
||||
- ./crypto-config/ordererOrganizations/example.com/orderers/orderer1.example.com/tls/:/var/hyperledger/orderer/tls
|
||||
- ./crypto-config/ordererOrganizations/example.com/orderers/orderer2.example.com/msp:/var/hyperledger/orderer/msp
|
||||
- ./crypto-config/ordererOrganizations/example.com/orderers/orderer2.example.com/tls/:/var/hyperledger/orderer/tls
|
||||
- ./raft/channel-artifacts/orderer.genesis.block:/var/hyperledger/orderer/orderer.genesis.block
|
||||
command: orderer start
|
||||
|
||||
|
@ -111,6 +112,7 @@ services:
|
|||
- CORE_PEER_CHAINCODELISTENADDRESS=peer0.org1.example.com:7052
|
||||
- CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7051
|
||||
- CORE_PEER_LOCALMSPID=Org1MSP
|
||||
- FABRIC_LOGGING_SPEC=DEBUG
|
||||
volumes:
|
||||
- ./crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/fabric/msp
|
||||
- ./crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls:/etc/hyperledger/fabric/tls
|
||||
|
|
|
@ -329,15 +329,15 @@ channelSignConfigTx () {
|
|||
# Usage: channelUpdate channel org peer transaction_file
|
||||
channelUpdate() {
|
||||
local channel=$1
|
||||
local org=$2
|
||||
local peer=$3
|
||||
local tx=$4
|
||||
local org=$2
|
||||
local peer=$3
|
||||
local tx=$4
|
||||
[ -z $channel ] && [ -z $tx ] && [ -z $org ] && [ -z $peer ] && echo_r "input param invalid" && exit -1
|
||||
|
||||
setEnvs $org $peer
|
||||
setEnvs $org $peer
|
||||
echo "=== Update config on channel ${channel} === "
|
||||
[ -f ${CHANNEL_ARTIFACTS}/${tx} ] || { echo_r "${tx} not exist"; exit 1; }
|
||||
if [ -z "$CORE_PEER_TLS_ENABLED" -o "$CORE_PEER_TLS_ENABLED" = "false" ]; then
|
||||
if [ -z "$CORE_PEER_TLS_ENABLED" -o "$CORE_PEER_TLS_ENABLED" = "false" ]; then
|
||||
peer channel update \
|
||||
-o ${ORDERER_URL} \
|
||||
-c ${channel} \
|
||||
|
@ -359,32 +359,37 @@ channelUpdate() {
|
|||
sleep 2
|
||||
}
|
||||
|
||||
# Install chaincode on specified peer node
|
||||
# Install chaincode on the peer node
|
||||
# In v2.x it will package, install and approve
|
||||
# chaincodeInstall peer cc_name version path
|
||||
chaincodeInstall () {
|
||||
if [ "$#" -ne 7 ]; then
|
||||
echo_r "Wrong param number for chaincode install"
|
||||
exit -1
|
||||
fi
|
||||
local org=$1
|
||||
local peer=$2
|
||||
local name=$3
|
||||
local version=$4
|
||||
local path=$5
|
||||
local peer_url=$3
|
||||
local peer_tls_root_cert=$4
|
||||
local name=$5
|
||||
local version=$6
|
||||
local path=$7
|
||||
|
||||
[ -z $org ] && [ -z $peer ] && [ -z $name ] && [ -z $version ] && [ -z $path ] && echo_r "input param invalid" && exit -1
|
||||
echo "=== Install Chaincode on org ${org}/peer ${peer} === "
|
||||
echo "name=${name}, version=${version}, path=${path}"
|
||||
setEnvs $org $peer
|
||||
echo "packaging chaincode"
|
||||
echo "packaging chaincode into tar.gz package"
|
||||
peer lifecycle chaincode package ${name}.tar.gz \
|
||||
--path ${path} \
|
||||
--lang golang \
|
||||
--label ${name}_${version}
|
||||
|
||||
echo "installing chaincode"
|
||||
peer lifecycle chaincode install ${name}.tar.gz >&log.txt
|
||||
|
||||
echo "querying installed chaincode"
|
||||
peer lifecycle chaincode queryinstalled >&query.log
|
||||
package_id=$(grep -o "${name}_${version}:[a-z0-9]*" query.log|cut -d ":" -f 2)
|
||||
echo "package id=${package_id}"
|
||||
echo "installing chaincode to peer${peer}/org${org}"
|
||||
peer lifecycle chaincode install \
|
||||
--peerAddresses ${peer_url} \
|
||||
--tlsRootCertFiles ${peer_tls_root_cert} \
|
||||
${name}.tar.gz >&log.txt
|
||||
|
||||
# v1.x action
|
||||
#peer chaincode install \
|
||||
|
@ -398,6 +403,156 @@ chaincodeInstall () {
|
|||
echo "=== Chaincode is installed on remote peer$peer === "
|
||||
}
|
||||
|
||||
# Approve the chaincode definition
|
||||
# chaincodeApprove channel org peer name version
|
||||
chaincodeApprove () {
|
||||
if [ "$#" -ne 7 -a "$#" -ne 9 ]; then
|
||||
echo_r "Wrong param number for chaincode approval"
|
||||
exit -1
|
||||
fi
|
||||
local org=$1
|
||||
local peer=$2
|
||||
local peer_url=$3
|
||||
local peer_tls_root_cert=$4
|
||||
local channel=$5
|
||||
local name=$6
|
||||
local version=$7
|
||||
local collection_config="" # collection config file path for sideDB
|
||||
local policy="OR ('Org1MSP.member','Org2MSP.member')" # endorsement policy
|
||||
|
||||
if [ ! -z "$8" ]; then
|
||||
collection_config=$8
|
||||
fi
|
||||
|
||||
if [ ! -z "$9" ]; then
|
||||
policy=$9
|
||||
fi
|
||||
|
||||
setEnvs $org $peer
|
||||
echo "querying installed chaincode and get its package id"
|
||||
peer lifecycle chaincode queryinstalled >&query.log
|
||||
cat query.log
|
||||
#package_id=$(grep -o "${name}_${version}:[a-z0-9]*" query.log|cut -d ":" -f 2)
|
||||
package_id=$(grep -o "${name}_${version}:[a-z0-9]*" query.log)
|
||||
echo "Approve package id=${package_id} by Org ${org}/Peer ${peer}"
|
||||
|
||||
# use the --init-required flag to request the ``Init`` function be invoked to initialize the chaincode
|
||||
if [ -z "$CORE_PEER_TLS_ENABLED" -o "$CORE_PEER_TLS_ENABLED" = "false" ]; then
|
||||
peer lifecycle chaincode approveformyorg \
|
||||
--peerAddresses ${peer_url} \
|
||||
--tlsRootCertFiles ${peer_tls_root_cert} \
|
||||
--channelID ${channel} \
|
||||
--name ${name} \
|
||||
--version ${version} \
|
||||
--init-required \
|
||||
--package-id ${package_id} \
|
||||
--sequence 1 \
|
||||
--signature-policy "${policy}" \
|
||||
--waitForEvent >&log.txt
|
||||
else
|
||||
peer lifecycle chaincode approveformyorg \
|
||||
--peerAddresses ${peer_url} \
|
||||
--tlsRootCertFiles ${peer_tls_root_cert} \
|
||||
--channelID ${channel} \
|
||||
--name ${name} \
|
||||
--version ${version} \
|
||||
--init-required \
|
||||
--package-id ${package_id} \
|
||||
--sequence 1 \
|
||||
--signature-policy "${policy}" \
|
||||
--waitForEvent \
|
||||
--tls true \
|
||||
--cafile ${ORDERER_TLS_CA} >&log.txt
|
||||
fi
|
||||
|
||||
peer lifecycle chaincode queryapprovalstatus \
|
||||
--peerAddresses ${peer_url} \
|
||||
--tlsRootCertFiles ${peer_tls_root_cert} \
|
||||
--channelID ${channel} \
|
||||
--name ${name} \
|
||||
--version ${version}
|
||||
rc=$?
|
||||
[ $rc -ne 0 ] && cat log.txt
|
||||
verifyResult $rc "Chaincode Approval on remote org ${org}/peer$peer has Failed"
|
||||
echo "=== Chaincode is approved on remote peer$peer === "
|
||||
}
|
||||
|
||||
# Anyone can commit the chaincode definition once it's approved by major
|
||||
# chaincodeCommit org peer channel orderer name version [collection-config] [endorse-policy]
|
||||
chaincodeCommit () {
|
||||
if [ "$#" -ne 6 -a "$#" -ne 8 ]; then
|
||||
echo_r "Wrong param number for chaincode approval"
|
||||
exit -1
|
||||
fi
|
||||
local org=$1
|
||||
local peer=$2
|
||||
local channel=$3
|
||||
local orderer=$4
|
||||
local name=$5
|
||||
local version=$6
|
||||
local collection_config="" # collection config file path for sideDB
|
||||
local policy="OR ('Org1MSP.member','Org2MSP.member')" # endorsement policy
|
||||
|
||||
if [ ! -z "$7" ]; then
|
||||
collection_config=$7
|
||||
fi
|
||||
|
||||
if [ ! -z "$8" ]; then
|
||||
policy=$8 # chaincode endorsement policy
|
||||
fi
|
||||
|
||||
setEnvs $org $peer
|
||||
echo "querying installed chaincode and get its package id"
|
||||
peer lifecycle chaincode queryinstalled >&query.log
|
||||
#package_id=$(grep -o "${name}_${version}:[a-z0-9]*" query.log|cut -d ":" -f 2)
|
||||
package_id=$(grep -o "${name}_${version}:[a-z0-9]*" query.log)
|
||||
echo "Committing package id=${package_id} by Org ${org}/Peer ${peer}"
|
||||
|
||||
# use the --init-required flag to request the ``Init`` function be invoked to initialize the chaincode
|
||||
if [ -z "$CORE_PEER_TLS_ENABLED" -o "$CORE_PEER_TLS_ENABLED" = "false" ]; then
|
||||
peer lifecycle chaincode commit \
|
||||
-o ${orderer} \
|
||||
--channelID ${channel} \
|
||||
--name ${name} \
|
||||
--version ${version} \
|
||||
--init-required \
|
||||
--sequence 1 \
|
||||
--peerAddresses ${ORG1_PEER0_URL} \
|
||||
--tlsRootCertFiles ${ORG1_PEER0_TLS_ROOTCERT} \
|
||||
--peerAddresses ${ORG2_PEER0_URL} \
|
||||
--tlsRootCertFiles ${ORG2_PEER0_TLS_ROOTCERT} \
|
||||
--waitForEvent \
|
||||
--collections-config "${collection_config}" \
|
||||
--signature-policy "${policy}"
|
||||
else
|
||||
peer lifecycle chaincode commit \
|
||||
-o ${orderer} \
|
||||
--channelID ${channel} \
|
||||
--name ${name} \
|
||||
--version ${version} \
|
||||
--init-required \
|
||||
--sequence 1 \
|
||||
--peerAddresses ${ORG1_PEER0_URL} \
|
||||
--tlsRootCertFiles ${ORG1_PEER0_TLS_ROOTCERT} \
|
||||
--peerAddresses ${ORG2_PEER0_URL} \
|
||||
--tlsRootCertFiles ${ORG2_PEER0_TLS_ROOTCERT} \
|
||||
--waitForEvent \
|
||||
--collections-config "${collection_config}" \
|
||||
--signature-policy "${policy}" \
|
||||
--tls true \
|
||||
--cafile ${ORDERER_TLS_CA}
|
||||
fi
|
||||
rc=$?
|
||||
[ $rc -ne 0 ] && cat log.txt
|
||||
verifyResult $rc "Chaincode Commit on remote org ${org}/peer$peer has Failed"
|
||||
echo "=== Chaincode is committed on channel $channel === "
|
||||
|
||||
peer lifecycle chaincode querycommitted \
|
||||
--channelID ${channel} \
|
||||
--name ${name}
|
||||
}
|
||||
|
||||
|
||||
# Instantiate chaincode on specifized peer node
|
||||
# chaincodeInstantiate channel org peer name version args
|
||||
chaincodeInstantiate () {
|
||||
|
@ -456,32 +611,42 @@ chaincodeInstantiate () {
|
|||
echo "=== Chaincode Instantiated in channel ${channel} by peer$peer ==="
|
||||
}
|
||||
|
||||
# Invoke the Init func of chaincode to start the container
|
||||
# Usage: chaincodeInit org peer channel orderer name args peer_url peer_org_tlsca
|
||||
chaincodeInit () {
|
||||
local org=$1
|
||||
local peer=$2
|
||||
local channel=$3
|
||||
local orderer=$4
|
||||
local name=$5
|
||||
local args=$6
|
||||
local peer_url=$7
|
||||
local peer_org_tlsca=$8
|
||||
|
||||
# Usage: chaincodeInvoke channel org peer name args
|
||||
chaincodeInvoke () {
|
||||
local channel=$1
|
||||
local org=$2
|
||||
local peer=$3
|
||||
local name=$4
|
||||
local args=$5
|
||||
[ -z $channel ] && [ -z $org ] && [ -z $peer ] && [ -z $name ] && [ -z $args ] && echo_r "input param invalid" && exit -1
|
||||
echo "=== chaincodeInvoke to orderer by id of org${org}/peer${peer} === "
|
||||
echo "=== chaincodeInit to orderer by id of org${org}/peer${peer} === "
|
||||
echo "channel=${channel}, name=${name}, args=${args}"
|
||||
setEnvs $org $peer
|
||||
# while 'peer chaincode' command can get the orderer endpoint from the peer (if join was successful),
|
||||
# lets supply it directly as we know it using the "-o" option
|
||||
if [ -z "$CORE_PEER_TLS_ENABLED" -o "$CORE_PEER_TLS_ENABLED" = "false" ]; then
|
||||
peer chaincode invoke \
|
||||
-o ${ORDERER_URL} \
|
||||
-C ${channel} \
|
||||
-n ${name} \
|
||||
-o ${orderer} \
|
||||
--channelID ${channel} \
|
||||
--name ${name} \
|
||||
--peerAddresses ${peer_url} \
|
||||
--tlsRootCertFiles ${peer_org_tlsca} \
|
||||
--isInit \
|
||||
-c ${args} \
|
||||
>&log.txt
|
||||
else
|
||||
peer chaincode invoke \
|
||||
-o ${ORDERER_URL} \
|
||||
-C ${channel} \
|
||||
-n ${name} \
|
||||
-o ${orderer} \
|
||||
--channelID ${channel} \
|
||||
--name ${name} \
|
||||
--peerAddresses ${peer_url} \
|
||||
--tlsRootCertFiles ${peer_org_tlsca} \
|
||||
--isInit \
|
||||
-c ${args} \
|
||||
--tls \
|
||||
--cafile ${ORDERER_TLS_CA} \
|
||||
|
@ -493,52 +658,96 @@ chaincodeInvoke () {
|
|||
echo "=== Invoke transaction on peer$peer in channel ${channel} is successful === "
|
||||
}
|
||||
|
||||
# query channel peer name args expected_result
|
||||
chaincodeQuery () {
|
||||
local channel=$1
|
||||
local org=$2
|
||||
local peer=$3
|
||||
local name=$4
|
||||
local args=$5
|
||||
[ -z $channel ] && [ -z $org ] && [ -z $peer ] && [ -z $name ] && [ -z $args ] && echo_r "input param invalid" && exit -1
|
||||
[ $# -gt 5 ] && local expected_result=$6
|
||||
echo "=== chaincodeQuery to org $org/peer $peer === "
|
||||
echo "channel=${channel}, name=${name}, args=${args}"
|
||||
local rc=1
|
||||
local starttime=$(date +%s)
|
||||
# Usage: chaincodeInvoke org peer channel orderer name args peer_url peer_org_tlsca
|
||||
chaincodeInvoke () {
|
||||
local org=$1
|
||||
local peer=$2
|
||||
local channel=$3
|
||||
local orderer=$4
|
||||
local name=$5
|
||||
local args=$6
|
||||
local peer_url=$7
|
||||
local peer_org_tlsca=$8
|
||||
|
||||
setEnvs $org $peer
|
||||
# we either get a successful response, or reach TIMEOUT
|
||||
while [ "$(($(date +%s)-starttime))" -lt "$TIMEOUT" -a $rc -ne 0 ]; do
|
||||
echo "Attempting to Query org ${org}/peer ${peer} ...$(($(date +%s)-starttime)) secs"
|
||||
peer chaincode query \
|
||||
[ -z $channel ] && [ -z $org ] && [ -z $peer ] && [ -z $name ] && [ -z $args ] && echo_r "input param invalid" && exit -1
|
||||
echo "=== chaincodeInvoke to orderer by id of org${org}/peer${peer} === "
|
||||
echo "channel=${channel}, name=${name}, args=${args}"
|
||||
setEnvs $org $peer
|
||||
# while 'peer chaincode' command can get the orderer endpoint from the peer (if join was successful),
|
||||
# lets supply it directly as we know it using the "-o" option
|
||||
if [ -z "$CORE_PEER_TLS_ENABLED" -o "$CORE_PEER_TLS_ENABLED" = "false" ]; then
|
||||
peer chaincode invoke \
|
||||
-o ${orderer} \
|
||||
--channelID ${channel} \
|
||||
--name ${name} \
|
||||
--peerAddresses ${peer_url} \
|
||||
--tlsRootCertFiles ${peer_org_tlsca} \
|
||||
-c ${args} \
|
||||
>&log.txt
|
||||
else
|
||||
peer chaincode invoke \
|
||||
-o ${orderer} \
|
||||
--channelID ${channel} \
|
||||
--name ${name} \
|
||||
--peerAddresses ${peer_url} \
|
||||
--tlsRootCertFiles ${peer_org_tlsca} \
|
||||
-c ${args} \
|
||||
--tls \
|
||||
--cafile ${ORDERER_TLS_CA} \
|
||||
>&log.txt
|
||||
fi
|
||||
rc=$?
|
||||
[ $rc -ne 0 ] && cat log.txt
|
||||
verifyResult $rc "Invoke execution on peer$peer failed "
|
||||
echo "=== Invoke transaction on peer$peer in channel ${channel} is successful === "
|
||||
}
|
||||
|
||||
# query org peer channel name args expected_result
|
||||
chaincodeQuery () {
|
||||
local org=$1
|
||||
local peer=$2
|
||||
local channel=$3
|
||||
local name=$4
|
||||
local args=$5
|
||||
[ -z $channel ] && [ -z $org ] && [ -z $peer ] && [ -z $name ] && [ -z $args ] && echo_r "input param invalid" && exit -1
|
||||
[ $# -gt 5 ] && local expected_result=$6
|
||||
echo "=== chaincodeQuery to org $org/peer $peer === "
|
||||
echo "channel=${channel}, name=${name}, args=${args}"
|
||||
local rc=1
|
||||
local starttime=$(date +%s)
|
||||
|
||||
setEnvs $org $peer
|
||||
# we either get a successful response, or reach TIMEOUT
|
||||
while [ "$(($(date +%s)-starttime))" -lt "$TIMEOUT" -a $rc -ne 0 ]; do
|
||||
echo "Attempting to Query org ${org}/peer ${peer} ...$(($(date +%s)-starttime)) secs"
|
||||
peer chaincode query \
|
||||
-C "${channel}" \
|
||||
-n "${name}" \
|
||||
-c "${args}" \
|
||||
>&log.txt
|
||||
rc=$?
|
||||
if [ $# -gt 5 ]; then # need to check the result
|
||||
test $? -eq 0 && VALUE=$(cat log.txt | awk 'END {print $NF}')
|
||||
if [ "$VALUE" = "${expected_result}" ]; then
|
||||
let rc=0
|
||||
else
|
||||
let rc=1
|
||||
echo_b "$VALUE != ${expected_result}, will retry"
|
||||
fi
|
||||
fi
|
||||
if [ $rc -ne 0 ]; then
|
||||
cat log.txt
|
||||
sleep 2
|
||||
fi
|
||||
done
|
||||
rc=$?
|
||||
if [ $# -gt 5 ]; then # need to check the result
|
||||
test $? -eq 0 && VALUE=$(cat log.txt | awk 'END {print $NF}')
|
||||
if [ "$VALUE" = "${expected_result}" ]; then
|
||||
let rc=0
|
||||
else
|
||||
let rc=1
|
||||
echo_b "$VALUE != ${expected_result}, will retry"
|
||||
fi
|
||||
fi
|
||||
if [ $rc -ne 0 ]; then
|
||||
cat log.txt
|
||||
sleep 2
|
||||
fi
|
||||
done
|
||||
|
||||
# rc==0, or timeout
|
||||
if [ $rc -eq 0 ]; then
|
||||
# rc==0, or timeout
|
||||
if [ $rc -eq 0 ]; then
|
||||
echo "=== Query on org $org/peer$peer in channel ${channel} is successful === "
|
||||
else
|
||||
else
|
||||
echo_r "=== Query on org $org/peer$peer is INVALID, run `make stop clean` to clean ==="
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# List Installed chaincode on specified peer node, and instantiated chaincodes at specific channel
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Importing useful functions for cc testing
|
||||
if [ -f ./func.sh ]; then
|
||||
source ./func.sh
|
||||
elif [ -f scripts/func.sh ]; then
|
||||
source scripts/func.sh
|
||||
fi
|
||||
|
||||
## Install chaincode on all peers
|
||||
CC_NAME=${CC_NAME:-$CC_02_NAME}
|
||||
CC_PATH=${CC_PATH:-$CC_02_PATH}
|
||||
|
||||
echo_b "=== Approve chaincode definition ${CC_NAME} on all organizations ... ==="
|
||||
|
||||
for org in "${ORGS[@]}"
|
||||
do
|
||||
t="\${ORG${org}_PEER0_URL}" && peer_url=`eval echo $t`
|
||||
t="\${ORG${org}_PEER0_TLS_ROOTCERT}" && peer_tls_rootcert=`eval echo $t`
|
||||
chaincodeApprove "$org" 0 ${peer_url} ${peer_tls_rootcert} "${APP_CHANNEL}" ${CC_NAME} ${CC_INIT_VERSION}
|
||||
done
|
||||
|
||||
echo_g "=== Approve chaincode done ==="
|
||||
|
||||
echo
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Importing useful functions for cc testing
|
||||
if [ -f ./func.sh ]; then
|
||||
source ./func.sh
|
||||
elif [ -f scripts/func.sh ]; then
|
||||
source scripts/func.sh
|
||||
fi
|
||||
|
||||
## Install chaincode on all peers
|
||||
CC_NAME=${CC_NAME:-$CC_02_NAME}
|
||||
|
||||
# Once a sufficient number of organizations (in this case, a majority) have
|
||||
# approved a chaincode definition, one organization commit the definition to the
|
||||
# channel.
|
||||
|
||||
echo_b "=== Commit chaincode definition ${CC_NAME} to channel ${APP_CHANNEL} ... ==="
|
||||
|
||||
chaincodeCommit "${ORGS[0]}" "${PEERS[0]}" "${APP_CHANNEL}" "${ORDERER_URL}" ${CC_NAME} ${CC_INIT_VERSION}
|
||||
|
||||
echo_g "=== Commit Chaincode done, now you can invoke chaincode to start the container ==="
|
||||
|
||||
echo
|
|
@ -17,7 +17,9 @@ for org in "${ORGS[@]}"
|
|||
do
|
||||
for peer in "${PEERS[@]}"
|
||||
do
|
||||
chaincodeInstall $org $peer ${CC_NAME} ${CC_INIT_VERSION} ${CC_PATH}
|
||||
t="\${ORG${org}_PEER${peer}_URL}" && peer_url=`eval echo $t`
|
||||
t="\${ORG${org}_PEER${peer}_TLS_ROOTCERT}" && peer_tls_rootcert=`eval echo $t`
|
||||
chaincodeInstall $org $peer "${peer_url}" "${peer_tls_rootcert}" ${CC_NAME} ${CC_INIT_VERSION} ${CC_PATH}
|
||||
done
|
||||
done
|
||||
|
||||
|
|
|
@ -14,24 +14,28 @@ CC_QUERY_ARGS=${CC_QUERY_ARGS:-$CC_02_QUERY_ARGS}
|
|||
#Query on chaincode on Peer0/Org1
|
||||
echo_b "=== Testing Chaincode invoke/query ==="
|
||||
|
||||
#Invoke on chaincode on Peer0/Org1
|
||||
echo_b "Init chaincode by org1/peer0..."
|
||||
chaincodeInit 1 0 ${APP_CHANNEL} "${ORDERER_URL}" ${CC_NAME} ${CC_INIT_ARGS} "${ORG1_PEER0_URL}" "${ORG1_PEER0_TLS_ROOTCERT}"
|
||||
|
||||
# Non-side-DB testing
|
||||
echo_b "Query chaincode ${CC_NAME} on peer org2/peer0..."
|
||||
chaincodeQuery ${APP_CHANNEL} 2 1 ${CC_NAME} ${CC_QUERY_ARGS} 100
|
||||
echo_b "Query chaincode ${CC_NAME} on peer org1/peer0..."
|
||||
chaincodeQuery 1 0 ${APP_CHANNEL} ${CC_NAME} ${CC_QUERY_ARGS} 100
|
||||
|
||||
#Invoke on chaincode on Peer0/Org1
|
||||
echo_b "Invoke transaction (transfer 10) by org1/peer0..."
|
||||
chaincodeInvoke ${APP_CHANNEL} 1 0 ${CC_NAME} ${CC_INVOKE_ARGS}
|
||||
chaincodeInvoke 1 0 ${APP_CHANNEL} "${ORDERER_URL}" ${CC_NAME} ${CC_INVOKE_ARGS} "${ORG1_PEER0_URL}" "${ORG1_PEER0_TLS_ROOTCERT}"
|
||||
|
||||
#Query on chaincode on Peer1/Org2, check if the result is 90
|
||||
echo_b "Query chaincode on org2/peer1..."
|
||||
chaincodeQuery ${APP_CHANNEL} 2 1 ${CC_NAME} ${CC_QUERY_ARGS} 90
|
||||
chaincodeQuery 2 1 ${APP_CHANNEL} ${CC_NAME} ${CC_QUERY_ARGS} 90
|
||||
|
||||
#Invoke on chaincode on Peer1/Org2
|
||||
echo_b "Send invoke transaction on org2/peer1..."
|
||||
chaincodeInvoke ${APP_CHANNEL} 2 1 ${CC_NAME} ${CC_INVOKE_ARGS}
|
||||
chaincodeInvoke 2 1 ${APP_CHANNEL} "${ORDERER_URL}" ${CC_NAME} ${CC_INVOKE_ARGS} "${ORG2_PEER1_URL}" "${ORG2_PEER1_TLS_ROOTCERT}"
|
||||
|
||||
#Query on chaincode on Peer1/Org2, check if the result is 80
|
||||
echo_b "Query chaincode on org1/peer0 4peers..."
|
||||
chaincodeQuery ${APP_CHANNEL} 1 0 ${CC_NAME} ${CC_QUERY_ARGS} 80
|
||||
chaincodeQuery 1 0 ${APP_CHANNEL} ${CC_NAME} ${CC_QUERY_ARGS} 80
|
||||
|
||||
echo_g "=== Chaincode invoke/query done ==="
|
||||
|
|
|
@ -51,6 +51,9 @@ ORG2_PEER1_TLS_ROOTCERT=/etc/hyperledger/fabric/crypto-config/peerOrganizations/
|
|||
|
||||
# Node URLS
|
||||
ORDERER_URL="orderer0.example.com:7050"
|
||||
ORDERER0_URL="orderer0.example.com:7050"
|
||||
ORDERER1_URL="orderer1.example.com:7050"
|
||||
ORDERER2_URL="orderer2.example.com:7050"
|
||||
ORG1_PEER0_URL="peer0.org1.example.com:7051"
|
||||
ORG1_PEER1_URL="peer1.org1.example.com:7051"
|
||||
ORG2_PEER0_URL="peer0.org2.example.com:7051"
|
||||
|
|
|
@ -0,0 +1,164 @@
|
|||
{
|
||||
"groups": {},
|
||||
"mod_policy": "Admins",
|
||||
"policies": {
|
||||
"Admins": {
|
||||
"mod_policy": "Admins",
|
||||
"policy": {
|
||||
"type": 1,
|
||||
"value": {
|
||||
"identities": [
|
||||
{
|
||||
"principal": {
|
||||
"msp_identifier": "Org1MSP",
|
||||
"role": "ADMIN"
|
||||
},
|
||||
"principal_classification": "ROLE"
|
||||
}
|
||||
],
|
||||
"rule": {
|
||||
"n_out_of": {
|
||||
"n": 1,
|
||||
"rules": [
|
||||
{
|
||||
"signed_by": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"version": 0
|
||||
}
|
||||
},
|
||||
"version": "0"
|
||||
},
|
||||
"Endorsement": {
|
||||
"mod_policy": "Admins",
|
||||
"policy": {
|
||||
"type": 1,
|
||||
"value": {
|
||||
"identities": [
|
||||
{
|
||||
"principal": {
|
||||
"msp_identifier": "Org1MSP",
|
||||
"role": "MEMBER"
|
||||
},
|
||||
"principal_classification": "ROLE"
|
||||
}
|
||||
],
|
||||
"rule": {
|
||||
"n_out_of": {
|
||||
"n": 1,
|
||||
"rules": [
|
||||
{
|
||||
"signed_by": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"version": 0
|
||||
}
|
||||
},
|
||||
"version": "0"
|
||||
},
|
||||
"Readers": {
|
||||
"mod_policy": "Admins",
|
||||
"policy": {
|
||||
"type": 1,
|
||||
"value": {
|
||||
"identities": [
|
||||
{
|
||||
"principal": {
|
||||
"msp_identifier": "Org1MSP",
|
||||
"role": "MEMBER"
|
||||
},
|
||||
"principal_classification": "ROLE"
|
||||
}
|
||||
],
|
||||
"rule": {
|
||||
"n_out_of": {
|
||||
"n": 1,
|
||||
"rules": [
|
||||
{
|
||||
"signed_by": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"version": 0
|
||||
}
|
||||
},
|
||||
"version": "0"
|
||||
},
|
||||
"Writers": {
|
||||
"mod_policy": "Admins",
|
||||
"policy": {
|
||||
"type": 1,
|
||||
"value": {
|
||||
"identities": [
|
||||
{
|
||||
"principal": {
|
||||
"msp_identifier": "Org1MSP",
|
||||
"role": "MEMBER"
|
||||
},
|
||||
"principal_classification": "ROLE"
|
||||
}
|
||||
],
|
||||
"rule": {
|
||||
"n_out_of": {
|
||||
"n": 1,
|
||||
"rules": [
|
||||
{
|
||||
"signed_by": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"version": 0
|
||||
}
|
||||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eXc3QmVqaS9YeFdlUzVucFdub0NVMG03Y1k1QWlCRgoxajg5OWgvc0ttSUVWMnY0eFQ4Uno2Y00vYzU1L0hSTERncnBqaE50Vmc9PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg=="
|
||||
],
|
||||
"crypto_config": {
|
||||
"identity_identifier_hash_function": "SHA256",
|
||||
"signature_hash_family": "SHA2"
|
||||
},
|
||||
"fabric_node_ous": {
|
||||
"client_ou_identifier": {
|
||||
"certificate": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNVVENDQWZpZ0F3SUJBZ0lSQUt2R0EzTkkwQU1GUDVxRnZYOUNYbVV3Q2dZSUtvWkl6ajBFQXdJd2N6RUwKTUFrR0ExVUVCaE1DVlZNeEV6QVJCZ05WQkFnVENrTmhiR2xtYjNKdWFXRXhGakFVQmdOVkJBY1REVk5oYmlCRwpjbUZ1WTJselkyOHhHVEFYQmdOVkJBb1RFRzl5WnpFdVpYaGhiWEJzWlM1amIyMHhIREFhQmdOVkJBTVRFMk5oCkxtOXlaekV1WlhoaGJYQnNaUzVqYjIwd0hoY05NVGt3TkRBeE1EZ3hOREF3V2hjTk1qa3dNekk1TURneE5EQXcKV2pCek1Rc3dDUVlEVlFRR0V3SlZVekVUTUJFR0ExVUVDQk1LUTJGc2FXWnZjbTVwWVRFV01CUUdBMVVFQnhNTgpVMkZ1SUVaeVlXNWphWE5qYnpFWk1CY0dBMVVFQ2hNUWIzSm5NUzVsZUdGdGNHeGxMbU52YlRFY01Cb0dBMVVFCkF4TVRZMkV1YjNKbk1TNWxlR0Z0Y0d4bExtTnZiVEJaTUJNR0J5cUdTTTQ5QWdFR0NDcUdTTTQ5QXdFSEEwSUEKQkIvK2pNT3B2N1pRSS81WFJ1RktFUzRHdXJnMDVRZTRQNWF6dWJMZXZOUG1xVHJUME9hemJDSWI3WnlKSGcvWQphWlZMWFIxVFdMR1hoSUdUMktjYnNWeWpiVEJyTUE0R0ExVWREd0VC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JNR0J5cUdTTTQ5QWdFR0NDcUdTTTQ5QXdFSEEwSUEKQkIvK2pNT3B2N1pRSS81WFJ1RktFUzRHdXJnMDVRZTRQNWF6dWJMZXZOUG1xVHJUME9hemJDSWI3WnlKSGcvWQphWlZMWFIxVFdMR1hoSUdUMktjYnNWeWpiVEJyTUE0R0ExVWREd0VCL3dRRUF3SUJwakFkQmdOVkhTVUVGakFVCkJnZ3JCZ0VGQlFjREFnWUlLd1lCQlFVSEF3RXdEd1lEVlIwVEFRSC9CQVV3QXdFQi96QXBCZ05WSFE0RUlnUWcKYTd0TFBEWldzeENydk9vZWtsQ3pHUGdsL2FyN2FRNU55eUIvNWN0QytOZ3dDZ1lJS29aSXpqMEVBd0lEUndBdwpSQUlnYnZTMmppTjlCMXJTSEJ1MXNuZURNdGg5NnNKaE5ZMk5COGtwZ2xEWnpCb0NJRnRuYnArNVRYb3FGYmwyCk4wcXpidTA4NXFRWGZBWGY3eXk0Vm9TSHIxQTYKLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=",
|
||||
"organizational_unit_identifier": "peer"
|
||||
}
|
||||
},
|
||||
"intermediate_certs": [],
|
||||
"name": "Org1MSP",
|
||||
"organizational_unit_identifiers": [],
|
||||
"revocation_list": [],
|
||||
"root_certs": [
|
||||
"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNVVENDQWZpZ0F3SUJBZ0lSQUt2R0EzTkkwQU1GUDVxRnZYOUNYbVV3Q2dZSUtvWkl6ajBFQXdJd2N6RUwKTUFrR0ExVUVCaE1DVlZNeEV6QVJCZ05WQkFnVENrTmhiR2xtYjNKdWFXRXhGakFVQmdOVkJBY1REVk5oYmlCRwpjbUZ1WTJselkyOHhHVEFYQmdOVkJBb1RFRzl5WnpFdVpYaGhiWEJzWlM1amIyMHhIREFhQmdOVkJBTVRFMk5oCkxtOXlaekV1WlhoaGJYQnNaUzVqYjIwd0hoY05NVGt3TkRBeE1EZ3hOREF3V2hjTk1q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file not shown.
|
@ -0,0 +1,164 @@
|
|||
{
|
||||
"groups": {},
|
||||
"mod_policy": "Admins",
|
||||
"policies": {
|
||||
"Admins": {
|
||||
"mod_policy": "Admins",
|
||||
"policy": {
|
||||
"type": 1,
|
||||
"value": {
|
||||
"identities": [
|
||||
{
|
||||
"principal": {
|
||||
"msp_identifier": "Org2MSP",
|
||||
"role": "ADMIN"
|
||||
},
|
||||
"principal_classification": "ROLE"
|
||||
}
|
||||
],
|
||||
"rule": {
|
||||
"n_out_of": {
|
||||
"n": 1,
|
||||
"rules": [
|
||||
{
|
||||
"signed_by": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"version": 0
|
||||
}
|
||||
},
|
||||
"version": "0"
|
||||
},
|
||||
"Endorsement": {
|
||||
"mod_policy": "Admins",
|
||||
"policy": {
|
||||
"type": 1,
|
||||
"value": {
|
||||
"identities": [
|
||||
{
|
||||
"principal": {
|
||||
"msp_identifier": "Org2MSP",
|
||||
"role": "MEMBER"
|
||||
},
|
||||
"principal_classification": "ROLE"
|
||||
}
|
||||
],
|
||||
"rule": {
|
||||
"n_out_of": {
|
||||
"n": 1,
|
||||
"rules": [
|
||||
{
|
||||
"signed_by": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"version": 0
|
||||
}
|
||||
},
|
||||
"version": "0"
|
||||
},
|
||||
"Readers": {
|
||||
"mod_policy": "Admins",
|
||||
"policy": {
|
||||
"type": 1,
|
||||
"value": {
|
||||
"identities": [
|
||||
{
|
||||
"principal": {
|
||||
"msp_identifier": "Org2MSP",
|
||||
"role": "MEMBER"
|
||||
},
|
||||
"principal_classification": "ROLE"
|
||||
}
|
||||
],
|
||||
"rule": {
|
||||
"n_out_of": {
|
||||
"n": 1,
|
||||
"rules": [
|
||||
{
|
||||
"signed_by": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"version": 0
|
||||
}
|
||||
},
|
||||
"version": "0"
|
||||
},
|
||||
"Writers": {
|
||||
"mod_policy": "Admins",
|
||||
"policy": {
|
||||
"type": 1,
|
||||
"value": {
|
||||
"identities": [
|
||||
{
|
||||
"principal": {
|
||||
"msp_identifier": "Org2MSP",
|
||||
"role": "MEMBER"
|
||||
},
|
||||
"principal_classification": "ROLE"
|
||||
}
|
||||
],
|
||||
"rule": {
|
||||
"n_out_of": {
|
||||
"n": 1,
|
||||
"rules": [
|
||||
{
|
||||
"signed_by": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"version": 0
|
||||
}
|
||||
},
|
||||
"version": "0"
|
||||
}
|
||||
},
|
||||
"values": {
|
||||
"MSP": {
|
||||
"mod_policy": "Admins",
|
||||
"value": {
|
||||
"config": {
|
||||
"admins": [
|
||||
"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNLekNDQWRHZ0F3SUJBZ0lSQU5FdnZQQ1dnQjMyZHVZcjd6VHY5eUV3Q2dZSUtvWkl6ajBFQXdJd2N6RUwKTUFrR0ExVUVCaE1DVlZNeEV6QVJCZ05WQkFnVENrTmhiR2xtYjNKdWFXRXhGakFVQmdOVkJBY1REVk5oYmlCRwpjbUZ1WTJselkyOHhHVEFYQmdOVkJBb1RFRzl5WnpJdVpYaGhiWEJzWlM1amIyMHhIREFhQmdOVkJBTVRFMk5oCkxtOXlaekl1WlhoaGJYQnNaUzVqYjIwd0hoY05NVGt3TkRBeE1EZ3hOREF3V2hjTk1qa3dNekk1TURneE5EQXcKV2pCc01Rc3dDUVlEVlFRR0V3SlZVekVUTUJFR0ExVUVDQk1LUTJGc2FXWnZjbTVwWVRFV01CUUdBMVVFQnhNTgpVMkZ1SUVaeVlXNWphWE5qYnpFUE1BMEdBMVVFQ3hNR1kyeHBaVzUwTVI4d0hRWURWUVFEREJaQlpHMXBia0J2CmNtY3lMbVY0WVcxd2JHVXVZMjl0TUZrd0V3WUhLb1pJemowQ0FRWUlLb1pJemowREFRY0RRZ0FFaUZySkJ2UmIKcjY5Z0pOb01lak1yc1Nza1VvNUJzdTd1YnFWbGx0VGg1VUg4K08wczhFMVU5N25lY3h2S2l1a2FUa2Z3TVpEawpSSkdoVTFNOVU4UjBucU5OTUVzd0RnWURWUjBQQVFIL0JBUURBZ2VBTUF3R0ExVWRFd0VCL3dRQ01BQXdLd1lEClZSMGpCQ1F3SW9BZ2ZCbktjRmFERS9uYkxLRmlkbGZZZ0NOTWVZeFN6NEgvSDREWWltYXE0ZUF3Q2dZSUtvWkkKemowRUF3SURTQUF3UlFJaEFJckRaOVltdEM1UXhGSGVjUFU0TmFKcmxvWENOdk5DN04yM0UrNmlHTjRJQWlCdwpUTjhOZ3lDU0o1dVFJR3Q3RDltUDhUbVpwV0hmWk9Xa0VMUnBiMWRnaGc9PQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg=="
|
||||
],
|
||||
"crypto_config": {
|
||||
"identity_identifier_hash_function": "SHA256",
|
||||
"signature_hash_family": "SHA2"
|
||||
},
|
||||
"fabric_node_ous": {
|
||||
"client_ou_identifier": {
|
||||
"certificate": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNVakNDQWZpZ0F3SUJBZ0lSQU5TOHpVVEVqdG5oaW1CVElabEdyODR3Q2dZSUtvWkl6ajBFQXdJd2N6RUwKTUFrR0ExVUVCaE1DVlZNeEV6QVJCZ05WQkFnVENrTmhiR2xtYjNKdWFXRXhGakFVQmdOVkJBY1REVk5oYmlCRwpjbUZ1WTJselkyOHhHVEFYQmdOVkJBb1RFRzl5WnpJdVpYaGhiWEJzWlM1amIyMHhIREFhQmdOVkJBTVRFMk5oCkxtOXlaekl1WlhoaGJYQnNaUzVqYjIwd0hoY05NVGt3TkRBeE1EZ3hOREF3V2hjTk1qa3dNekk1TURneE5EQXcKV2pCek1Rc3dDUVlEVlFRR0V3SlZVekVUTUJFR0ExVUVDQk1LUTJGc2FXWnZjbTVwWVRFV01CUUdBMVVFQnhNTgpVMkZ1SUVaeVlXNWphWE5qYnpFWk1CY0dB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Iwd0hoY05NVGt3TkRBeE1EZ3hOREF3V2hjTk1qa3dNekk1TURneE5EQXcKV2pCek1Rc3dDUVlEVlFRR0V3SlZVekVUTUJFR0ExVUVDQk1LUTJGc2FXWnZjbTVwWVRFV01CUUdBMVVFQnhNTgpVMkZ1SUVaeVlXNWphWE5qYnpFWk1CY0dBMVVFQ2hNUWIzSm5NaTVsZUdGdGNHeGxMbU52YlRFY01Cb0dBMVVFCkF4TVRZMkV1YjNKbk1pNWxlR0Z0Y0d4bExtTnZiVEJaTUJNR0J5cUdTTTQ5QWdFR0NDcUdTTTQ5QXdFSEEwSUEKQkIycytxNnlOeGVwU21QMSsyMnVvc1hHMERaVlJVZHlOTjlFcWJJMzN6SkNJMGpCeEdpQXZUYjBlMURNQjU0TwpBMUNrQS9DQTNELzNLandlUTZzZ3dLR2piVEJyTUE0R0ExVWREd0VCL3dRRUF3SUJwakFkQmdOVkhTVUVGakFVCkJnZ3JCZ0VGQlFjREFnWUlLd1lCQlFVSEF3RXdEd1lEVlIwVEFRSC9CQVV3QXdFQi96QXBCZ05WSFE0RUlnUWcKZkJuS2NGYURFL25iTEtGaWRsZllnQ05NZVl4U3o0SC9INERZaW1hcTRlQXdDZ1lJS29aSXpqMEVBd0lEU0FBdwpSUUloQVBNbzFCRm1QZFhIdXROQ2ZXVElDN2twKzFMYlhSMmtFV2c5OGMzRXJPOUxBaUJPTkdBUzBkdGNyYXZ2CkpMK3VSbzFUUS84Rk50OTVaYkY3VE9ISmVYcUg3dz09Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K",
|
||||
"organizational_unit_identifier": "peer"
|
||||
}
|
||||
},
|
||||
"intermediate_certs": [],
|
||||
"name": "Org2MSP",
|
||||
"organizational_unit_identifiers": [],
|
||||
"revocation_list": [],
|
||||
"root_certs": [
|
||||
"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNVakNDQWZpZ0F3SUJBZ0lSQU5TOHpVVEVqdG5oaW1CVElabEd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0NnWUlLb1pJemowRQpBd0lEUndBd1JBSWdBdHhZV1VTbTUrR0pGbzJITXZubnFWUTlFeXUrTUpiYTAzQlFTVldCQ1JFQ0lIN0JaVVZCCnVTa3ZlVVByMFo0Q0NQV0FqcktkeHNqbjZzcEJBamtjREFTcQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg=="
|
||||
]
|
||||
},
|
||||
"type": 0
|
||||
},
|
||||
"version": "0"
|
||||
}
|
||||
},
|
||||
"version": "0"
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,194 @@
|
|||
{
|
||||
"groups": {},
|
||||
"mod_policy": "Admins",
|
||||
"policies": {
|
||||
"Admins": {
|
||||
"mod_policy": "Admins",
|
||||
"policy": {
|
||||
"type": 1,
|
||||
"value": {
|
||||
"identities": [
|
||||
{
|
||||
"principal": {
|
||||
"msp_identifier": "Org3MSP",
|
||||
"role": "ADMIN"
|
||||
},
|
||||
"principal_classification": "ROLE"
|
||||
}
|
||||
],
|
||||
"rule": {
|
||||
"n_out_of": {
|
||||
"n": 1,
|
||||
"rules": [
|
||||
{
|
||||
"signed_by": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"version": 0
|
||||
}
|
||||
},
|
||||
"version": "0"
|
||||
},
|
||||
"Endorsement": {
|
||||
"mod_policy": "Admins",
|
||||
"policy": {
|
||||
"type": 1,
|
||||
"value": {
|
||||
"identities": [
|
||||
{
|
||||
"principal": {
|
||||
"msp_identifier": "Org3MSP",
|
||||
"role": "MEMBER"
|
||||
},
|
||||
"principal_classification": "ROLE"
|
||||
}
|
||||
],
|
||||
"rule": {
|
||||
"n_out_of": {
|
||||
"n": 1,
|
||||
"rules": [
|
||||
{
|
||||
"signed_by": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"version": 0
|
||||
}
|
||||
},
|
||||
"version": "0"
|
||||
},
|
||||
"Readers": {
|
||||
"mod_policy": "Admins",
|
||||
"policy": {
|
||||
"type": 1,
|
||||
"value": {
|
||||
"identities": [
|
||||
{
|
||||
"principal": {
|
||||
"msp_identifier": "Org3MSP",
|
||||
"role": "ADMIN"
|
||||
},
|
||||
"principal_classification": "ROLE"
|
||||
},
|
||||
{
|
||||
"principal": {
|
||||
"msp_identifier": "Org3MSP",
|
||||
"role": "PEER"
|
||||
},
|
||||
"principal_classification": "ROLE"
|
||||
},
|
||||
{
|
||||
"principal": {
|
||||
"msp_identifier": "Org3MSP",
|
||||
"role": "CLIENT"
|
||||
},
|
||||
"principal_classification": "ROLE"
|
||||
}
|
||||
],
|
||||
"rule": {
|
||||
"n_out_of": {
|
||||
"n": 1,
|
||||
"rules": [
|
||||
{
|
||||
"signed_by": 0
|
||||
},
|
||||
{
|
||||
"signed_by": 1
|
||||
},
|
||||
{
|
||||
"signed_by": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"version": 0
|
||||
}
|
||||
},
|
||||
"version": "0"
|
||||
},
|
||||
"Writers": {
|
||||
"mod_policy": "Admins",
|
||||
"policy": {
|
||||
"type": 1,
|
||||
"value": {
|
||||
"identities": [
|
||||
{
|
||||
"principal": {
|
||||
"msp_identifier": "Org3MSP",
|
||||
"role": "ADMIN"
|
||||
},
|
||||
"principal_classification": "ROLE"
|
||||
},
|
||||
{
|
||||
"principal": {
|
||||
"msp_identifier": "Org3MSP",
|
||||
"role": "CLIENT"
|
||||
},
|
||||
"principal_classification": "ROLE"
|
||||
}
|
||||
],
|
||||
"rule": {
|
||||
"n_out_of": {
|
||||
"n": 1,
|
||||
"rules": [
|
||||
{
|
||||
"signed_by": 0
|
||||
},
|
||||
{
|
||||
"signed_by": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"version": 0
|
||||
}
|
||||
},
|
||||
"version": "0"
|
||||
}
|
||||
},
|
||||
"values": {
|
||||
"MSP": {
|
||||
"mod_policy": "Admins",
|
||||
"value": {
|
||||
"config": {
|
||||
"admins": [
|
||||
"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0t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|
||||
"crypto_config": {
|
||||
"identity_identifier_hash_function": "SHA256",
|
||||
"signature_hash_family": "SHA2"
|
||||
},
|
||||
"fabric_node_ous": {
|
||||
"client_ou_identifier": {
|
||||
"certificate": "LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNVakNDQWZpZ0F3SUJBZ0lSQUl6RVVZZlZoWDRwd2NvU0t4RzByYjh3Q2dZSUtvWkl6ajBFQXdJd2N6RUwKTUFrR0ExVUVCaE1DVlZNeEV6QVJCZ05WQkFnVENrTmhiR2xtYjNKdWFXRXhGakFVQmdOVkJBY1REVk5oYmlCRwpjbUZ1WTJselkyOHhHVEFYQmdOVkJBb1RFRzl5WnpNdVpYaGhiWEJzWlM1amIyMHhIREFhQmdOVkJBTVRFMk5oCkxtOXlaek11WlhoaGJYQnNaUzVqYjIwd0hoY05NVGt3TkRBeE1EZ3hOREF3V2hjTk1qa3dNekk1TURneE5EQXcKV2pCek1Rc3dDUVlEVlFRR0V3SlZVekVUTUJFR0ExVUVDQk1LUTJGc2FXWnZjbTVwWVRFV01CUUdBMVVFQnhNTgpVMkZ1SUVaeVlXNWphWE5qYnpFWk1CY0dBMVVFQ2hNUWIzSm5NeTVsZUdGdGNHeGxMbU52YlRFY01Cb0dBMVVFCkF4TVRZMkV1YjNKbk15NWxlR0Z0Y0d4bExtTnZiVEJaTUJNR0J5cUdTTTQ5QWdFR0NDcUdTTTQ5QXdFSEEwSUEKQkE4UGd1Uk9KY1M5b29RNDRYdnVERkdrZmprZFBHaXRZaTh6QWtqaGxQSTRoNk0vV1M5cEYzZVd3V3ZvWExTQgo2R2dUelBTR2JPbDl4azl6RUwzbjBpMmpiVEJyTUE0R0ExVWREd0VCL3dRRUF3SUJwakFkQmdOVkhTVUVGakFVCkJnZ3JCZ0VGQlFjREFnWUlLd1lCQlFVSEF3RXdEd1lEVlIwVEFRSC9CQVV3QXdFQi96QXBCZ05WSFE0RUlnUWcKcnpTREZGanB4RzRYVmV3V0JZR2pw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l6RUwzbjBpMmpiVEJyTUE0R0ExVWREd0VCL3dRRUF3SUJwakFkQmdOVkhTVUVGakFVCkJnZ3JCZ0VGQlFjREFnWUlLd1lCQlFVSEF3RXdEd1lEVlIwVEFRSC9CQVV3QXdFQi96QXBCZ05WSFE0RUlnUWcKcnpTREZGanB4RzRYVmV3V0JZR2pwMld5dVBmeGtrL2p3T3RvT0Nqbkk4Y3dDZ1lJS29aSXpqMEVBd0lEU0FBdwpSUUloQUtReUx3eG50dlRBYW9iVTdjQ2VoR2R5c0tabzE1WEJSUG1UcElGYnZ6QjFBaUJkR3I4YzMvOFQrZHBjCkNCOFVLdCtHc0gzLzdBRHJObzdvZk9nN0J6TW9udz09Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0K",
|
||||
"organizational_unit_identifier": "peer"
|
||||
}
|
||||
},
|
||||
"intermediate_certs": [],
|
||||
"name": "Org3MSP",
|
||||
"organizational_unit_identifiers": [],
|
||||
"revocation_list": [],
|
||||
"root_certs": [
|
||||
"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUNVakNDQWZpZ0F3SUJBZ0lSQUl6RVVZZlZoWDRwd2NvU0t4RzByYjh3Q2dZSUtvWkl6ajBFQXdJd2N6RUwKTUFrR0ExVUVCaE1DVlZNeEV6QVJCZ05WQkFnVENrTmhiR2xtYjNKdWFXRXhGakFVQmdOVkJBY1REVk5oYmlCRwpjbUZ1WTJselkyOHhHVEFYQmdOVkJBb1RFRzl5WnpNdVpYaGhiWEJzWlM1amIyMHhIREFhQmdOVkJBTVRFMk5oCkxtOXlaek11WlhoaGJYQnNaUzVqYjIwd0hoY05NVGt3TkRBeE1EZ3hOREF3V2hjTk1qa3dNekk1TURneE5EQXcKV2pCek1Rc3dDUVlEVlFRR0V3SlZVekVUTUJFR0ExVUVDQk1LUTJGc2FXWnZjbTVwWVRFV01CUUdBMVVFQnhNTgpVMkZ1SUVaeVlXNWphWE5qYnpFWk1CY0dBMVVFQ2hNUW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zB4T1RBME1ERXdPREUwTURCYUZ3MHlPVEF6TWprd09ERTAKTURCYU1IWXhDekFKQmdOVkJBWVRBbFZUTVJNd0VRWURWUVFJRXdwRFlXeHBabTl5Ym1saE1SWXdGQVlEVlFRSApFdzFUWVc0Z1JuSmhibU5wYzJOdk1Sa3dGd1lEVlFRS0V4QnZjbWN6TG1WNFlXMXdiR1V1WTI5dE1SOHdIUVlEClZRUURFeFowYkhOallTNXZjbWN6TG1WNFlXMXdiR1V1WTI5dE1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMEQKQVFjRFFnQUV2bXBSMUlNTEUzZmsvUWlOOWM0ZVMweGxmLzEwV1dtZWhibWhjL3pLZTg0LzZWUHF3aTA2K3AvdworNW1UL1gvYnFNcmo0SEZ2RjllbmlsREhhQm5LZ2FOdE1Hc3dEZ1lEVlIwUEFRSC9CQVFEQWdHbU1CMEdBMVVkCkpRUVdNQlFHQ0NzR0FRVUZCd01DQmdnckJnRUZCUWNEQVRBUEJnTlZIUk1CQWY4RUJUQURBUUgvTUNrR0ExVWQKRGdRaUJDREhMMjBpeW96SitWKzRmUGZQdEJaa2VJeFdycVMrdmNJc1kwTGJMbGFFUmpBS0JnZ3Foa2pPUFFRRApBZ05IQURCRUFpQTZ6bm9wdzY3dEFBOFh0STBNYjFXd0lXSnhoZ1duMVdJMVppbWdCVWw1U2dJZ1ZISmpibFdmClNVZWxZZmRuNDhYN0JySlQ4VGJaR0QzR3I0bmdlc212M1RFPQotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg=="
|
||||
]
|
||||
},
|
||||
"type": 0
|
||||
},
|
||||
"version": "0"
|
||||
}
|
||||
},
|
||||
"version": "0"
|
||||
}
|
Binary file not shown.
|
@ -0,0 +1,230 @@
|
|||
{
|
||||
"payload": {
|
||||
"data": {
|
||||
"config_update": {
|
||||
"channel_id": "businesschannel",
|
||||
"isolated_data": {},
|
||||
"read_set": {
|
||||
"groups": {
|
||||
"Application": {
|
||||
"groups": {
|
||||
"Org1MSP": {
|
||||
"groups": {},
|
||||
"mod_policy": "",
|
||||
"policies": {},
|
||||
"values": {},
|
||||
"version": "0"
|
||||
},
|
||||
"Org2MSP": {
|
||||
"groups": {},
|
||||
"mod_policy": "",
|
||||
"policies": {},
|
||||
"values": {},
|
||||
"version": "0"
|
||||
}
|
||||
},
|
||||
"mod_policy": "",
|
||||
"policies": {},
|
||||
"values": {},
|
||||
"version": "0"
|
||||
}
|
||||
},
|
||||
"mod_policy": "",
|
||||
"policies": {},
|
||||
"values": {
|
||||
"Consortium": {
|
||||
"mod_policy": "",
|
||||
"value": null,
|
||||
"version": "0"
|
||||
}
|
||||
},
|
||||
"version": "0"
|
||||
},
|
||||
"write_set": {
|
||||
"groups": {
|
||||
"Application": {
|
||||
"groups": {
|
||||
"Org1MSP": {
|
||||
"groups": {},
|
||||
"mod_policy": "",
|
||||
"policies": {},
|
||||
"values": {},
|
||||
"version": "0"
|
||||
},
|
||||
"Org2MSP": {
|
||||
"groups": {},
|
||||
"mod_policy": "",
|
||||
"policies": {},
|
||||
"values": {},
|
||||
"version": "0"
|
||||
}
|
||||
},
|
||||
"mod_policy": "Admins",
|
||||
"policies": {
|
||||
"Admins": {
|
||||
"mod_policy": "Admins",
|
||||
"policy": {
|
||||
"type": 3,
|
||||
"value": {
|
||||
"rule": "MAJORITY",
|
||||
"sub_policy": "Admins"
|
||||
}
|
||||
},
|
||||
"version": "0"
|
||||
},
|
||||
"Endorsement": {
|
||||
"mod_policy": "Admins",
|
||||
"policy": {
|
||||
"type": 3,
|
||||
"value": {
|
||||
"rule": "MAJORITY",
|
||||
"sub_policy": "Endorsement"
|
||||
}
|
||||
},
|
||||
"version": "0"
|
||||
},
|
||||
"LifecycleEndorsement": {
|
||||
"mod_policy": "Admins",
|
||||
"policy": {
|
||||
"type": 3,
|
||||
"value": {
|
||||
"rule": "MAJORITY",
|
||||
"sub_policy": "Endorsement"
|
||||
}
|
||||
},
|
||||
"version": "0"
|
||||
},
|
||||
"Readers": {
|
||||
"mod_policy": "Admins",
|
||||
"policy": {
|
||||
"type": 3,
|
||||
"value": {
|
||||
"rule": "ANY",
|
||||
"sub_policy": "Readers"
|
||||
}
|
||||
},
|
||||
"version": "0"
|
||||
},
|
||||
"Writers": {
|
||||
"mod_policy": "Admins",
|
||||
"policy": {
|
||||
"type": 3,
|
||||
"value": {
|
||||
"rule": "ANY",
|
||||
"sub_policy": "Writers"
|
||||
}
|
||||
},
|
||||
"version": "0"
|
||||
}
|
||||
},
|
||||
"values": {
|
||||
"ACLs": {
|
||||
"mod_policy": "Admins",
|
||||
"value": {
|
||||
"acls": {
|
||||
"_lifecycle/CommitChaincodeDefinition": {
|
||||
"policy_ref": "/Channel/Application/Writers"
|
||||
},
|
||||
"_lifecycle/QueryChaincodeDefinition": {
|
||||
"policy_ref": "/Channel/Application/Readers"
|
||||
},
|
||||
"_lifecycle/QueryNamespaceDefinitions": {
|
||||
"policy_ref": "/Channel/Application/Readers"
|
||||
},
|
||||
"cscc/GetConfigBlock": {
|
||||
"policy_ref": "/Channel/Application/Readers"
|
||||
},
|
||||
"cscc/GetConfigTree": {
|
||||
"policy_ref": "/Channel/Application/Readers"
|
||||
},
|
||||
"cscc/SimulateConfigTreeUpdate": {
|
||||
"policy_ref": "/Channel/Application/Readers"
|
||||
},
|
||||
"event/Block": {
|
||||
"policy_ref": "/Channel/Application/Readers"
|
||||
},
|
||||
"event/FilteredBlock": {
|
||||
"policy_ref": "/Channel/Application/Readers"
|
||||
},
|
||||
"lscc/ChaincodeExists": {
|
||||
"policy_ref": "/Channel/Application/Readers"
|
||||
},
|
||||
"lscc/GetChaincodeData": {
|
||||
"policy_ref": "/Channel/Application/Readers"
|
||||
},
|
||||
"lscc/GetDeploymentSpec": {
|
||||
"policy_ref": "/Channel/Application/Readers"
|
||||
},
|
||||
"lscc/GetInstantiatedChaincodes": {
|
||||
"policy_ref": "/Channel/Application/Readers"
|
||||
},
|
||||
"peer/ChaincodeToChaincode": {
|
||||
"policy_ref": "/Channel/Application/Readers"
|
||||
},
|
||||
"peer/Propose": {
|
||||
"policy_ref": "/Channel/Application/Writers"
|
||||
},
|
||||
"qscc/GetBlockByHash": {
|
||||
"policy_ref": "/Channel/Application/Readers"
|
||||
},
|
||||
"qscc/GetBlockByNumber": {
|
||||
"policy_ref": "/Channel/Application/Readers"
|
||||
},
|
||||
"qscc/GetBlockByTxID": {
|
||||
"policy_ref": "/Channel/Application/Readers"
|
||||
},
|
||||
"qscc/GetChainInfo": {
|
||||
"policy_ref": "/Channel/Application/Readers"
|
||||
},
|
||||
"qscc/GetTransactionByID": {
|
||||
"policy_ref": "/Channel/Application/Readers"
|
||||
}
|
||||
}
|
||||
},
|
||||
"version": "0"
|
||||
},
|
||||
"Capabilities": {
|
||||
"mod_policy": "Admins",
|
||||
"value": {
|
||||
"capabilities": {
|
||||
"V1_3": {}
|
||||
}
|
||||
},
|
||||
"version": "0"
|
||||
}
|
||||
},
|
||||
"version": "1"
|
||||
}
|
||||
},
|
||||
"mod_policy": "",
|
||||
"policies": {},
|
||||
"values": {
|
||||
"Consortium": {
|
||||
"mod_policy": "",
|
||||
"value": {
|
||||
"name": "SampleConsortium"
|
||||
},
|
||||
"version": "0"
|
||||
}
|
||||
},
|
||||
"version": "0"
|
||||
}
|
||||
},
|
||||
"signatures": []
|
||||
},
|
||||
"header": {
|
||||
"channel_header": {
|
||||
"channel_id": "businesschannel",
|
||||
"epoch": "0",
|
||||
"extension": null,
|
||||
"timestamp": "2019-04-02T10:09:26Z",
|
||||
"tls_cert_hash": null,
|
||||
"tx_id": "",
|
||||
"type": 2,
|
||||
"version": 0
|
||||
},
|
||||
"signature_header": null
|
||||
}
|
||||
},
|
||||
"signature": null
|
||||
}
|
Binary file not shown.
|
@ -80,7 +80,7 @@ ready: # create/join channel, install/instantiate cc
|
|||
channel_test: test_channel_create test_channel_join test_channel_list test_channel_getinfo
|
||||
|
||||
# chaincode related operations
|
||||
cc_test: test_cc_install test_cc_instantiate test_cc_invoke_query
|
||||
cc_test: test_cc_install test_cc_instantiate test_cc_invoke_query test_cc_upgrade
|
||||
|
||||
restart: stop start
|
||||
|
||||
|
|
Loading…
Reference in New Issue