hyperledger/fabric · error
txid [%s]: unsuppored transaction. Transaction has already p
Error message
txid [%s]: unsuppored transaction. Transaction has already performed queries on pvt data. Writes are not allowed
What it means
checkPvtdataQueryPerformed detected that a private-data query already ran on this simulator, then a write was attempted. Writes after pvt reads are forbidden because the read set could not be validated against a stable private state.
Source
Thrown at core/ledger/kvledger/txmgmt/txmgr/tx_simulator.go:245
}
if err := s.checkPaginatedQueryPerformed(); err != nil {
return err
}
s.writePerformed = true
return s.queryExecutor.txmgr.db.ValidateKeyValue(key, value)
}
func (s *txSimulator) checkBeforePvtdataQueries() error {
if s.writePerformed {
return errors.Errorf("txid [%s]: unsuppored transaction. Queries on pvt data is supported only in a read-only transaction", s.txid)
}
s.pvtdataQueriesPerformed = true
return nil
}
func (s *txSimulator) checkPvtdataQueryPerformed() error {
if s.pvtdataQueriesPerformed {
return errors.Errorf("txid [%s]: unsuppored transaction. Transaction has already performed queries on pvt data. Writes are not allowed", s.txid)
}
return nil
}
func (s *txSimulator) checkBeforePaginatedQueries() error {
if s.writePerformed {
return errors.Errorf("txid [%s]: unsuppored transaction. Paginated queries are supported only in a read-only transaction", s.txid)
}
s.paginatedQueriesPerformed = true
return nil
}
func (s *txSimulator) checkPaginatedQueryPerformed() error {
if s.paginatedQueriesPerformed {
return errors.Errorf("txid [%s]: unsuppored transaction. Transaction has already performed a paginated query. Writes are not allowed", s.txid)
}
return nil
}View on GitHub (pinned to 2736b63f8f)
Solutions
- Move the write to a separate transaction without pvt reads
- Restructure chaincode logic to avoid read-pvt-then-write patterns
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at core/ledger/kvledger/txmgmt/txmgr/tx_simulator.go:245 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/3d37bd8e10e16616.
Report an issue: GitHub.