{"record":{"id":"b6a8f9afc7f79f1a","repo":"hyperledger/fabric","slug":"chaincode-name-s-is-reserved-for-system-chainco","errorCode":null,"errorMessage":"chaincode name '%s' is reserved for system chaincodes","messagePattern":"chaincode name '(.+?)' is reserved for system chaincodes","errorType":"validation","errorClass":"VSCCEndorsementPolicyError","httpStatus":null,"severity":"error","filePath":"core/handlers/validation/builtin/v12/validation_logic.go","lineNumber":551,"sourceCode":"\t\t\tcap.Action == nil || cap.Action.ProposalResponsePayload == nil {\n\t\t\treturn policyErr(fmt.Errorf(\"VSCC error: invocation of lscc(%s) does not have appropriate arguments\", lsccFunc))\n\t\t}\n\n\t\tswitch cdsArgs.ChaincodeSpec.Type.String() {\n\t\tcase \"GOLANG\", \"NODE\", \"JAVA\", \"CAR\":\n\t\tdefault:\n\t\t\treturn policyErr(fmt.Errorf(\"unexpected chaincode spec type: %s\", cdsArgs.ChaincodeSpec.Type.String()))\n\t\t}\n\n\t\t// validate chaincode name\n\t\tccName := cdsArgs.ChaincodeSpec.ChaincodeId.Name\n\t\t// it must comply with the lscc.ChaincodeNameRegExp\n\t\tif !lscc.ChaincodeNameRegExp.MatchString(ccName) {\n\t\t\treturn policyErr(errors.Errorf(\"invalid chaincode name '%s'\", ccName))\n\t\t}\n\t\t// it can't match the name of one of the system chaincodes\n\t\tif _, in := systemChaincodeNames[ccName]; in {\n\t\t\treturn policyErr(errors.Errorf(\"chaincode name '%s' is reserved for system chaincodes\", ccName))\n\t\t}\n\n\t\t// validate chaincode version\n\t\tccVersion := cdsArgs.ChaincodeSpec.ChaincodeId.Version\n\t\t// it must comply with the lscc.ChaincodeVersionRegExp\n\t\tif !lscc.ChaincodeVersionRegExp.MatchString(ccVersion) {\n\t\t\treturn policyErr(errors.Errorf(\"invalid chaincode version '%s'\", ccVersion))\n\t\t}\n\n\t\t// get the rwset\n\t\tpRespPayload, err := protoutil.UnmarshalProposalResponsePayload(cap.Action.ProposalResponsePayload)\n\t\tif err != nil {\n\t\t\treturn policyErr(fmt.Errorf(\"GetProposalResponsePayload error %s\", err))\n\t\t}\n\t\tif pRespPayload.Extension == nil {\n\t\t\treturn policyErr(fmt.Errorf(\"nil pRespPayload.Extension\"))\n\t\t}\n\t\trespPayload, err := protoutil.UnmarshalChaincodeAction(pRespPayload.Extension)","sourceCodeStart":533,"sourceCodeEnd":569,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/core/handlers/validation/builtin/v12/validation_logic.go#L533-L569","documentation":"VSCC refuses chaincode names that collide with system chaincodes (e.g. lscc, cscc, qscc, escc, vscc). Deploying user chaincode under a reserved name would shadow or confuse system functionality, so the transaction is rejected with a policy error.","triggerScenarios":"A deploy/upgrade transaction whose ChaincodeId.Name equals one of the keys in systemChaincodeNames (such as \"lscc\", \"cscc\", \"qscc\", \"vscc\", \"escc\").","commonSituations":"Developers testing with generic names like \"vscc\" or \"lscc\", scripts that default the name to a system chaincode, or typos when overriding system chaincode plugins via config.","solutions":["Choose a non-reserved name for your chaincode and redeploy.","Check the peer's systemChaincodeNames list (peer/core.yaml system section) before picking a name.","If you intended to replace a system chaincode, use the chaincode plugin/external builder mechanism instead of deploying under its name."],"exampleFix":"// before\nname := \"vscc\"\n// after\nname := \"myapp-vscc-validator\"","handlingStrategy":"validation","validationCode":"var systemCCNames = map[string]bool{\"lscc\": true, \"cscc\": true, \"qscc\": true, \"escc\": true, \"vscc\": true}\nif systemCCNames[ccName] {\n    return fmt.Errorf(\"name %q is reserved for system chaincodes\", ccName)\n}","typeGuard":"func isReservedName(name string) bool {\n    switch name {\n    case \"lscc\", \"cscc\", \"qscc\", \"escc\", \"vscc\":\n        return true\n    }\n    return false\n}","tryCatchPattern":"if isReservedName(name) {\n    return fmt.Errorf(\"cannot deploy user chaincode under reserved name %q\", name)\n}","preventionTips":["Prefix user chaincode names with an app/project namespace.","Keep an allowlist of reserved names in deploy scripts.","Never name test chaincodes after system chaincodes."],"tags":["fabric","vscc","lscc","system-chaincode","naming"],"backgroundTag":"reserved-chaincode-name","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"}