hyperledger/fabric · error

consenter %d in the mapping is empty

Error message

consenter %d in the mapping is empty

What it means

checkConsentersMatchPolicy guard: entry %d in the Orderers value's ConsenterMapping is nil while iterating the smartbft consenter list. A sparse/empty slot in the consenter mapping makes it impossible to build the expected signature policy.

Source

Thrown at orderer/consensus/smartbft/configverifier.go:131

	}

	if conf.ChannelGroup.Groups["Orderer"].Values["Orderers"] == nil {
		return fmt.Errorf("no values in 'Orderer' group")
	}

	ords := &common.Orderers{}
	if err := proto.Unmarshal(conf.ChannelGroup.Groups["Orderer"].Values["Orderers"].Value, ords); err != nil {
		return err
	}

	n := len(ords.ConsenterMapping)
	f := (n - 1) / 3

	var identities []*msp.MSPPrincipal
	var pols []*common.SignaturePolicy
	for i, consenter := range ords.ConsenterMapping {
		if consenter == nil {
			return fmt.Errorf("consenter %d in the mapping is empty", i)
		}
		pols = append(pols, &common.SignaturePolicy{
			Type: &common.SignaturePolicy_SignedBy{
				SignedBy: int32(i),
			},
		})
		identities = append(identities, &msp.MSPPrincipal{
			PrincipalClassification: msp.MSPPrincipal_IDENTITY,
			Principal:               protoutil.MarshalOrPanic(&msp.SerializedIdentity{Mspid: consenter.MspId, IdBytes: consenter.Identity}),
		})
	}

	quorumSize := policies.ComputeBFTQuorum(n, f)
	sp := &common.SignaturePolicyEnvelope{
		Rule:       policydsl.NOutOf(int32(quorumSize), pols),
		Identities: identities,
	}

View on GitHub (pinned to 2736b63f8f)

Solutions

  1. Rebuild the config update so every ConsenterMapping entry is fully populated
  2. Verify the tooling that produced the Orderers value did not drop an entry
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at orderer/consensus/smartbft/configverifier.go:131 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/7f6ab12236388f17. Report an issue: GitHub.