hyperledger/fabric · error
no `%s` policy in config block
Error message
no `%s` policy in config block
What it means
VerifierFromConfig builds a block signature verifier from a config bundle and requires the channel's BlockValidation policy (policies.BlockValidation). If the bundle's policy manager does not expose that policy, this error is thrown and a permanently-failing verifier function is returned. It means the config block is not a usable channel config for delivery verification.
Source
Thrown at common/deliverclient/verifier_assembler.go:40
}
}
// BlockVerifierAssembler creates a BlockVerifier out of a config envelope
type BlockVerifierAssembler struct {
Logger *flogging.FabricLogger
BCCSP bccsp.BCCSP
}
// VerifierFromConfig creates a BlockVerifier from the given configuration.
func (bva *BlockVerifierAssembler) VerifierFromConfig(configuration *common.ConfigEnvelope, channel string) (protoutil.BlockVerifierFunc, error) {
bundle, err := channelconfig.NewBundle(channel, configuration.Config, bva.BCCSP)
if err != nil {
return createErrorFunc(err), err
}
policy, exists := bundle.PolicyManager().GetPolicy(policies.BlockValidation)
if !exists {
err := errors.Errorf("no `%s` policy in config block", policies.BlockValidation)
return createErrorFunc(err), err
}
bftEnabled := bundle.ChannelConfig().Capabilities().ConsensusTypeBFT()
var consenters []*common.Consenter
if bftEnabled {
cfg, ok := bundle.OrdererConfig()
if !ok {
err := errors.New("no orderer section in config block")
return createErrorFunc(err), err
}
consenters = cfg.Consenters()
}
return protoutil.BlockSignatureVerifier(bftEnabled, consenters, policy), nil
}
View on GitHub (pinned to 2736b63f8f)
Solutions
- Regenerate the channel config/genesis block with standard policy defaults (configtxgen with the reference sampleconfig policies).
- Inspect the config block (configtxlator) and add a BlockValidation policy under the channel/orderer policies section.
- Ensure you pass the application channel's config block, not the ordering system channel or a different block.
- Update the peer/orderer to a version matching the channel's policy layout if versions diverged.
Example fix
// before (configtx.yaml missing policy)
Orderer:
Policies:
Readers: ...
Writers: ...
// after
Orderer:
Policies:
Readers: ...
Writers: ...
BlockValidation:
Type: ImplicitMeta
Rule: "MAJORITY Writers" Defensive patterns
Strategy: validation
Validate before calling
bundle, err := channelconfig.NewBundleFromEnvelope(env)
if err != nil { return err }
if _, ok := bundle.PolicyManager().GetPolicy(policies.BlockValidation); !ok {
return errors.New("config block has no BlockValidation policy; regenerate channel config")
} Type guard
func hasBlockValidationPolicy(bundle channelconfig.Resources) bool {
_, ok := bundle.PolicyManager().GetPolicy(policies.BlockValidation)
return ok
} Try / catch
verifier, err := assembler.VerifierFromConfig(env, chID)
if err != nil && strings.Contains(err.Error(), "policy in config block") {
return fmt.Errorf("channel %s config is missing BlockValidation policy; regenerate via configtxgen: %w", chID, err)
} Prevention
- Use standard configtxgen profiles that include all default orderer/channel policies.
- Inspect generated genesis blocks with configtxlator before first use.
- Distinguish application channel blocks from system channel / orderer genesis blocks.
- Test channel config changes in a staging network before updating production channels.
When it happens
Trigger: Calling VerifierFromConfig with a config envelope whose policy manager has no '/Channel/Application/BlockValidation'-style BlockValidation policy — typically a config block generated without orderer policies or a non-channel (e.g. system-level) config.
Common situations: Using configtxgen output where BlockValidation was removed or renamed; passing an orderer system-chain genesis block instead of an application channel config block; upgrading Fabric across versions where policy defaults changed.
Related errors
- Empty policy element
- no channel configuration found in the config block
- missing policy at path: %s
- ConfigPolicy not found at policy path: %s
- unexpected missing policy %s for item %s
AI-assisted analysis of hyperledger/fabric@2736b63f8f (2026-09-04).
Data as JSON: /api/errors/8e2910d292c47bc0.
Report an issue: GitHub.