hyperledger/fabric · error

no orderer section in config block

Error message

no orderer section in config block

What it means

When the channel's capabilities enable BFT consensus, the registrar requires the channel config to contain an Orderer section so it can obtain the list of consenters for block signature verification. If BFT is enabled but OrdererConfig() returns false, the config block lacks the Orderer group and channel creation fails.

Source

Thrown at orderer/common/multichannel/registrar.go:410

	}

	ledger, err := r.ledgerFactory.GetOrCreate(chdr.ChannelId)
	if err != nil {
		return nil, errors.WithMessagef(err, "error getting ledger for channel: %s", chdr.ChannelId)
	}

	policy, exists := bundle.PolicyManager().GetPolicy(policies.BlockValidation)
	if !exists {
		return nil, errors.New("no policies in config block")
	}

	bftEnabled := bundle.ChannelConfig().Capabilities().ConsensusTypeBFT()

	var consenters []*cb.Consenter
	if bftEnabled {
		cfg, ok := bundle.OrdererConfig()
		if !ok {
			return nil, errors.New("no orderer section in config block")
		}
		consenters = cfg.Consenters()
	}
	signatureVerifier := protoutil.BlockSignatureVerifier(bftEnabled, consenters, policy)

	return &ledgerResources{
		configResources: &configResources{
			mutableResources: channelconfig.NewBundleSource(bundle, r.callbacks...),
			bccsp:            r.bccsp,
		},
		ReadWriter:        ledger,
		signatureVerifier: signatureVerifier,
	}, nil
}

// CreateChain makes the Registrar create a consensus.Chain with the given name.
func (r *Registrar) CreateChain(chainName string) {
	lf, err := r.ledgerFactory.GetOrCreate(chainName)

View on GitHub (pinned to 2736b63f8f)

Solutions

  1. Ensure the configtx.yaml profile includes a proper Orderer section with consensus type and orderer organizations, then regenerate the channel config
  2. Either supply the Orderer section in the channel config or disable the BFT capability if running Raft/etcdraft
  3. Verify channel capabilities (channel + orderer groups) match the intended consensus type using configtxlator

Example fix

// before: BFT capability enabled but no Orderer section in profile
Channel: &ChannelCapabilities{ConsensusTypeBFT: true}
// (profile has only Application group)

// after: include Orderer section with consenters
// in configtx.yaml:
// Orderer: &OrdererDefaults
//   OrdererType: SmartBFT
//   Organizations:
//     - *OrdererOrg
//   Capabilities:
//     <<: *OrdererCapabilities
Defensive patterns

Strategy: validation

Validate before calling

// Go: check BFT capability vs Orderer section before join
bft := bundle.ChannelConfig().Capabilities().ConsensusTypeBFT()
_, hasOrderer := bundle.OrdererConfig()
if bft && !hasOrderer {
    return errors.New("BFT capability requires an Orderer config section")
}

Type guard

func bftConfigValid(bundle channelconfig.Resources) bool {
    if bundle.ChannelConfig().Capabilities().ConsensusTypeBFT() {
        _, ok := bundle.OrdererConfig()
        return ok
    }
    return true
}

Try / catch

if err := joinChannel(...); err != nil {
    if strings.Contains(err.Error(), "no orderer section") {
        // config is BFT-capable but lacks Orderer group: rebuild channel config
        return rebuildChannelConfigWithOrdererSection()
    }
    return err
}

Prevention

When it happens

Trigger: Creating/joining a channel whose capabilities enable ConsensusTypeBFT (e.g. V2_5+ BFT capability) but whose config block has no Orderer group — typically a channel created with an application-only profile or a config missing the orderer org definitions.

Common situations: BFT capability enabled in Channel capabilities but the channel was generated from a profile without Orderer section; partial config updates that removed the Orderer group; mismatched capability/config after a Fabric upgrade.

Related errors


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