{"record":{"id":"25051992699fd258","repo":"hyperledger/fabric","slug":"cannot-define-a-new-channel-with-no-consortium-val","errorCode":null,"errorMessage":"cannot define a new channel with no Consortium value","messagePattern":"cannot define a new channel with no Consortium value","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/configtxgen/encoder/encoder.go","lineNumber":458,"sourceCode":"\t\t\treturn nil, errors.Wrap(err, \"failed to create consortium org\")\n\t\t}\n\t}\n\n\taddValue(consortiumGroup, channelconfig.ChannelCreationPolicyValue(policies.ImplicitMetaAnyPolicy(channelconfig.AdminsPolicyKey).Value()), ordererAdminsPolicyName)\n\n\tconsortiumGroup.ModPolicy = ordererAdminsPolicyName\n\treturn consortiumGroup, nil\n}\n\n// NewChannelCreateConfigUpdate generates a ConfigUpdate which can be sent to the orderer to create a new channel.  Optionally, the channel group of the\n// ordering system channel may be passed in, and the resulting ConfigUpdate will extract the appropriate versions from this file.\nfunc NewChannelCreateConfigUpdate(channelID string, conf *genesisconfig.Profile, templateConfig *cb.ConfigGroup) (*cb.ConfigUpdate, error) {\n\tif conf.Application == nil {\n\t\treturn nil, errors.New(\"cannot define a new channel with no Application section\")\n\t}\n\n\tif conf.Consortium == \"\" {\n\t\treturn nil, errors.New(\"cannot define a new channel with no Consortium value\")\n\t}\n\n\tnewChannelGroup, err := NewChannelGroup(conf)\n\tif err != nil {\n\t\treturn nil, errors.Wrapf(err, \"could not turn parse profile into channel group\")\n\t}\n\n\tupdt, err := update.Compute(&cb.Config{ChannelGroup: templateConfig}, &cb.Config{ChannelGroup: newChannelGroup})\n\tif err != nil {\n\t\treturn nil, errors.Wrapf(err, \"could not compute update\")\n\t}\n\n\t// Add the consortium name to create the channel for into the write set as required.\n\tupdt.ChannelId = channelID\n\tupdt.ReadSet.Values[channelconfig.ConsortiumKey] = &cb.ConfigValue{Version: 0}\n\tupdt.WriteSet.Values[channelconfig.ConsortiumKey] = &cb.ConfigValue{\n\t\tVersion: 0,\n\t\tValue: protoutil.MarshalOrPanic(&cb.Consortium{","sourceCodeStart":440,"sourceCodeEnd":476,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/internal/configtxgen/encoder/encoder.go#L440-L476","documentation":"NewChannelCreateConfigUpdate requires the profile to name the consortium from which the new channel's orgs will be drawn. When conf.Consortium is empty the update could not reference the consortium in the write set, so the library refuses to build a channel-creation ConfigUpdate. The consortium must exist in the system channel's Consortiums group.","triggerScenarios":"Calling NewChannelCreateConfigUpdate / MakeChannelCreationTransactionFromTemplate / MakeChannelCreationTransaction with a profile that has an Application section but no Consortium field set in configtx.yaml.","commonSituations":"Creating an application channel profile in configtx.yaml and forgetting `Consortium: SampleConsortium`; profiles copied from orderer-only templates; typos leaving the field empty after editing.","solutions":["Add `Consortium: <name>` to the channel-creation profile, matching a consortium defined in the system channel's Consortiums section.","Regenerate the channel-creation transaction with the corrected profile.","Double-check YAML indentation so the Consortium key belongs to the intended profile."],"exampleFix":"# before\nMyChannel:\n  Application:\n    Organizations:\n      - *Org1\n# after\nMyChannel:\n  Consortium: SampleConsortium\n  Application:\n    Organizations:\n      - *Org1","handlingStrategy":"validation","validationCode":"if strings.TrimSpace(profile.Consortium) == \"\" {\n    return errors.New(\"profile.Consortium must name a consortium defined in the system channel\")\n}","typeGuard":"func hasConsortium(p *genesisconfig.Profile) bool {\n    return p != nil && p.Consortium != \"\"\n}","tryCatchPattern":"_, err := encoder.NewChannelCreateConfigUpdate(channelID, profile, template)\nif err != nil && strings.Contains(err.Error(), \"no Consortium value\") {\n    return errors.New(\"add `Consortium: SampleConsortium` to the profile\")\n}","preventionTips":["Add the Consortium key to every channel-creation profile.","Match the consortium name exactly to one in the system channel's Consortiums section.","Review configtx.yaml diffs to ensure Consortium isn't dropped during edits."],"tags":["hyperledger-fabric","configtx","channel-creation","consortium"],"backgroundTag":"missing-config-section","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"}