{"record":{"id":"60436ec3c52692a4","repo":"hyperledger/fabric","slug":"bad-config-message-s","errorCode":null,"errorMessage":"bad config message: %s","messagePattern":"bad config message: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"orderer/consensus/etcdraft/chain.go","lineNumber":937,"sourceCode":"//\t-- err error; the error encountered, if any.\n//\n// It takes care of config messages as well as the revalidation of messages if the config sequence has advanced.\nfunc (c *Chain) ordered(msg *orderer.SubmitRequest) (batches [][]*common.Envelope, pending bool, err error) {\n\tseq := c.support.Sequence()\n\n\tisconfig, err := c.isConfig(msg.GetPayload())\n\tif err != nil {\n\t\treturn nil, false, errors.Errorf(\"bad message: %s\", err)\n\t}\n\n\tif isconfig {\n\t\t// ConfigMsg\n\t\tif msg.GetLastValidationSeq() < seq {\n\t\t\tc.logger.Warnf(\"Config message was validated against %d, although current config seq has advanced (%d)\", msg.GetLastValidationSeq(), seq)\n\t\t\tmsg.Payload, _, err = c.support.ProcessConfigMsg(msg.GetPayload())\n\t\t\tif err != nil {\n\t\t\t\tc.Metrics.ProposalFailures.Add(1)\n\t\t\t\treturn nil, true, errors.Errorf(\"bad config message: %s\", err)\n\t\t\t}\n\t\t}\n\n\t\tif c.checkForEvictionNCertRotation(msg.GetPayload()) {\n\n\t\t\tif !atomic.CompareAndSwapUint32(&c.leadershipTransferInProgress, 0, 1) {\n\t\t\t\tc.logger.Warnf(\"A reconfiguration transaction is already in progress, ignoring a subsequent transaction\")\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tgo func() {\n\t\t\t\tdefer atomic.StoreUint32(&c.leadershipTransferInProgress, 0)\n\n\t\t\t\tabdicated := false\n\t\t\t\tfor attempt := 1; attempt <= AbdicationMaxAttempts; attempt++ {\n\t\t\t\t\tif err := c.Node.abdicateLeadership(); err != nil {\n\t\t\t\t\t\t// If there is no leader, abort and do not retry.\n\t\t\t\t\t\t// Return early to prevent re-submission of the transaction","sourceCodeStart":919,"sourceCodeEnd":955,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/orderer/consensus/etcdraft/chain.go#L919-L955","documentation":"Returned when a config-type message fails revalidation via support.ProcessConfigMsg after the config sequence has advanced since it was signed. The message was classified as a config update, but its content cannot be processed into a valid config envelope, so it is rejected as pending.","triggerScenarios":"A config update envelope signed against an older config seq is submitted; ProcessConfigMsg re-processing fails because the update is invalid against the new config — wrong signature set, modified payload, unsupported change, or malformed ConfigUpdate.","commonSituations":"Submitting a stale config update after another config change landed on the channel; config update signed by an admin whose certificate was rotated out; hand-built config updates missing required fields.","solutions":["Read the inner error for the exact ProcessConfigMsg failure.","Re-fetch the latest channel config, re-apply the change with configtxlator, re-sign with current admin certs, and resubmit.","Ensure the submitting admin identity is still a valid channel/orderer admin.","Validate the computed config update with configtxlator before submitting."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"env := &common.Envelope{...}\nif err := proto.Unmarshal(rawTx, env); err != nil { return err }\npayload := &common.Payload{}\nif err := proto.Unmarshal(env.Payload, payload); err != nil {\n    return fmt.Errorf(\"payload not a valid protobuf Payload: %w\", err)\n}\nif payload.Header == nil || payload.Header.ChannelHeader == nil {\n    return errors.New(\"missing channel header\")\n}","typeGuard":"func isWellFormedEnvelope(raw []byte) bool {\n    env := &common.Envelope{}\n    return proto.Unmarshal(raw, env) == nil && len(env.Payload) > 0\n}","tryCatchPattern":"if strings.HasPrefix(err.Error(), \"bad message:\") {\n    log.Printf(\"envelope rejected: %v\", err)\n    // do not retry; rebuild the transaction\n}","preventionTips":["Build transactions with a supported SDK only.","Verify channel name before submit.","Do not hand-craft protobuf envelopes.","Pin SDK and Fabric versions."],"tags":["hyperledger-fabric","etcdraft","config-update","validation"],"backgroundTag":"bad-config-message","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"}