hyperledger/fabric · error
cannot serve block [%d]. The ledger is bootstrapped from a s
Error message
cannot serve block [%d]. The ledger is bootstrapped from a snapshot. First available block = [%d]
What it means
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.
Source
Thrown at common/ledger/blkstorage/blockfile_mgr.go:531
func (mgr *blockfileMgr) retrieveBlockByHash(blockHash []byte) (*common.Block, error) {
logger.Debugf("retrieveBlockByHash() - blockHash = [%#v]", blockHash)
loc, err := mgr.index.getBlockLocByHash(blockHash)
if err != nil {
return nil, err
}
return mgr.fetchBlock(loc)
}
func (mgr *blockfileMgr) retrieveBlockByNumber(blockNum uint64) (*common.Block, error) {
logger.Debugf("retrieveBlockByNumber() - blockNum = [%d]", blockNum)
// interpret math.MaxUint64 as a request for last block
if blockNum == math.MaxUint64 {
blockNum = mgr.getBlockchainInfo().Height - 1
}
if blockNum < mgr.firstPossibleBlockNumberInBlockFiles() {
return nil, errors.Errorf(
"cannot serve block [%d]. The ledger is bootstrapped from a snapshot. First available block = [%d]",
blockNum, mgr.firstPossibleBlockNumberInBlockFiles(),
)
}
loc, err := mgr.index.getBlockLocByBlockNum(blockNum)
if err != nil {
return nil, err
}
return mgr.fetchBlock(loc)
}
func (mgr *blockfileMgr) retrieveBlockByTxID(txID string) (*common.Block, error) {
logger.Debugf("retrieveBlockByTxID() - txID = [%s]", txID)
loc, err := mgr.index.getBlockLocByTxID(txID)
if err == errNilValue {
return nil, errors.Errorf(
"details for the TXID [%s] not available. Ledger bootstrapped from a snapshot. First available block = [%d]",
txID, mgr.firstPossibleBlockNumberInBlockFiles(),View on GitHub (pinned to 2736b63f8f)
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
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at common/ledger/blkstorage/blockfile_mgr.go:531 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of hyperledger/fabric@2736b63f8f (2026-09-04).
Data as JSON: /api/errors/4c180265db251b6c.
Report an issue: GitHub.