{"record":{"id":"4c180265db251b6c","repo":"hyperledger/fabric","slug":"cannot-serve-block-d-the-ledger-is-bootstrappe","errorCode":null,"errorMessage":"cannot serve block [%d]. The ledger is bootstrapped from a snapshot. First available block = [%d]","messagePattern":"cannot serve block \\[(.+?)\\]\\. The ledger is bootstrapped from a snapshot\\. First available block = \\[(.+?)\\]","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"common/ledger/blkstorage/blockfile_mgr.go","lineNumber":531,"sourceCode":"\nfunc (mgr *blockfileMgr) retrieveBlockByHash(blockHash []byte) (*common.Block, error) {\n\tlogger.Debugf(\"retrieveBlockByHash() - blockHash = [%#v]\", blockHash)\n\tloc, err := mgr.index.getBlockLocByHash(blockHash)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn mgr.fetchBlock(loc)\n}\n\nfunc (mgr *blockfileMgr) retrieveBlockByNumber(blockNum uint64) (*common.Block, error) {\n\tlogger.Debugf(\"retrieveBlockByNumber() - blockNum = [%d]\", blockNum)\n\n\t// interpret math.MaxUint64 as a request for last block\n\tif blockNum == math.MaxUint64 {\n\t\tblockNum = mgr.getBlockchainInfo().Height - 1\n\t}\n\tif blockNum < mgr.firstPossibleBlockNumberInBlockFiles() {\n\t\treturn nil, errors.Errorf(\n\t\t\t\"cannot serve block [%d]. The ledger is bootstrapped from a snapshot. First available block = [%d]\",\n\t\t\tblockNum, mgr.firstPossibleBlockNumberInBlockFiles(),\n\t\t)\n\t}\n\tloc, err := mgr.index.getBlockLocByBlockNum(blockNum)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn mgr.fetchBlock(loc)\n}\n\nfunc (mgr *blockfileMgr) retrieveBlockByTxID(txID string) (*common.Block, error) {\n\tlogger.Debugf(\"retrieveBlockByTxID() - txID = [%s]\", txID)\n\tloc, err := mgr.index.getBlockLocByTxID(txID)\n\tif err == errNilValue {\n\t\treturn nil, errors.Errorf(\n\t\t\t\"details for the TXID [%s] not available. Ledger bootstrapped from a snapshot. First available block = [%d]\",\n\t\t\ttxID, mgr.firstPossibleBlockNumberInBlockFiles(),","sourceCodeStart":513,"sourceCodeEnd":549,"githubUrl":"https://github.com/hyperledger/fabric/blob/2736b63f8fd5932511d56fe68b7039d15977f7f6/common/ledger/blkstorage/blockfile_mgr.go#L513-L549","documentation":"Returned by blockfileMgr.retrieveBlockByNumber when the requested block precedes the first block available after snapshot bootstrap. A peer joined from a snapshot does not store pre-snapshot blocks, so any request below the snapshot height fails with this error naming the first served block.","triggerScenarios":"Thrown at common/ledger/blkstorage/blockfile_mgr.go:531 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Request only blocks >= the first available block shown in the error","Obtain older blocks from another peer that has full history or an archive"],"exampleFix":null,"handlingStrategy":"fallback","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"}