{"record":{"id":"df18c9811ef0379e","repo":"hyperledger/fabric","slug":"no-policies-in-config-block","errorCode":null,"errorMessage":"no policies in config block","messagePattern":"no policies in config block","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"orderer/common/cluster/util.go","lineNumber":399,"sourceCode":"\tfor _, endpoint := range bundle.ChannelConfig().OrdererAddresses() {\n\t\tglobalEndpoints = append(globalEndpoints, EndpointCriteria{\n\t\t\tEndpoint:   endpoint,\n\t\t\tTLSRootCAs: aggregatedTLSCerts,\n\t\t})\n\t}\n\treturn globalEndpoints\n}\n\nfunc BlockVerifierBuilder(bccsp bccsp.BCCSP) func(block *common.Block) protoutil.BlockVerifierFunc {\n\treturn func(block *common.Block) protoutil.BlockVerifierFunc {\n\t\tbundle, failed := bundleFromConfigBlock(block, bccsp)\n\t\tif failed != nil {\n\t\t\treturn failed\n\t\t}\n\n\t\tpolicy, exists := bundle.PolicyManager().GetPolicy(policies.BlockValidation)\n\t\tif !exists {\n\t\t\treturn createErrorFunc(errors.New(\"no policies in config block\"))\n\t\t}\n\n\t\tbftEnabled := bundle.ChannelConfig().Capabilities().ConsensusTypeBFT()\n\n\t\tvar consenters []*common.Consenter\n\t\tif bftEnabled {\n\t\t\tcfg, ok := bundle.OrdererConfig()\n\t\t\tif !ok {\n\t\t\t\treturn createErrorFunc(errors.New(\"no orderer section in config block\"))\n\t\t\t}\n\t\t\tconsenters = cfg.Consenters()\n\t\t}\n\n\t\treturn protoutil.BlockSignatureVerifier(bftEnabled, consenters, policy)\n\t}\n}\n\nfunc bundleFromConfigBlock(block *common.Block, bccsp bccsp.BCCSP) (*channelconfig.Bundle, protoutil.BlockVerifierFunc) {","sourceCodeStart":381,"sourceCodeEnd":417,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/orderer/common/cluster/util.go#L381-L417","documentation":"When constructing the block signature verifier from a config block, the code fetches the BlockValidation policy from the bundle's policy manager. If the policy does not exist, the returned verifier always fails with this error, because blocks cannot be validated without it.","triggerScenarios":"Verifying blocks for a channel whose config block lacks the /Channel/Orderer/BlockValidation policy (or the policies subtree in general), e.g. a hand-crafted or non-standard genesis block used as the cluster verifier source.","commonSituations":"Genesis blocks generated by old or custom tooling without the standard policies section, config blocks from networks where Policies: was omitted from the Orderer group in configtx.yaml.","solutions":["Regenerate the genesis block with a configtx.yaml profile that defines Orderer: -> Policies (including BlockValidation).","Use the standard fabric sampleconfig policies as a template for the missing policy entries.","Verify the block is a genuine config block of the target channel, not one from an incompatible network.","Perform a config update adding the missing policy if the channel is already live."],"exampleFix":"// configtx.yaml before: Orderer group has no Policies\n// after:\n// Orderer:\n//   Policies:\n//     Readers:\n//     Writers:\n//     Admins:\n//     BlockValidation:\n//       Type: ImplicitMeta\n//       Rule: \"MAJORITY Writers\"","handlingStrategy":"validation","validationCode":"// Ensure the genesis profile defines policies\n// configtx.yaml must contain Orderer.Policies incl. BlockValidation\nif profile.Orderer.Policies == nil || profile.Orderer.Policies.BlockValidation == nil {\n    return errors.New(\"profile missing Orderer BlockValidation policy\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always start from the fabric sampleconfig policies section.","Run configtxgen and inspect output with configtxlator decode before channel creation.","Never delete Policies entries during config updates."],"tags":["fabric","policy","config-block"],"backgroundTag":"missing-blockvalidation-policy","analyzedSha":"2736b63f8fd5932511d56fe68b7039d15977f7f6","analyzedAt":"2026-09-04T08:52:36.465Z","contentChangedAt":"2026-09-04T08:52:36.465Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}