{"record":{"id":"cfa78d9e0e68f418","repo":"hyperledger/fabric","slug":"collection-name-s-maximum-peer-count-d-can-cfa78d","errorCode":null,"errorMessage":"collection-name: %s -- maximum peer count (%d) cannot be less than the required peer count (%d)","messagePattern":"collection-name: (.+?) -- maximum peer count \\((.+?)\\) cannot be less than the required peer count \\((.+?)\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"core/handlers/validation/builtin/v12/validation_logic.go","lineNumber":229,"sourceCode":"\n\t\t// Ensure that there are no duplicate collection names\n\t\tcollectionName := newCollection.GetName()\n\n\t\tif err := validateCollectionName(collectionName); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif _, ok := newCollectionsMap[collectionName]; !ok {\n\t\t\tnewCollectionsMap[collectionName] = true\n\t\t} else {\n\t\t\treturn fmt.Errorf(\"collection-name: %s -- found duplicate collection configuration\", collectionName)\n\t\t}\n\n\t\t// Validate gossip related parameters present in the collection config\n\t\tmaximumPeerCount := newCollection.GetMaximumPeerCount()\n\t\trequiredPeerCount := newCollection.GetRequiredPeerCount()\n\t\tif maximumPeerCount < requiredPeerCount {\n\t\t\treturn fmt.Errorf(\"collection-name: %s -- maximum peer count (%d) cannot be less than the required peer count (%d)\",\n\t\t\t\tcollectionName, maximumPeerCount, requiredPeerCount)\n\t\t}\n\t\tif requiredPeerCount < 0 {\n\t\t\treturn fmt.Errorf(\"collection-name: %s -- requiredPeerCount (%d) cannot be less than zero\",\n\t\t\t\tcollectionName, requiredPeerCount)\n\t\t}\n\n\t\t// make sure that the signature policy is meaningful (only consists of ORs)\n\t\terr := validateSpOrConcat(newCollection.MemberOrgsPolicy.GetSignaturePolicy().Rule)\n\t\tif err != nil {\n\t\t\treturn errors.WithMessagef(err, \"collection-name: %s -- error in member org policy\", collectionName)\n\t\t}\n\t}\n\treturn nil\n}\n\n// validateSpOrConcat checks if the supplied signature policy is just an OR-concatenation of identities.\nfunc validateSpOrConcat(sp *common.SignaturePolicy) error {","sourceCodeStart":211,"sourceCodeEnd":247,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/core/handlers/validation/builtin/v12/validation_logic.go#L211-L247","documentation":"validateNewCollectionConfigs found a static collection whose MaximumPeerCount is smaller than its RequiredPeerCount — an unsatisfiable dissemination guarantee, since the collection can never gossip to the required number of peers.","triggerScenarios":"Thrown at core/handlers/validation/builtin/v12/validation_logic.go:229 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set maximumPeerCount >= requiredPeerCount in the collection definition","Use sensible defaults (e.g. requiredPeerCount smaller than max)"],"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"}