Add config blocks and logs

pull/108/head
Baohua Yang 2017-12-05 17:17:05 +08:00
parent 2a766316b5
commit 271918b5a9
16 changed files with 19080 additions and 37 deletions

View File

@ -22,10 +22,13 @@ all:
@echo "Run test with $(COMPOSE_FILE)"
@echo "Please make sure u have setup Docker and pulled images by 'make setup'."
#make gen_config
make ready # Finish all testing
make stop clean
ready: # create/join channel, install/instantiate cc
make gen_config # Will ignore if local config path exists
make restart
make test_channel_create
make test_channel_join
# make update_anchors
@ -39,21 +42,6 @@ all:
make test_configtxlator
make stop clean
test_cc: # test chaincode, deprecated
if [ "$(HLF_MODE)" = "dev" ]; then \
make test_cc_peer0; \
else \
make test_cc_invoke_query; \
fi
ready: restart # create/join channel, install/instantiate cc
@echo "Restart, init network and then do cc testing..."
make test_channel
# make update_anchors
make test_cc_install
make test_cc_instantiate
@echo "Now the fabric network is ready to play"
@echo "run 'make cli' to enter into the fabric-cli container."
@echo "run 'make stop' when done."
@ -62,7 +50,7 @@ restart: stop start
start: # bootup the fabric network
@echo "Start a fabric network with ${COMPOSE_FILE}"
make clean
@make clean
@docker-compose -f ${COMPOSE_FILE} up -d # Start a fabric network
stop: # stop the fabric network
@ -86,6 +74,13 @@ update_anchors: # Update the anchor peer
docker exec -it fabric-cli bash -c "cd /tmp; bash scripts/test_update_anchors.sh"
################## Chaincode testing operations ################
test_cc: # test chaincode, deprecated
if [ "$(HLF_MODE)" = "dev" ]; then \
make test_cc_peer0; \
else \
make test_cc_invoke_query; \
fi
test_cc_install: # Install the chaincode
@echo "Install chaincode on the fabric network"
docker exec -it fabric-cli bash -c "cd /tmp; bash scripts/test_cc_install.sh"
@ -133,6 +128,9 @@ clean_env: # clean up environment
cli: # enter the cli container
docker exec -it fabric-cli bash
orderer: # enter the orderer container
docker exec -it orderer.example.com bash
peer: # enter the peer container
docker exec -it peer0.org1.example.com bash

View File

@ -28,7 +28,8 @@ services:
- ORDERER_GENERAL_GENESISFILE=/var/hyperledger/orderer/orderer.genesis.block
- ORDERER_GENERAL_LOCALMSPID=OrdererMSP
- ORDERER_GENERAL_LOCALMSPDIR=/var/hyperledger/orderer/msp
- ORDERER_GENERAL_LEDGERTYPE=file
#- ORDERER_GENERAL_LEDGERTYPE=file
- ORDERER_GENERAL_LEDGERTYPE=json
- ORDERER_GENERAL_BATCHTIMEOUT=1s
- ORDERER_GENERAL_MAXMESSAGECOUNT=10
- ORDERER_GENERAL_MAXWINDOWSIZE=1000

View File

@ -104,7 +104,7 @@ channelCreateAction(){
}
# Use peer0/org1 to create a channel
# channelCreate channel_name
# channelCreate channel_name org peer
channelCreate() {
local channel=$1
local org=$2

View File

@ -30,9 +30,11 @@ echo_b "Clean existing container $GEN_CONTAINER"
pushd ${MODE}
echo_b "Validating path for channel-artifacts and crypto-config"
echo_b "Check whether channel-artifacts or crypto-config exist already"
[ -d ${CRYPTO_CONFIG} ] && echo "${CRYPTO_CONFIG} existed, will stop generating new configs" && exit 0
mkdir ${CRYPTO_CONFIG}
[ -d ${CHANNEL_ARTIFACTS} ] && echo "${CHANNEL_ARTIFACTS} existed, will stop generating new configs" && exit 0
mkdir ${CHANNEL_ARTIFACTS}
echo_b "Starting container $GEN_CONTAINER in background"
docker run \

View File

@ -559,10 +559,10 @@
},
"signatures": [
{
"signature": "MEQCIF3/Btt/cT252UFfn/XBcSgl26Ik6WZ/VxKTr6RopuzMAiBUJvpfZSGKZVG125DUHl8LPkaGVnpluvpoYl3FtB6SWQ==",
"signature": "MEUCIQDGZ+RGjyd9QinezJyj5F8Uz7j3kRp0bR0WcH6oK1k6zQIgMutGil+0KkeJujVJXEbwnSxGiMIAsSyiy28XVTSWXrk=",
"signature_header": {
"creator": "CgdPcmcxTVNQEoAGLS0tLS1CRUdJTiAtLS0tLQpNSUlDR1RDQ0FjQ2dBd0lCQWdJUkFKMmZWcUdDMzJYQzVRcGdZc212WXhFd0NnWUlLb1pJemowRUF3SXdjekVMCk1Ba0dBMVVFQmhNQ1ZWTXhFekFSQmdOVkJBZ1RDa05oYkdsbWIzSnVhV0V4RmpBVUJnTlZCQWNURFZOaGJpQkcKY21GdVkybHpZMjh4R1RBWEJnTlZCQW9URUc5eVp6RXVaWGhoYlhCc1pTNWpiMjB4SERBYUJnTlZCQU1URTJOaApMbTl5WnpFdVpYaGhiWEJzWlM1amIyMHdIaGNOTVRjeE1qQXhNVE0xTnpFNVdoY05NamN4TVRJNU1UTTFOekU1CldqQmJNUXN3Q1FZRFZRUUdFd0pWVXpFVE1CRUdBMVVFQ0JNS1EyRnNhV1p2Y201cFlURVdNQlFHQTFVRUJ4TU4KVTJGdUlFWnlZVzVqYVhOamJ6RWZNQjBHQTFVRUF3d1dRV1J0YVc1QWIzSm5NUzVsZUdGdGNHeGxMbU52YlRCWgpNQk1HQnlxR1NNNDlBZ0VHQ0NxR1NNNDlBd0VIQTBJQUJHVXVSSHFReXdRUVFpd0J3L3B4NTFPekRxRnhPUHM1ClRuWm4vQm1NbFN4eDBUWTA4bHltWUxyYmdKVG5ablFFbTJGQmpLSWhYbllmaUt5SVNraEdmQStqVFRCTE1BNEcKQTFVZER3RUIvd1FFQXdJSGdEQU1CZ05WSFJNQkFmOEVBakFBTUNzR0ExVWRJd1FrTUNLQUlIbzQyZVBwMDE4aApkOFl0YlNpTnd5L0ZjcFIvcno1QkJUaTVvRVV1b2F2NE1Bb0dDQ3FHU000OUJBTUNBMGNBTUVRQ0lBS3d0RUJBCmZpVkpOaDFMWjlGUXZCWEFrYUlmaFpSY25tOTJWSVBEZzdjWUFpQVU3eE1KRzkwZURqMkJTSWliL1I3UU5rRngKemVrTFNVTEk5RzJVVVlBNzdBPT0KLS0tLS1FTkQgLS0tLS0K",
"nonce": "jQknzH9EASE35zHAjmsorX1+637C4fMZ"
"nonce": "nWfRo8Ry0NWPYM6IZBBy7w6ezB/eMMjy"
}
}
]
@ -570,36 +570,36 @@
"header": {
"channel_header": {
"channel_id": "businesschannel",
"timestamp": "2017-12-01T14:51:20.000Z",
"timestamp": "2017-12-05T07:29:42.000Z",
"type": 2
},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tLS0K",
"nonce": "m4lwgCM4bFapHF6DEaH84/K+PBKlActP"
"nonce": "vlsgPDaB29Kr/D8YPlPoNKw2WuPNeuld"
}
}
},
"signature": "MEUCIQDYBMsy1zFk79g4Lqv++P4Wsj5ZTj5qbi3YJp/ITYhS3AIgawNYhTkr0C//OOO1zh+Lolva61wcg73VWmg2h6F0bic="
"signature": "MEQCIEI4/QRCVwBsm4iXPOtI2i00GzaonTbOAt06kJhodD52AiA96N6MlhzExt6Z0K69pkOdNBe11gZmzkNWwFyfn8yCjw=="
}
},
"header": {
"channel_header": {
"channel_id": "businesschannel",
"timestamp": "2017-12-01T14:51:20.000Z",
"timestamp": "2017-12-05T07:29:42.000Z",
"type": 1
},
"signature_header": {
"creator": "CgpPcmRlcmVyTVNQEvAFLS0tLS1CRUdJTiAtLS0tLQpNSUlDRFRDQ0FiT2dBd0lCQWdJUkFOTjlZdXZ0UFdtL2J4dEQ0QTB6UUMwd0NnWUlLb1pJemowRUF3SXdhVEVMCk1Ba0dBMVVFQmhNQ1ZWTXhFekFSQmdOVkJBZ1RDa05oYkdsbWIzSnVhV0V4RmpBVUJnTlZCQWNURFZOaGJpQkcKY21GdVkybHpZMjh4RkRBU0JnTlZCQW9UQzJWNFlXMXdiR1V1WTI5dE1SY3dGUVlEVlFRREV3NWpZUzVsZUdGdApjR3hsTG1OdmJUQWVGdzB4TnpFeU1ERXhNelUzTWpCYUZ3MHlOekV4TWpreE16VTNNakJhTUZneEN6QUpCZ05WCkJBWVRBbFZUTVJNd0VRWURWUVFJRXdwRFlXeHBabTl5Ym1saE1SWXdGQVlEVlFRSEV3MVRZVzRnUm5KaGJtTnAKYzJOdk1Sd3dHZ1lEVlFRREV4TnZjbVJsY21WeUxtVjRZVzF3YkdVdVkyOXRNRmt3RXdZSEtvWkl6ajBDQVFZSQpLb1pJemowREFRY0RRZ0FFb2FUYXdWbmI2d0lKR3YvTWtLWFd0RG02YzQ5a0V4YWg3VS9Vb2k4SjBJdFJFRUJMCmdWc1pYUVBtZUxjaEptRVFmQkplT2JDOERVSmk5aVdrZ213djRhTk5NRXN3RGdZRFZSMFBBUUgvQkFRREFnZUEKTUF3R0ExVWRFd0VCL3dRQ01BQXdLd1lEVlIwakJDUXdJb0FnRk1nWHZyVTJOVXByTGQ3enBic1ozV1VqY2ZSWApLaFQ3My9QWnNiQjZhaDR3Q2dZSUtvWkl6ajBFQXdJRFNBQXdSUUloQVBiSVdvdkpqZEVWYlFlWmxyV2EzQytVCmlYbWtuSzlHSUU1cnVaazI4cC9OQWlCbWk3aFhUQlovZE8vR1RPbDhid2RBRWNqb1ZrdEpuMjlUbFpVVG9SaHYKVGc9PQotLS0tLUVORCAtLS0tLQo=",
"nonce": "2s4g+21V35b+/ktapIGNCS1gkFa8UVgy"
"nonce": "z0Rdbzgkba/iGmzjleLDhjo4XT6MZKhR"
}
}
},
"signature": "MEUCIQDQOK6FrWlfFEMM2cIygs+Dk+/3pOPd9pZfs3E8SMOOJwIgBnekI6aYX3wSaoCQ8b3cQdHDxoOdhmI1Y2+HPGyU9yM="
"signature": "MEUCIQD1J8J+Apml+tgx9/Gr5b5TlHXwpYxFm6PvTGDOYg5lbAIgXZfIKvB8vBM5nM7d/vQiAW5hxPPTlxIEqGJG+4faQkI="
}
]
},
"header": {
"data_hash": "eJOtW3eE7zkL8KW4HHAilunruZ32oGIJS9LHlW8/hZo="
"data_hash": "oxe/O4KFlUfrU7Z7B668htxp4D2EACr/xrezj9HeuSk="
},
"metadata": {
"metadata": [

View File

@ -555,10 +555,10 @@
},
"signatures": [
{
"signature": "MEQCIF3/Btt/cT252UFfn/XBcSgl26Ik6WZ/VxKTr6RopuzMAiBUJvpfZSGKZVG125DUHl8LPkaGVnpluvpoYl3FtB6SWQ==",
"signature": "MEUCIQDGZ+RGjyd9QinezJyj5F8Uz7j3kRp0bR0WcH6oK1k6zQIgMutGil+0KkeJujVJXEbwnSxGiMIAsSyiy28XVTSWXrk=",
"signature_header": {
"creator": "CgdPcmcxTVNQEoAG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X1+637C4fMZ"
"nonce": "nWfRo8Ry0NWPYM6IZBBy7w6ezB/eMMjy"
}
}
]
@ -566,27 +566,27 @@
"header": {
"channel_header": {
"channel_id": "businesschannel",
"timestamp": "2017-12-01T14:51:20.000Z",
"timestamp": "2017-12-05T07:29:42.000Z",
"type": 2
},
"signature_header": {
"creator": "CgdPcmcxTVNQEoAGLS0tLS1CRUdJTiAtLS0tLQpNSUlDR1RDQ0FjQ2dBd0lCQWdJUkFKMmZWcUdDMzJYQzVRcGdZc212WXhFd0NnWUlLb1pJemowRUF3SXdjekVMCk1Ba0dBMVVFQmhNQ1ZWTXhFekFSQmdOVkJBZ1RDa05oYkdsbWIzSnVhV0V4RmpBVUJnTlZCQWNURFZOaGJpQkcKY21GdVkybHpZMjh4R1RBWEJnTlZCQW9URUc5eVp6RXVaWGhoYlhCc1pTNWpiMjB4SERBYUJnTlZCQU1URTJOaApMbTl5WnpFdVpYaGhiWEJzWlM1amIyMHdIaGNOTVRjeE1qQXhNVE0xTnpFNVdoY05NamN4TVRJNU1UTTFOekU1CldqQmJNUXN3Q1FZRFZRUUdFd0pWVXpFVE1CRUdBMVVFQ0JNS1EyRnNhV1p2Y201cFlURVdNQlFHQTFVRUJ4TU4KVTJGdUlFWnlZVzVqYVhOamJ6RWZNQjBHQTFVRUF3d1dRV1J0YVc1QWIzSm5NUzVsZUdGdGNHeGxMbU52YlRCWgpNQk1HQnlxR1NNNDlBZ0VHQ0NxR1NNNDlBd0VIQTBJQUJHVXVSSHFReXdRUVFpd0J3L3B4NTFPekRxRnhPUHM1ClRuWm4vQm1NbFN4eDBUWTA4bHltWUxyYmdKVG5ablFFbTJGQmpLSWhYbllmaUt5SVNraEdmQStqVFRCTE1BNEcKQTFVZER3RUIvd1FFQXdJSGdEQU1CZ05WSFJNQkFmOEVBakFBTUNzR0ExVWRJd1FrTUNLQUlIbzQyZVBwMDE4aApkOFl0YlNpTnd5L0ZjcFIvcno1QkJUaTVvRVV1b2F2NE1Bb0dDQ3FHU000OUJBTUNBMGNBTUVRQ0lBS3d0RUJBCmZpVkpOaDFMWjlGUXZCWEFrYUlmaFpSY25tOTJWSVBEZzdjWUFpQVU3eE1KRzkwZURqMkJTSWliL1I3UU5rRngKemVrTFNVTEk5RzJVVVlBNzdBPT0KLS0tLS1FTkQgLS0tLS0K",
"nonce": "m4lwgCM4bFapHF6DEaH84/K+PBKlActP"
"nonce": "vlsgPDaB29Kr/D8YPlPoNKw2WuPNeuld"
}
}
},
"signature": "MEUCIQDYBMsy1zFk79g4Lqv++P4Wsj5ZTj5qbi3YJp/ITYhS3AIgawNYhTkr0C//OOO1zh+Lolva61wcg73VWmg2h6F0bic="
"signature": "MEQCIEI4/QRCVwBsm4iXPOtI2i00GzaonTbOAt06kJhodD52AiA96N6MlhzExt6Z0K69pkOdNBe11gZmzkNWwFyfn8yCjw=="
}
},
"header": {
"channel_header": {
"channel_id": "businesschannel",
"timestamp": "2017-12-01T14:51:20.000Z",
"timestamp": "2017-12-05T07:29:42.000Z",
"type": 1
},
"signature_header": {
"creator": "CgpPcmRlcmVyTVNQEvAFLS0tLS1CRUdJTiAtLS0tLQpNSUlDRFRDQ0FiT2dBd0lCQWdJUkFOTjlZdXZ0UFdtL2J4dEQ0QTB6UUMwd0NnWUlLb1pJemowRUF3SXdhVEVMCk1Ba0dBMVVFQmhNQ1ZWTXhFekFSQmdOVkJBZ1RDa05oYkdsbWIzSnVhV0V4RmpBVUJnTlZCQWNURFZOaGJpQkcKY21GdVkybHpZMjh4RkRBU0JnTlZCQW9UQzJWNFlXMXdiR1V1WTI5dE1SY3dGUVlEVlFRREV3NWpZUzVsZUdGdApjR3hsTG1OdmJUQWVGdzB4TnpFeU1ERXhNelUzTWpCYUZ3MHlOekV4TWpreE16VTNNakJhTUZneEN6QUpCZ05WCkJBWVRBbFZUTVJNd0VRWURWUVFJRXdwRFlXeHBabTl5Ym1saE1SWXdGQVlEVlFRSEV3MVRZVzRnUm5KaGJtTnAKYzJOdk1Sd3dHZ1lEVlFRREV4TnZjbVJsY21WeUxtVjRZVzF3YkdVdVkyOXRNRmt3RXdZSEtvWkl6ajBDQVFZSQpLb1pJemowREFRY0RRZ0FFb2FUYXdWbmI2d0lKR3YvTWtLWFd0RG02YzQ5a0V4YWg3VS9Vb2k4SjBJdFJFRUJMCmdWc1pYUVBtZUxjaEptRVFmQkplT2JDOERVSmk5aVdrZ213djRhTk5NRXN3RGdZRFZSMFBBUUgvQkFRREFnZUEKTUF3R0ExVWRFd0VCL3dRQ01BQXdLd1lEVlIwakJDUXdJb0FnRk1nWHZyVTJOVXByTGQ3enBic1ozV1VqY2ZSWApLaFQ3My9QWnNiQjZhaDR3Q2dZSUtvWkl6ajBFQXdJRFNBQXdSUUloQVBiSVdvdkpqZEVWYlFlWmxyV2EzQytVCmlYbWtuSzlHSUU1cnVaazI4cC9OQWlCbWk3aFhUQlovZE8vR1RPbDhid2RBRWNqb1ZrdEpuMjlUbFpVVG9SaHYKVGc9PQotLS0tLUVORCAtLS0tLQo=",
"nonce": "2s4g+21V35b+/ktapIGNCS1gkFa8UVgy"
"nonce": "z0Rdbzgkba/iGmzjleLDhjo4XT6MZKhR"
}
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff