The fee estimate adds signer placeholders for every native script carried by a reference input, and after #595 by a spent input, even when the transaction needs none of them.
Example: Bob stores his 2-of-3 treasury multisig as a reference script in a UTxO at his own key address. He later spends that UTxO to pay Carol. The transaction needs only Bob's signature, but buildFakeWitnessSet (internal/txBuilder.ts) also adds 2 placeholders for the multisig, so the fee is estimated for 3 signatures. The transaction is still valid; Bob overpays by roughly 0.009 ADA.
The ledger only runs a script when the transaction needs it for spending, minting, a certificate, a withdrawal, a vote or a proposal (Conway UTxO.hs L95-105). The fee estimate should count signers only for native scripts whose hash is in that set, and skip scripts that are only carried by an input.
The fee estimate adds signer placeholders for every native script carried by a reference input, and after #595 by a spent input, even when the transaction needs none of them.
Example: Bob stores his 2-of-3 treasury multisig as a reference script in a UTxO at his own key address. He later spends that UTxO to pay Carol. The transaction needs only Bob's signature, but
buildFakeWitnessSet(internal/txBuilder.ts) also adds 2 placeholders for the multisig, so the fee is estimated for 3 signatures. The transaction is still valid; Bob overpays by roughly 0.009 ADA.The ledger only runs a script when the transaction needs it for spending, minting, a certificate, a withdrawal, a vote or a proposal (Conway
UTxO.hsL95-105). The fee estimate should count signers only for native scripts whose hash is in that set, and skip scripts that are only carried by an input.