{"record":{"id":"8ed0f2308070e807","repo":"hyperledger/fabric","slug":"no-instantiation-policy-was-specified-8ed0f2","errorCode":null,"errorMessage":"No instantiation policy was specified","messagePattern":"No instantiation policy was specified","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/handlers/validation/builtin/v13/lscc_validation_logic.go","lineNumber":570,"sourceCode":"\t\t\tif ac.V1_2Validation() {\n\t\t\t\t// do extra validation for collections\n\t\t\t\terr := vscc.validateRWSetAndCollection(lsccrwset, cdRWSet, lsccArgs, lsccFunc, ac, chid)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn err\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// there can only be a single ledger write\n\t\t\t\tif len(lsccrwset.Writes) != 1 {\n\t\t\t\t\treturn policyErr(fmt.Errorf(\"LSCC can only issue a single putState upon upgrade\"))\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/*****************************************************/\n\t\t\t/* security check 4 - check the instantiation policy */\n\t\t\t/*****************************************************/\n\t\t\tpol := cdLedger.InstantiationPolicy\n\t\t\tif pol == nil {\n\t\t\t\treturn policyErr(fmt.Errorf(\"No instantiation policy was specified\"))\n\t\t\t}\n\t\t\t// FIXME: could we actually pull the cds package from the\n\t\t\t// file system to verify whether the policy that is specified\n\t\t\t// here is the same as the one on disk?\n\t\t\t// PROS: we prevent attacks where the policy is replaced\n\t\t\t// CONS: this would be a point of non-determinism\n\t\t\terr := vscc.checkInstantiationPolicy(chid, env, pol, payl)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\n\t\t\t/******************************************************************/\n\t\t\t/* security check 5 - check the instantiation policy in the rwset */\n\t\t\t/******************************************************************/\n\t\t\tif ac.V1_1Validation() {\n\t\t\t\tpolNew := cdRWSet.InstantiationPolicy\n\t\t\t\tif polNew == nil {\n\t\t\t\t\treturn policyErr(fmt.Errorf(\"No instantiation policy was specified\"))","sourceCodeStart":552,"sourceCodeEnd":588,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/core/handlers/validation/builtin/v13/lscc_validation_logic.go#L552-L588","documentation":"Returned by ValidateLSCCInvocation (security check 4) during upgrade when the existing ledger chaincode data carries no instantiation policy to evaluate the upgrade signature against. Without a stored policy, upgrade authorization cannot be verified.","triggerScenarios":"Thrown at core/handlers/validation/builtin/v13/lscc_validation_logic.go:570 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Include a valid instantiation policy in the upgrade transaction","Default it to the channel's instantiation policy when unspecified"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2736b63f8fd5932511d56fe68b7039d15977f7f6","analyzedAt":"2026-09-04T08:52:36.465Z","contentChangedAt":"2026-09-04T08:52:36.465Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}