Closed bjwswang closed 1 year ago
Sub tasks:
EndorsePolicy
fixed by https://github.com/bestchains/fabric-operator/pull/131Chaincode
API and basic controller logicdeployChaincode
proposal deployChaincode succ
upgradeChaincode
proposal upgradeChaincode succ
Prerequisites before
Chaincode
Federation
Network
Channel
After a
Channel
created successfully, we can useChaincode
to deploy a blockchain contractDesign
We use
fabric-builder-k8s
as the external builder to manage chaincodesOperations on
Chaincode
(fabric builder k8s)Prerequsities
https://github.com/bestchains/fabric-builder-k8s/blob/main/Dockerfile
https://github.com/bestchains/fabric-builder-k8s/tree/main/samples/go-contract
deploy a new
Chaincode
1. create a CR
Chaincode
.must provide:2. create a proposal
DeployChaincode
(Only ALL is allowed at this kind of proposal)members
3. every channel member votes
no
,this proposal failsyes
,this proposal succ4. reconcile proposal result
4.1 reconcile
propsoal fail
unapproved
4.2 reconcile
proposal succ
approved
5. reconcile if
approved
https://github.com/hyperledgendary/conga-nft-contract/releases/download/v0.1.1/conga-nft-contract-v0.1.1.tgz
ChaincodePackaged
ChaincodeError
with error messageChaincodeInstalled
ChaincodeError
with error messageapprove chaincode
for each member org https://github.com/bestchains/fabric-operator/blob/main/sample-network/scripts/run-e2e-test.sh#L96ChaincodeApproved
ChaincodeError
with error messagecommit chaincode
by any org in this channel https://github.com/bestchains/fabric-operator/blob/main/sample-network/scripts/run-e2e-test.sh#L107ChaincodeCommitted
ChaincodeError
with error messageChaincodeRunning
ChaincodeError
with error messageupgrade a
Chaincode
1. create a proposal
UpgradeChaincode
2. member votes on
UpgradeChaincode
3. when
UpgradeChaincode
ends3.1 when succ
Chaincode
spec.version
: set fromUpgradeChaincode
spec. Images
: set fromUpgradeChaincode
status.history
append previous chaincode version3.2 when fail
do nothing
4. reconcile
Chaincode
updateChaincode
createdelete a
Chaincode
only when chaincode.status is
unapproved