{"record":{"id":"9a7b67e8098773ac","repo":"hyperledger/fabric","slug":"failed-to-retrieve-last-config-block","errorCode":null,"errorMessage":"failed to retrieve last config block","messagePattern":"failed to retrieve last config block","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"orderer/consensus/smartbft/synchronizer_bft.go","lineNumber":186,"sourceCode":"\tf := uint64(clusterSize-1) / 3 // The number of tolerated byzantine faults\n\tlenH := uint64(len(heights))\n\n\ts.Logger.Debugf(\"Cluster size: %d, F: %d, Heights: %v\", clusterSize, f, heights)\n\n\tif lenH < f+1 {\n\t\ts.Logger.Debugf(\"Returning %d\", heights[int(lenH)-1])\n\t\treturn heights[int(lenH)-1]\n\t}\n\ts.Logger.Debugf(\"Returning %d\", heights[f])\n\treturn heights[f]\n}\n\n// createBFTDeliverer creates and initializes the BFT block deliverer.\nfunc (s *BFTSynchronizer) createBFTDeliverer(startHeight uint64, myEndpoint string) (BFTBlockDeliverer, error) {\n\tlastBlock := s.Support.Block(startHeight - 1)\n\tlastConfigBlock, err := cluster.LastConfigBlock(lastBlock, s.Support)\n\tif err != nil {\n\t\treturn nil, errors.Wrapf(err, \"failed to retrieve last config block\")\n\t}\n\tlastConfigEnv, err := deliverclient.ConfigFromBlock(lastConfigBlock)\n\tif err != nil {\n\t\treturn nil, errors.Wrapf(err, \"failed to retrieve last config envelope\")\n\t}\n\n\tvar updatableVerifier deliverclient.CloneableUpdatableBlockVerifier\n\tupdatableVerifier, err = s.VerifierFactory.CreateBlockVerifier(lastConfigBlock, lastBlock, s.CryptoProvider, s.Logger)\n\tif err != nil {\n\t\treturn nil, errors.Wrapf(err, \"failed to create BlockVerificationAssistant\")\n\t}\n\n\tclientConfig := s.ClusterDialer.Config // The cluster and block puller use slightly different options\n\tclientConfig.AsyncConnect = false\n\tclientConfig.SecOpts.VerifyCertificate = nil\n\n\t// The maximal amount of time to wait before retrying to connect.\n\tmaxRetryInterval := s.LocalConfigCluster.ReplicationRetryTimeout","sourceCodeStart":168,"sourceCodeEnd":204,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/orderer/consensus/smartbft/synchronizer_bft.go#L168-L204","documentation":"createBFTDeliverer wraps a failure of cluster.LastConfigBlock: reading the last config block number from the local block (metadata) and fetching that block from the ledger failed, so the synchronizer cannot build the block verification assistant needed to pull blocks.","triggerScenarios":"Thrown at orderer/consensus/smartbft/synchronizer_bft.go:186 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check local ledger integrity (the last block and its metadata)","Restore the ledger from a backup or rejoin the node"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}