GTH-692: Don't add collateral when not needed#780
Conversation
| total collateral: Value (Map [(,Map [("",276566)])]) | ||
| mint: Value (Map []) | ||
| fee: Value (Map [(,Map [("",184377)])]) | ||
| fee: Value (Map [(,Map [("",176237)])]) |
bd22d96 to
e6f7385
Compare
| tx1 = Constraints.mustPayToTheScriptWithDatumInTx onChainTxOutRefs | ||
| $ Ada.lovelaceValueOf baseLovelaceLockedByScript | ||
| tx1 = Constraints.mustPayToTheScriptWithDatumInTx onChainTxOutRefs (Ada.lovelaceValueOf baseLovelaceLockedByScript) | ||
| <> foldMap Constraints.mustBeSignedBy keys |
There was a problem hiding this comment.
Good question! Or rather, I wonder why it wasn't needed before. Without it the fee was estimated too low, since it didn't know there was going to be a second signature.
The only explanation I can think of is that the fee estimation was higher because of the collateral inputs, but the actual fee turned out lower because the collateral inputs were not actually used, leaving enough room to cover for the extra signature?
There was a problem hiding this comment.
That's possible. Not to worry. Thanks!
There was a problem hiding this comment.
Actually, something to note is that mustBeSignedBy includes required signer in the txbody, which is redundant in the case where onchain validation for this witness is not performed.
It would be good to have a means of telling the balancer of the extra witness without bloating txbody. Worth a ticket?
e6f7385 to
a9d0232
Compare
Fixes #692
Pre-submit checklist: