minifabric
minifabric copied to clipboard
awoke/ official tutorial video lost key command
base: Developing with Minifabric: Chaincode - YouTube
the mycc demo:
i guess just the simple:
/opt/proj/minifab
$ tree vars/chaincode/simple/ -L 2
vars/chaincode/simple/
|-- go
| |-- go.mod
| |-- go.sum
| `-- main.go
|-- java
| |-- build.gradle
| |-- settings.gradle
| `-- src
`-- node
|-- chaincode_example02.js
`-- package.json
but in the video end, there is combo-command
$ minifab install,approve,commit -n simple -v 2.0 -p '"init","a","200","b","300"'
after this chaincode upgrade command, when i try :
$ minifab invoke -p '"query","b"'
Using default spec file
Minifab Execution Context:
FABRIC_RELEASE=2.3.0
CHANNEL_NAME=mychannel
PEER_DATABASE_TYPE=golevel
CHAINCODE_LANGUAGE=go
CHAINCODE_NAME=simple
CHAINCODE_VERSION=2.0
CHAINCODE_INIT_REQUIRED=true
CHAINCODE_PARAMETERS="query","b"
CHAINCODE_PRIVATE=false
CHAINCODE_POLICY=
TRANSIENT_DATA=
BLOCK_NUMBER=7
EXPOSE_ENDPOINTS=false
CURRENT_ORG=org0.example.com
HOST_ADDRESSES=178.128.91.32,10.15.0.5,10.104.0.2
WORKING_DIRECTORY: /opt/proj/minifab
.......
# Preparing for the following operations: *********************
verify options, cc invoke
.......
# Running operation: ******************************************
verify options
.
# Running operation: ******************************************
cc invoke
..............
# Run the chaincode invoke script on cli container ************
non-zero return code
Error: endorsement failure during invoke. response: status:500 message:"error in simulation: failed to execute transaction 8d80d776f1070d37bca0893d7bd89dad55bfee072be4aa4db5457ab1fbc50dc3: invalid invocation: chaincode 'simple' has not been initialized for this version, must call as init first"
# STATS *******************************************************
minifab: ok=33 failed=1
real 0m15.018s
user 0m11.808s
sys 0m2.820s
there is error,
need run $ minifab initialize
at first,
suggest append the video.
btw:
the built-in command
'ccup' - update or force re-install chaincode as specified version (alias to install,approve,commit,instantiate/initialize).
just the best easy upgrade Chaincode 's commend;
thanx for all