{"record":{"id":"508614e0f6edf76b","repo":"hyperledger/fabric","slug":"transaction-of-type-s-is-not-allowed-to-be-includ","errorCode":null,"errorMessage":"transaction of type %s is not allowed to be included in blocks","messagePattern":"transaction of type (.+?) is not allowed to be included in blocks","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"orderer/consensus/smartbft/verifier.go","lineNumber":188,"sourceCode":"\tif err != nil {\n\t\treturn types.RequestInfo{}, errors.Wrap(err, \"access denied\")\n\t}\n\n\tif noConfigAllowed && req.chHdr.Type != int32(cb.HeaderType_ENDORSER_TRANSACTION) {\n\t\treturn types.RequestInfo{}, errors.Errorf(\"only endorser transactions can be sent with other transactions\")\n\t}\n\n\tif req.chHdr.ChannelId != v.Channel {\n\t\treturn types.RequestInfo{}, errors.Errorf(\"request is for channel %s but expected channel %s\", req.chHdr.ChannelId, v.Channel)\n\t}\n\n\tswitch req.chHdr.Type {\n\tcase int32(cb.HeaderType_CONFIG):\n\tcase int32(cb.HeaderType_ORDERER_TRANSACTION):\n\t\treturn types.RequestInfo{}, fmt.Errorf(\"orderer transactions are not supported in v3\")\n\tcase int32(cb.HeaderType_ENDORSER_TRANSACTION):\n\tdefault:\n\t\treturn types.RequestInfo{}, errors.Errorf(\"transaction of type %s is not allowed to be included in blocks\", cb.HeaderType_name[req.chHdr.Type])\n\t}\n\n\tif req.chHdr.Type == int32(cb.HeaderType_CONFIG) {\n\t\terr = v.ConfigValidator.ValidateConfig(req.envelope)\n\t\tif err != nil {\n\t\t\tv.Logger.Errorf(\"Error verifying config update: %v\", err)\n\t\t\treturn types.RequestInfo{}, err\n\t\t}\n\n\t\treqID := v.ReqInspector.RequestID(rawRequest)\n\t\tif v.ReqInspector.isEmpty(reqID) {\n\t\t\treturn types.RequestInfo{}, errors.Errorf(\"request id is empty\")\n\t\t}\n\n\t\treturn reqID, nil\n\t}\n\n\treturn v.ReqInspector.requestIDFromSigHeader(req.sigHdr)","sourceCodeStart":170,"sourceCodeEnd":206,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/orderer/consensus/smartbft/verifier.go#L170-L206","documentation":"Any request whose header type is not CONFIG, ORDERER_TRANSACTION, or ENDORSER_TRANSACTION falls into the default branch and is rejected — the BFT block format only permits known transaction types. The offending type name is interpolated from cb.HeaderType_name.","triggerScenarios":"Submitting envelopes with unusual header types (e.g. DELIVER_SEEK_INFO, PEEr_RESOURCE_UPDATE or an unknown numeric type) to the SmartBFT request path.","commonSituations":"Custom or buggy client tooling crafting envelopes with wrong header types; SDK misuse building raw envelopes; corrupted headers after tampering or bad serialization.","solutions":["Submit only ENDORSER_TRANSACTION (application) or CONFIG envelopes to BFT channels","Fix the client code/SDK to set cb.HeaderType_ENDORSER_TRANSACTION for regular transactions","Inspect the envelope header with configtxlator decode to find the offending type and rebuild it"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"switch hdr.Type {\ncase int32(cb.HeaderType_CONFIG), int32(cb.HeaderType_ENDORSER_TRANSACTION):\n    // ok\ndefault:\n    return fmt.Errorf(\"type %s not allowed in BFT blocks\", cb.HeaderType_name[hdr.Type])\n}","typeGuard":"func allowedInBFT(t int32) bool {\n    _, ok := map[int32]bool{\n        int32(cb.HeaderType_CONFIG): true,\n        int32(cb.HeaderType_ENDORSER_TRANSACTION): true,\n    }[t]\n    return ok\n}","tryCatchPattern":"if _, err := VerifyRequest(req); err != nil {\n    if strings.Contains(err.Error(), \"not allowed to be included in blocks\") {\n        // decode header and rebuild envelope with correct type\n    }\n}","preventionTips":["Only send endorsed transactions or config updates","Validate envelope headers with configtxlator before submit","Avoid custom envelope-crafting code; use maintained SDKs"],"tags":["hyperledger-fabric","smartbft","transaction-type","envelope"],"backgroundTag":"invalid-transaction-type","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"}