hyperledger/fabric · error
<blockNumber, transactionNumber> tuple not maintained in ind
Error message
<blockNumber, transactionNumber> tuple not maintained in index
What it means
Returned by blockIndex.getTXLocByBlockNumTranNum when the <blockNumber, transactionNumber> location attribute is not indexed. It is a configuration guard: the lookup was attempted even though the index was built without that attribute.
Source
Thrown at common/ledger/blkstorage/blockindex.go:275
}
valBytes := itr.Value()
if len(valBytes) == 0 {
return nil, 0, errNilValue
}
val := &TxIDIndexValue{}
if err := proto.Unmarshal(valBytes, val); err != nil {
return nil, 0, errors.Wrapf(err, "unexpected error while unmarshalling bytes [%#v] into TxIDIndexValProto", valBytes)
}
blockNum, err := retrieveBlockNum(itr.Key(), len(rangeScan.startKey))
if err != nil {
return nil, 0, errors.WithMessage(err, "error while decoding block number from txID index key")
}
return val, blockNum, nil
}
func (index *blockIndex) getTXLocByBlockNumTranNum(blockNum uint64, tranNum uint64) (*fileLocPointer, error) {
if !index.isAttributeIndexed(IndexableAttrBlockNumTranNum) {
return nil, errors.New("<blockNumber, transactionNumber> tuple not maintained in index")
}
b, err := index.db.Get(constructBlockNumTranNumKey(blockNum, tranNum))
if err != nil {
return nil, err
}
if b == nil {
return nil, errors.Errorf("no such blockNumber, transactionNumber <%d, %d> in index", blockNum, tranNum)
}
txFLP := &fileLocPointer{}
if err := txFLP.unmarshal(b); err != nil {
return nil, err
}
return txFLP, nil
}
func (index *blockIndex) exportUniqueTxIDs(dir string, newHashFunc snapshot.NewHashFunc) (map[string][]byte, error) {
if !index.isAttributeIndexed(IndexableAttrTxID) {
return nil, errors.New("transaction IDs not maintained in index")View on GitHub (pinned to 2736b63f8f)
Solutions
- Enable the required index attribute in the peer's ledger config and re-index
- Use a TXID-based lookup instead if the TXID index is enabled
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at common/ledger/blkstorage/blockindex.go:275 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/255a9ddac00cbab5.
Report an issue: GitHub.