IntersectMBO / cardano-api

Cardano API
Apache License 2.0
22 stars 19 forks source link

[BUG] - `estimateTransactionKeyWitnessCount` doesn't appear to consider native (simple) scripts #551

Open sourabhxyz opened 2 months ago

sourabhxyz commented 2 months ago

Internal/External External

Area Transaction building

Summary

For transactions making use of native scripts, the required number of key witness may be more than what is returned by estimateTransactionKeyWitnessCount as it doesn't consider them (native scripts). Fwiw, the key witnesses required by native script are taken from transaction_witness_set (see attached image from Shelley ledger specification) and thus the required signatories mentioned by these scripts need not have any mention in transaction_body.

image

Wrong estimate by estimateTransactionKeyWitnessCount leads to wrong estimate of required transaction fees when building the transaction using cardano-api's makeTransactionBodyAutoBalance unless one gives appropriate key witness estimate to it.

carbolymer commented 2 months ago

cc: @Jimbo4350

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.

github-actions[bot] commented 2 weeks ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.