hyperledger/fabric · error

attempted to change consensus type from %s to %s, transition

Error message

attempted to change consensus type from %s to %s, transition not supported

What it means

Thrown by inspect in the maintenance filter when a config update tries to change the consensus type to a type that is not in mf.permittedTargetConsensusTypes, even though both current and next configs are in maintenance mode. The orderer only allows transitions to explicitly permitted target consensus types, so unsupported direct transitions are rejected.

Source

Thrown at orderer/common/msgprocessor/maintenancefilter.go:133

			return errors.Errorf("attempted to change ConsensusType.Metadata, but ConsensusType.State is changing from %s to %s",
				ordererConfig.ConsensusState(), nextOrdererConfig.ConsensusState())
		}
	}

	// ConsensusType.Type can only change in maintenance-mode, and only within the set of permitted types.
	// Note: only etcdraft to BFT transitions are supported.
	if ordererConfig.ConsensusType() != nextOrdererConfig.ConsensusType() {
		if ordererConfig.ConsensusState() == orderer.ConsensusType_STATE_NORMAL {
			return errors.Errorf("attempted to change consensus type from %s to %s, but current config ConsensusType.State is not in maintenance mode",
				ordererConfig.ConsensusType(), nextOrdererConfig.ConsensusType())
		}
		if nextOrdererConfig.ConsensusState() == orderer.ConsensusType_STATE_NORMAL {
			return errors.Errorf("attempted to change consensus type from %s to %s, but next config ConsensusType.State is not in maintenance mode",
				ordererConfig.ConsensusType(), nextOrdererConfig.ConsensusType())
		}

		if !mf.permittedTargetConsensusTypes[nextOrdererConfig.ConsensusType()] {
			return errors.Errorf("attempted to change consensus type from %s to %s, transition not supported",
				ordererConfig.ConsensusType(), nextOrdererConfig.ConsensusType())
		}

		if nextOrdererConfig.ConsensusType() == "BFT" {
			updatedMetadata := &smartbft.Options{}
			if err := proto.Unmarshal(nextOrdererConfig.ConsensusMetadata(), updatedMetadata); err != nil {
				return errors.Wrap(err, "failed to unmarshal BFT metadata configuration")
			}

			_, err := util.ConfigFromMetadataOptions(1, updatedMetadata)
			if err != nil {
				return errors.New("invalid BFT metadata configuration")
			}

			err = validateBFTConsenterMapping(ordererConfig, nextOrdererConfig)
			if err != nil {
				return errors.Wrap(err, "invalid BFT consenter mapping configuration")
			}

View on GitHub (pinned to 2736b63f8f)

Solutions

  1. Use a supported target consensus type for the migration (e.g. etcdraft or BFT as permitted by your Fabric version)
  2. Check the permittedTargetConsensusTypes configured on the orderers and align the update with it
  3. Fix the consensus type spelling in the config update if it was a typo
  4. If a multi-hop transition is needed, migrate through an intermediate permitted type in separate maintenance-mode updates

Example fix

// before: unsupported transition
"ConsensusType": { "State": "STATE_MAINTENANCE", "Type": "solo" }
// after: permitted target type
"ConsensusType": { "State": "STATE_MAINTENANCE", "Type": "BFT" }
Defensive patterns

Strategy: validation

Validate before calling

var permitted = map[string]bool{"etcdraft": true, "BFT": true}
if next.Type != cur.Type && !permitted[next.Type] {
    return fmt.Errorf("target consensus type %q is not a permitted migration target", next.Type)
}

Prevention

When it happens

Trigger: In maintenance mode, submitting a config update whose Orderer group changes consensus type to a value not whitelisted as a permitted target (e.g. an unsupported type string, or a transition the deployment does not allow).

Common situations: Attempting a consensus type migration to a consensus plugin the network does not support (e.g. solo to something on newer versions where it was removed), or a typo in the consensus type name in the config update.

Related errors


AI-assisted analysis of hyperledger/fabric@2736b63f8f (2026-09-04). Data as JSON: /api/errors/c3cb158713d84173. Report an issue: GitHub.