hyperledger/fabric · error
no such transaction ID [%s] in index
Error message
no such transaction ID [%s] in index
What it means
Returned by blockIndex.getTxIDVal when a range scan over the TxID index finds no entry for the given transaction ID — the iterator is positioned but the key does not exist. It means the transaction was never committed/recorded in this peer's block index (or the index was built without the TxID attribute populated for it), as opposed to an index-configuration or LevelDB read failure, which are reported separately.
Source
Thrown at common/ledger/blkstorage/blockindex.go:256
}
func (index *blockIndex) getTxIDVal(txID string) (*TxIDIndexValue, uint64, error) {
if !index.isAttributeIndexed(IndexableAttrTxID) {
return nil, 0, errors.New("transaction IDs not maintained in index")
}
rangeScan := constructTxIDRangeScan(txID)
itr, err := index.db.GetIterator(rangeScan.startKey, rangeScan.stopKey)
if err != nil {
return nil, 0, errors.WithMessagef(err, "error while trying to retrieve transaction info by TXID [%s]", txID)
}
defer itr.Release()
present := itr.Next()
if err := itr.Error(); err != nil {
return nil, 0, errors.Wrapf(err, "error while trying to retrieve transaction info by TXID [%s]", txID)
}
if !present {
return nil, 0, errors.Errorf("no such transaction ID [%s] in index", txID)
}
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) {View on GitHub (pinned to 2736b63f8f)
Solutions
- Verify the TXID is correct and belongs to this channel
- If history was pruned/snapshotted, query a peer with full history
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at common/ledger/blkstorage/blockindex.go:256 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/b426038e11b99c8d.
Report an issue: GitHub.