{"record":{"id":"7dfdf761ebd44059","repo":"hyperledger/fabric","slug":"vscc-error-committing-an-invocation-of-function-7dfdf7","errorCode":null,"errorMessage":"VSCC error: committing an invocation of function %s of lscc is invalid","messagePattern":"VSCC error: committing an invocation of function (.+?) of lscc is invalid","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/handlers/validation/builtin/v13/lscc_validation_logic.go","lineNumber":604,"sourceCode":"\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\"))\n\t\t\t\t}\n\n\t\t\t\t// no point in checking it again if they are the same policy\n\t\t\t\tif !bytes.Equal(polNew, pol) {\n\t\t\t\t\terr = vscc.checkInstantiationPolicy(chid, env, polNew, payl)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn err\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// all is good!\n\t\treturn nil\n\tdefault:\n\t\treturn policyErr(fmt.Errorf(\"VSCC error: committing an invocation of function %s of lscc is invalid\", lsccFunc))\n\t}\n}\n\nfunc (vscc *Validator) getInstantiatedCC(chid, ccid string) (cd *ccprovider.ChaincodeData, exists bool, err error) {\n\tqe, err := vscc.stateFetcher.FetchState()\n\tif err != nil {\n\t\terr = fmt.Errorf(\"could not retrieve QueryExecutor for channel %s, error %s\", chid, err)\n\t\treturn\n\t}\n\tdefer qe.Done()\n\tchannelState := &state{qe}\n\tbytes, err := channelState.GetState(\"lscc\", ccid)\n\tif err != nil {\n\t\terr = fmt.Errorf(\"could not retrieve state for chaincode %s on channel %s, error %s\", ccid, chid, err)\n\t\treturn\n\t}\n\n\tif bytes == nil {","sourceCodeStart":586,"sourceCodeEnd":622,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/core/handlers/validation/builtin/v13/lscc_validation_logic.go#L586-L622","documentation":"The LSCC function name in the invocation is not one of the recognized operations (deploy, upgrade, etc.), so committing this LSCC invocation is invalid — likely a tampered or client-unsupported function.","triggerScenarios":"Thrown at core/handlers/validation/builtin/v13/lscc_validation_logic.go:604 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Invoke only supported LSCC functions","Reject transactions with unknown LSCC functions"],"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"}