hyperledger/fabric · error
collection-name: %s -- maximum peer count (%d) cannot be les
Error message
collection-name: %s -- maximum peer count (%d) cannot be less than the required peer count (%d)
What it means
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.
Source
Thrown at core/handlers/validation/builtin/v12/validation_logic.go:229
// Ensure that there are no duplicate collection names
collectionName := newCollection.GetName()
if err := validateCollectionName(collectionName); err != nil {
return err
}
if _, ok := newCollectionsMap[collectionName]; !ok {
newCollectionsMap[collectionName] = true
} else {
return fmt.Errorf("collection-name: %s -- found duplicate collection configuration", collectionName)
}
// Validate gossip related parameters present in the collection config
maximumPeerCount := newCollection.GetMaximumPeerCount()
requiredPeerCount := newCollection.GetRequiredPeerCount()
if maximumPeerCount < requiredPeerCount {
return fmt.Errorf("collection-name: %s -- maximum peer count (%d) cannot be less than the required peer count (%d)",
collectionName, maximumPeerCount, requiredPeerCount)
}
if requiredPeerCount < 0 {
return fmt.Errorf("collection-name: %s -- requiredPeerCount (%d) cannot be less than zero",
collectionName, requiredPeerCount)
}
// make sure that the signature policy is meaningful (only consists of ORs)
err := validateSpOrConcat(newCollection.MemberOrgsPolicy.GetSignaturePolicy().Rule)
if err != nil {
return errors.WithMessagef(err, "collection-name: %s -- error in member org policy", collectionName)
}
}
return nil
}
// validateSpOrConcat checks if the supplied signature policy is just an OR-concatenation of identities.
func validateSpOrConcat(sp *common.SignaturePolicy) error {View on GitHub (pinned to 2736b63f8f)
Solutions
- Set maximumPeerCount >= requiredPeerCount in the collection definition
- Use sensible defaults (e.g. requiredPeerCount smaller than max)
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at core/handlers/validation/builtin/v12/validation_logic.go:229 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of hyperledger/fabric@2736b63f8f (2026-09-04).
Data as JSON: /api/errors/cfa78d9e0e68f418.
Report an issue: GitHub.