IntersectMBO / cardano-cli

This repository contains sources for the command-line interface (CLI) tool for interacting with the Cardano blockchain.
Apache License 2.0
43 stars 15 forks source link

[FR] - Add a command to obtain the reference script size (in bytes) of a transaction #667

Closed dnadales closed 7 months ago

dnadales commented 7 months ago

Internal/External

Internal

Area

Other

Describe the feature you'd like

Ledger now requires the reference script sizes to calculate the transaction minimum fee. To obtain the minimum script size, we need the entire UTXO set, which requires querying the node. This means that to implement the calculate-min-fee without it needing to communicate with the node, we need to pass the reference script size in bytes as an extra parameter. Thus, we need a new CLI command that queries the nodes to obtain this information.

For reference, here is how the reference script size of a transaction is calculated in the ledger.

smelc commented 7 months ago

cc @CarlosLopezDeLara