Duplicate signer
The transaction includes the same account as a signer more than once, or the same instruction appears twice. The runtime rejects the transaction before it reaches any program.
Common causes
- Same signer added twice. You added the same
KeypairorPublicKeyto the signers array more than once when building the transaction. - Payer is also a signer. The fee payer is automatically a signer. If you also add it explicitly to the signers list, it appears twice.
- Duplicate instructions. Two identical instructions (same program, same accounts, same data) are included in the transaction.
- SDK helper double-signs. Some SDK helpers like
sendAndConfirmTransactionautomatically sign with the payer. If you pre-sign the transaction with the same keypair, the signature appears twice.
How to fix
- Deduplicate signers. Before signing, ensure each keypair appears only once:
const uniqueSigners = [...new Map(
signers.map(s => [s.publicKey.toBase58(), s])
).values()];
- Do not re-add the payer. If you set the fee payer, do not also add it to the signers array. The SDK adds the payer’s signature automatically.
- Check for duplicate instructions. Review your transaction to ensure you are not adding the same instruction twice.
Transaction structure
A Solana transaction contains:
| Field | Description |
|---|---|
signatures | One per unique signer, in the order they appear in account keys |
message.accountKeys | Deduplicated list of all accounts referenced |
message.instructions | List of instructions to execute |
The runtime requires that each entry in signatures corresponds to a unique account in accountKeys. A duplicate causes rejection before execution.
FAQ
Is this the same as DuplicateInstruction?
They are related but not identical. DuplicateInstruction means two instructions in the transaction are byte-for-byte identical. Duplicate signer means the same public key appears twice in the signer slots. Both are rejected at the transaction level.
Can the same account appear in multiple instructions? Yes. An account can be referenced by many instructions in the same transaction. The restriction is only on the signers array having duplicates.
Does VersionedTransaction have the same restriction?
Yes. Both legacy and versioned transactions reject duplicate signers.
Error text variants
-
Duplicate signer -
DuplicateInstruction -
Transaction contains a duplicate instruction that is not allowed
Updated: