{"record":{"id":"9b32a2fbee7344b2","repo":"hyperledger/fabric","slug":"no-orderer-config-in-bundle-9b32a2","errorCode":null,"errorMessage":"no orderer config in bundle","messagePattern":"no orderer config in bundle","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"orderer/consensus/smartbft/util.go","lineNumber":410,"sourceCode":"\n// IsConsenterOfChannel returns whether the caller is a consenter of a channel\n// by inspecting the given configuration block.\n// It returns nil if true, else returns an error.\nfunc (conCert ConsenterCertificate) IsConsenterOfChannel(configBlock *cb.Block) error {\n\tif configBlock == nil {\n\t\treturn errors.New(\"nil block\")\n\t}\n\tenvelopeConfig, err := protoutil.ExtractEnvelope(configBlock, 0)\n\tif err != nil {\n\t\treturn err\n\t}\n\tbundle, err := channelconfig.NewBundleFromEnvelope(envelopeConfig, conCert.CryptoProvider)\n\tif err != nil {\n\t\treturn err\n\t}\n\toc, exists := bundle.OrdererConfig()\n\tif !exists {\n\t\treturn errors.New(\"no orderer config in bundle\")\n\t}\n\tif oc.ConsensusType() != \"BFT\" {\n\t\treturn errors.New(\"not a SmartBFT config block\")\n\t}\n\n\tfor _, consenter := range oc.Consenters() {\n\t\tif bytes.Equal(conCert.ConsenterCertificate, consenter.ServerTlsCert) || bytes.Equal(conCert.ConsenterCertificate, consenter.ClientTlsCert) {\n\t\t\treturn nil\n\t\t}\n\t}\n\treturn cluster.ErrNotInChannel\n}\n\ntype worker struct {\n\twork      [][]byte\n\tf         func([]byte)\n\tworkerNum int\n\tid        int","sourceCodeStart":392,"sourceCodeEnd":428,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/orderer/consensus/smartbft/util.go#L392-L428","documentation":"IsConsenterOfChannel builds a channelconfig.Bundle from the given config envelope and looks up the orderer configuration group. If the envelope's channel config has no Orderer group (bundle.OrdererConfig() returns exists=false), the check cannot proceed and this error is returned. It means the envelope is not a valid orderer-bearing config block.","triggerScenarios":"Calling IsConsenterOfChannel with an envelope that is not a channel config block, or a config block for a channel created without an Orderer group, or a malformed/foreign envelope passed where a config envelope was expected.","commonSituations":"Pointing a SmartBFT consenter at a block from an application-only channel; passing a tx envelope instead of a config envelope; corruption or truncation of genesis/config blocks in onboarding tooling.","solutions":["Verify the envelope is a full channel config block containing an Orderer config group","Use the channel's latest config block (fetch via configtxlator or the orderer's config block API) rather than an arbitrary block","Regenerate the genesis/config block with a valid Orderer section (e.g. configtxgen with correct configtx.yaml)","Inspect with configtxlator decode to confirm an Orderer group exists"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"bundle, err := channelconfig.NewBundleFromEnvelope(envelopeConfig, cryptoProvider)\nif err != nil { return err }\nif _, ok := bundle.OrdererConfig(); !ok {\n    return errors.New(\"envelope has no orderer config; not usable with SmartBFT\")\n}","typeGuard":"func hasOrdererConfig(b *channelconfig.Bundle) bool {\n    _, ok := b.OrdererConfig()\n    return ok\n}","tryCatchPattern":"if err := IsConsenterOfChannel(env, cert); err != nil {\n    if err.Error() == \"no orderer config in bundle\" {\n        // fetch the correct channel config block and retry\n    }\n}","preventionTips":["Always pass a full channel config block, not a transaction envelope","Verify config blocks with configtxlator before use","Ensure configtx.yaml defines an Orderer section for the channel"],"tags":["hyperledger-fabric","orderer","channelconfig","smartbft"],"backgroundTag":"missing-orderer-config","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"}