hyperledger/fabric · error
missing consensus type property in config
Error message
missing consensus type property in config
What it means
The verifier reads the ConsensusType value from the Orderer group of the proposed channel config. If Values["ConsensusType"] is absent, it cannot determine the consensus metadata and rejects the config update. Every validated config for a SmartBFT channel must carry the ConsensusType entry.
Source
Thrown at orderer/consensus/smartbft/configverifier.go:172
if len(conf.ChannelGroup.Groups["Orderer"].Policies) == 0 {
return fmt.Errorf("empty policies in 'Orderer' group")
}
if conf.ChannelGroup.Groups["Orderer"].Policies["BlockValidation"] == nil {
return fmt.Errorf("block validation policy is not found in the policies of 'Orderer' group")
}
actualPolicy := conf.ChannelGroup.Groups["Orderer"].Policies["BlockValidation"].Policy
if !proto.Equal(expectedConfigPol, actualPolicy) {
return fmt.Errorf("block validation policy should be a signature policy: %v but it is %v instead", expectedConfigPol, actualPolicy)
}
consensusTypeConfigValue := conf.ChannelGroup.Groups["Orderer"].Values["ConsensusType"]
if consensusTypeConfigValue == nil {
return fmt.Errorf("missing consensus type property in config")
}
consensusTypeValue := &protosorderer.ConsensusType{}
if err := proto.Unmarshal(consensusTypeConfigValue.Value, consensusTypeValue); err != nil {
return fmt.Errorf("invalid consensus type property in config: %v", err)
}
configOptions := &smartbft.Options{}
if err := proto.Unmarshal(consensusTypeValue.Metadata, configOptions); err != nil {
return fmt.Errorf("invalid options encoded in consensus metadata: %v", err)
}
if configOptions.LeaderRotation == smartbft.Options_ROTATION_ON {
return fmt.Errorf("leader rotation must be turned off for this version or be unspecified")
}
return nil
}View on GitHub (pinned to 2736b63f8f)
Solutions
- Add/restore the ConsensusType value (type=etcdraft/BFT with proper Metadata) in the Orderer group of the config
- Regenerate the channel config with configtxgen using a SmartBFT-compatible profile
- Check the config update diff to ensure no write deletes the ConsensusType key
Example fix
// before (Orderer.Values lacks ConsensusType after a bad update)
"Values": {"BatchSize": ...}
// after
"Values": {"ConsensusType": {"ModPolicy": "Admins", "Value": <marshaled orderer.ConsensusType{Type: "smartbft", Metadata: <smartbft.Options>}>}} Defensive patterns
Strategy: validation
Validate before calling
if conf.ChannelGroup.Groups["Orderer"].Values["ConsensusType"] == nil {
return errors.New("config is missing Orderer.ConsensusType value")
} Prevention
- Never delete orderer group values in a config update; diff with configtxlator first
- Generate channel configs only via configtxgen with a SmartBFT profile
- Assert ConsensusType presence in generated configs in CI
When it happens
Trigger: A config update (or genesis config) proposed to a SmartBFT channel whose Orderer group's Values map has no "ConsensusType" key.
Common situations: Hand-crafted channel creation configs; tooling that strips orderer values; partial config updates that accidentally remove the ConsensusType value; using templates built for a non-BFT consensus type.
Related errors
- invalid BFT metadata configuration
- unexpected envelope type %s
- empty Config
- empty channel group
- no groups in channel group
AI-assisted analysis of hyperledger/fabric@2736b63f8f (2026-09-04).
Data as JSON: /api/errors/c678159fa8456f62.
Report an issue: GitHub.