Case
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)
Mentioned In
Discussion
Thrown by 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.