hyperledger/fabric · error
txRWSet.FromProtoBytes error %s
Error message
txRWSet.FromProtoBytes error %s
What it means
Returned by ValidateLSCCInvocation when txRWSet.FromProtoBytes fails to deserialize the chaincode action's results into a read-write set. The bytes exist but are corrupt or incompatible, preventing the security checks over the LSCC writes.
Source
Thrown at core/handlers/validation/builtin/v13/lscc_validation_logic.go:433
if !lscc.ChaincodeVersionRegExp.MatchString(ccVersion) {
return policyErr(errors.Errorf("invalid chaincode version '%s'", ccVersion))
}
// get the rwset
pRespPayload, err := protoutil.UnmarshalProposalResponsePayload(cap.Action.ProposalResponsePayload)
if err != nil {
return policyErr(fmt.Errorf("GetProposalResponsePayload error %s", err))
}
if pRespPayload.Extension == nil {
return policyErr(fmt.Errorf("nil pRespPayload.Extension"))
}
respPayload, err := protoutil.UnmarshalChaincodeAction(pRespPayload.Extension)
if err != nil {
return policyErr(fmt.Errorf("GetChaincodeAction error %s", err))
}
txRWSet := &rwsetutil.TxRwSet{}
if err = txRWSet.FromProtoBytes(respPayload.Results); err != nil {
return policyErr(fmt.Errorf("txRWSet.FromProtoBytes error %s", err))
}
// extract the rwset for lscc
var lsccrwset *kvrwset.KVRWSet
for _, ns := range txRWSet.NsRwSets {
logger.Debugf("Namespace %s", ns.NameSpace)
if ns.NameSpace == "lscc" {
lsccrwset = ns.KvRwSet
break
}
}
// retrieve from the ledger the entry for the chaincode at hand
cdLedger, ccExistsOnLedger, err := vscc.getInstantiatedCC(chid, cdsArgs.ChaincodeSpec.ChaincodeId.Name)
if err != nil {
return &commonerrors.VSCCExecutionFailureError{Err: err}
}
View on GitHub (pinned to 2736b63f8f)
Solutions
- Ensure the endorsing peer's simulation results serialize correctly
- Reject the transaction with corrupted rwset bytes
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at core/handlers/validation/builtin/v13/lscc_validation_logic.go:433 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/0f8c4906709364cf.
Report an issue: GitHub.