{"record":{"id":"28373609ef2c9add","repo":"hyperledger/fabric","slug":"transaction-is-aimed-at-channel-s-but-our-channel","errorCode":null,"errorMessage":"transaction is aimed at channel %s but our channel is %s","messagePattern":"transaction is aimed at channel (.+?) but our channel is (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"orderer/consensus/smartbft/configverifier.go","lineNumber":225,"sourceCode":"\t}\n\n\ttyp := common.HeaderType(chdr.Type)\n\n\tcbv.Logger.Infof(\"Applying filters for config update of type %s to channel %s\", typ, chdr.ChannelId)\n\n\t// First apply the filters on the outer envelope, regardless of the type of transaction it is.\n\tif err := cbv.Filters.ApplyFilters(chdr.ChannelId, outEnv); err != nil {\n\t\treturn err\n\t}\n\n\tvar expectedConfigEnv *common.ConfigEnvelope\n\tchannelID, err := protoutil.ChannelID(confEnv.LastUpdate)\n\tif err != nil {\n\t\treturn errors.Errorf(\"error extracting channel ID from config update\")\n\t}\n\n\tif cbv.ValidatingChannel != channelID {\n\t\treturn errors.Errorf(\"transaction is aimed at channel %s but our channel is %s\", channelID, cbv.ValidatingChannel)\n\t} else {\n\t\texpectedConfigEnv, err = cbv.ConfigUpdateProposer.ProposeConfigUpdate(chdr.ChannelId, confEnv.LastUpdate)\n\t\tif err != nil {\n\t\t\tcbv.Logger.Errorf(\"Rejecting config proposal due to %v\", err)\n\t\t\treturn err\n\t\t}\n\t}\n\n\tif err := cbv.checkConsentersMatchPolicy(confEnv.Config); err != nil {\n\t\treturn err\n\t}\n\n\t// Extract the Config from the result of ProposeConfigUpdate, and compare it\n\t// with the pending config.\n\tif proto.Equal(confEnv.Config, expectedConfigEnv.Config) {\n\t\treturn nil\n\t}\n\tcbv.Logger.Errorf(\"Pending Config is %v, but it should be %v\", confEnv.Config, expectedConfigEnv.Config)","sourceCodeStart":207,"sourceCodeEnd":243,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/orderer/consensus/smartbft/configverifier.go#L207-L243","documentation":"The channel ID extracted from the config update does not match the channel this SmartBFT validator is validating (cbv.ValidatingChannel). A config transaction for one channel must never be applied to another, so it is rejected with both IDs in the message.","triggerScenarios":"verifyConfigUpdateMsg compares channelID (from the inner envelope) against cbv.ValidatingChannel and they differ — e.g. the update envelope was broadcast to the wrong channel's ordering service.","commonSituations":"Reusing a config update envelope built for another channel; copy-paste of envelope bytes between channel tests; multi-channel deployments where the client targets the wrong channel in the submit call.","solutions":["Regenerate the config update envelope for the correct channel so ChannelHeader.ChannelId equals the target channel","Submit the envelope to the correct channel's ordering endpoint","Double-check any scripted workflows that copy envelopes across channels"],"exampleFix":"// before\nchdr := &common.ChannelHeader{ChannelId: \"channel-a\"} // submitted to channel-b\n// after\nchdr := &common.ChannelHeader{ChannelId: \"channel-b\"} // matches target channel","handlingStrategy":"validation","validationCode":"if channelID != validatingChannel {\n    return fmt.Errorf(\"refusing to submit: update targets %s, expected %s\", channelID, validatingChannel)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Confirm ChannelHeader.ChannelId matches the channel you broadcast to","Never reuse envelopes across channels in scripts or tests","Log the target channel at submit time in automation"],"tags":["hyperledger-fabric","smartbft","channel-mismatch","config-validation"],"backgroundTag":"channel-mismatch","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"}