<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "P256K",
  "identifier" : "/documentation/P256K/secp256k1Error/invalidMuSigContribution(index:)",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "P256K"
    ],
    "preciseIdentifier" : "s:5P256K14secp256k1ErrorO24invalidMuSigContributionyACSi_tcACmF"
  },
  "title" : "secp256k1Error.invalidMuSigContribution(index:)"
}
-->

# secp256k1Error.invalidMuSigContribution(index:)

A MuSig2 partial signature was rejected for the signing session — its index
names the offending entry in the submitted `partialSignatures` array.

```
case invalidMuSigContribution(index: Int)
```

## Discussion

Thrown by [`aggregateSignatures(_:for:publicNonceAggregate:xonlyKeyAggregate:)`](/documentation/P256K/P256K/MuSig/aggregateSignatures(_:for:publicNonceAggregate:xonlyKeyAggregate:))
when the bundled partial signature fails `secp256k1_musig_partial_sig_verify`
against the session rebuilt from the declared inputs, or when its carried
signer identity is not a session participant — including a duplicate
contribution that exceeds that signer’s position count in the aggregated
key list. The enum declares `Equatable`/`Hashable` explicitly because the
associated value ends the implicit conformances a payload-free enum
receives; equality compares case and index.

BIP-327 calls this “identifying disruptive signers”: the associated index
lets the aggregator blame and evict the faulty cosigner without a second
verification pass, matching the `signer_index` field upstream’s own test
vectors use to name the failing party.