hyperledger/fabric · error
attempted to change consensus type from %s to %s
Error message
attempted to change consensus type from %s to %s
What it means
ValidateNew guard: an attempt to change the channel's consensus type (e.g. etcdraft to BFT) in a config update, which Fabric forbids because existing ledger data cannot be re-validated under a different consensus.
Source
Thrown at common/channelconfig/bundle.go:91
// ConfigtxValidator returns the configtx.Validator for the channel.
func (b *Bundle) ConfigtxValidator() configtx.Validator {
return b.configtxManager
}
// ValidateNew checks if a new bundle's contained configuration is valid to be derived from the current bundle.
// This allows checks of the nature "Make sure that the consensus type did not change".
func (b *Bundle) ValidateNew(nb Resources) error {
if oc, ok := b.OrdererConfig(); ok {
noc, ok := nb.OrdererConfig()
if !ok {
return errors.New("current config has orderer section, but new config does not")
}
// Prevent consensus-type migration when channel capabilities ConsensusTypeMigration is disabled
if !b.channelConfig.Capabilities().ConsensusTypeMigration() {
if oc.ConsensusType() != noc.ConsensusType() {
return errors.Errorf("attempted to change consensus type from %s to %s",
oc.ConsensusType(), noc.ConsensusType())
}
}
// When we move to capability V3_0 we insist on per Org endpoints for every org
isOldV3 := b.ChannelConfig().Capabilities().ConsensusTypeBFT()
isNewV3 := nb.ChannelConfig().Capabilities().ConsensusTypeBFT()
if !isOldV3 && isNewV3 {
for _, org := range noc.Organizations() {
if len(org.Endpoints()) == 0 {
return errors.Errorf("illegal orderer config update detected: endpoints of org %s are missing", org.Name())
}
}
}
for orgName, org := range oc.Organizations() {
norg, ok := noc.Organizations()[orgName]
if !ok {View on GitHub (pinned to 2736b63f8f)
Solutions
- Keep the existing ConsensusType value in the config update
- To migrate consensus, follow the documented channel-migration/recreation procedure instead of a plain config update
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at common/channelconfig/bundle.go:91 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/8ee4819243468197.
Report an issue: GitHub.