hyperledger/fabric · error

empty creator

Error message

empty creator

What it means

This error is thrown by the endorser transaction parser's validate() method when the transaction's creator identity (serialized identity bytes in the proposal header) is empty. The library requires a non-empty creator to attribute the transaction to a client and later verify its signature. Without a creator the transaction cannot be authenticated, so it is rejected before further validation.

Source

Thrown at core/tx/endorser/parser.go:145

func (e *EndorserTx) validate() error {
	if e.Epoch != 0 {
		return errors.Errorf("invalid epoch in ChannelHeader. Expected 0, got [%d]", e.Epoch)
	}

	if e.Version != 0 {
		return errors.Errorf("invalid version in ChannelHeader. Expected 0, got [%d]", e.Version)
	}

	if err := ValidateChannelID(e.ChannelID); err != nil {
		return err
	}

	if len(e.Nonce) == 0 {
		return errors.New("empty nonce")
	}

	if len(e.Creator) == 0 {
		return errors.New("empty creator")
	}

	if e.ChaincodeID == nil {
		return errors.New("nil ChaincodeId")
	}

	if e.ChaincodeID.Name == "" {
		return errors.New("empty chaincode name in chaincode id")
	}

	// TODO FAB-16170: check proposal hash

	// TODO FAB-16170: verify that txid matches the one in the header

	// TODO FAB-16170: check that header in the tx action and channel header match bitwise

	return nil
}

View on GitHub (pinned to 2736b63f8f)

Solutions

  1. Set SignatureHeader.Creator to the serialized client identity (via mspmgmt.GetLocalSigningIdentityOrPanic().Serialize() or the SDK's identity context) before submitting.
  2. If constructing a Payload programmatically, copy the Creator from a successfully-signed proposal generated by the SDK.
  3. Add a pre-submit check len(sigHeader.Creator) > 0 in your client code to fail fast with a clearer message.

Example fix

// before
sh := &common.SignatureHeader{Nonce: nonce}
// after
creator, err := mspmgmt.GetLocalMSP().GetDefaultSigningIdentity().Serialize()
if err != nil { return err }
sh := &common.SignatureHeader{Nonce: nonce, Creator: creator}
Defensive patterns

Strategy: validation

Validate before calling

if len(sigHeader.Creator) == 0 { return errors.New("proposal creator identity is empty; set SignatureHeader.Creator") }

Type guard

func hasCreator(sh *common.SignatureHeader) bool { return sh != nil && len(sh.Creator) > 0 }

Prevention

When it happens

Trigger: Calling the transaction validation path on a SignedProposal/Payload whose SignatureHeader.Creator byte slice has length 0 — e.g. a programmatically constructed proposal where the creator was never set via a serialized identity.

Common situations: Building raw proposals or envelopes with the low-level protoutil APIs instead of the SDK; forgetting to call localmsp/identity serializer to fill SignatureHeader.Creator; test harnesses that populate nonce but not creator; protobuf unmarshalling failures silently leaving Creator nil.

Related errors


AI-assisted analysis of hyperledger/fabric@2736b63f8f (2026-09-04). Data as JSON: /api/errors/7514e687a893ac8e. Report an issue: GitHub.