diff --git a/src/Cardano/CLI/Run/Friendly.hs b/src/Cardano/CLI/Run/Friendly.hs index 248115dbf8..f35a1e4c4f 100644 --- a/src/Cardano/CLI/Run/Friendly.hs +++ b/src/Cardano/CLI/Run/Friendly.hs @@ -235,6 +235,7 @@ friendlyProtocolParametersUpdate , protocolUpdateMaxTxExUnits , protocolUpdateMaxValueSize , protocolUpdatePrices + , protocolUpdateUTxOCostPerByte } = object . catMaybes $ [ protocolUpdateProtocolVersion <&> \(major, minor) -> @@ -262,7 +263,7 @@ friendlyProtocolParametersUpdate ("monetary expansion" .=) . friendlyRational , protocolUpdateTreasuryCut <&> ("treasury expansion" .=) . friendlyRational , protocolUpdateUTxOCostPerWord <&> - ("UTxO storage cost per unit" .=) . friendlyLovelace + ("UTxO storage cost per word" .=) . friendlyLovelace , protocolUpdateCollateralPercent <&> ("collateral inputs share" .=) . (<> "%") . textShow , protocolUpdateMaxBlockExUnits <&> ("max block execution units" .=) @@ -270,6 +271,8 @@ friendlyProtocolParametersUpdate , protocolUpdateMaxTxExUnits <&> ("max transaction execution units" .=) , protocolUpdateMaxValueSize <&> ("max value size" .=) , protocolUpdatePrices <&> ("execution prices" .=) . friendlyPrices + , protocolUpdateUTxOCostPerByte <&> + ("UTxO storage cost per byte" .=) . friendlyLovelace ] friendlyPrices :: ExecutionUnitPrices -> Aeson.Value diff --git a/src/Cardano/CLI/Shelley/Parsers.hs b/src/Cardano/CLI/Shelley/Parsers.hs index 45eec8be4b..aa17c3bce0 100644 --- a/src/Cardano/CLI/Shelley/Parsers.hs +++ b/src/Cardano/CLI/Shelley/Parsers.hs @@ -2903,6 +2903,7 @@ pProtocolParametersUpdate = <*> optional pMaxValueSize <*> optional pCollateralPercent <*> optional pMaxCollateralInputs + <*> optional pUTxOCostPerByte pCostModels :: Parser FilePath pCostModels = @@ -3062,6 +3063,14 @@ pUTxOCostPerWord = <> Opt.help "Cost in lovelace per unit of UTxO storage (from Alonzo era)." ) +pUTxOCostPerByte :: Parser Lovelace +pUTxOCostPerByte = + Opt.option (readerFromParsecParser parseLovelace) + ( Opt.long "utxo-cost-per-byte" + <> Opt.metavar "LOVELACE" + <> Opt.help "Cost in lovelace per unit of UTxO storage (from Babbage era)." + ) + pExecutionUnitPrices :: Parser ExecutionUnitPrices pExecutionUnitPrices = ExecutionUnitPrices <$> Opt.option readRational diff --git a/test/data/golden/alonzo/transaction-view.out b/test/data/golden/alonzo/transaction-view.out index eed7291edb..be86302fa9 100644 --- a/test/data/golden/alonzo/transaction-view.out +++ b/test/data/golden/alonzo/transaction-view.out @@ -18,7 +18,7 @@ update proposal: updates: - genesis key hash: 1bafa294233a5a7ffbf539ae798da0943aa83d2a19398c2d0e5af114 update: - UTxO storage cost per unit: 194 Lovelace + UTxO storage cost per word: 194 Lovelace collateral inputs share: 200% execution prices: memory: 196/197