Skip to content

Commit 9c217ae

Browse files
Merge #4141
4141: Add utxoCostPerByte protocol parameter r=newhoggy a=newhoggy Resolves #4052 See cardano-foundation/CIPs#265 Co-authored-by: John Ky <[email protected]>
2 parents 902e2aa + 7193afe commit 9c217ae

File tree

10 files changed

+107
-66
lines changed

10 files changed

+107
-66
lines changed

cabal.project

+2-2
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,8 @@ source-repository-package
197197
source-repository-package
198198
type: git
199199
location: https://github.com/input-output-hk/cardano-ledger
200-
tag: 0913292b13963ae4b60136eddb8d18b137f96a21
201-
--sha256: 19rrnvvplvg8v989bcv6vpjwvblfa0m65izxkcp8dclf0a914qq3
200+
tag: 65292694de72f137e6b90c5f361ae7646b48775f
201+
--sha256: 05m1c7v8a2797675gkagpzl6bcjnj7w6lnx5x7hf90847ap88b05
202202
subdir:
203203
eras/alonzo/impl
204204
eras/alonzo/test-suite

cardano-api/gen/Gen/Cardano/Api/Typed.hs

+2
Original file line numberDiff line numberDiff line change
@@ -765,6 +765,7 @@ genProtocolParameters =
765765
<*> Gen.maybe genNat
766766
<*> Gen.maybe genNat
767767
<*> Gen.maybe genNat
768+
<*> Gen.maybe genLovelace
768769

769770
genProtocolParametersUpdate :: Gen ProtocolParametersUpdate
770771
genProtocolParametersUpdate = do
@@ -795,6 +796,7 @@ genProtocolParametersUpdate = do
795796
protocolUpdateMaxValueSize <- Gen.maybe genNat
796797
protocolUpdateCollateralPercent <- Gen.maybe genNat
797798
protocolUpdateMaxCollateralInputs <- Gen.maybe genNat
799+
protocolUpdateUTxOCostPerByte <- Gen.maybe genLovelace
798800
pure ProtocolParametersUpdate{..}
799801

800802

cardano-api/src/Cardano/Api/Fees.hs

-11
Original file line numberDiff line numberDiff line change
@@ -793,10 +793,6 @@ data TxBodyErrorAutoBalance =
793793
-- parameter, for eras that use this parameter.
794794
| TxBodyErrorMissingParamMinUTxO
795795

796-
-- | The 'ProtocolParameters' must provide the value for the cost per
797-
-- word parameter, for eras that use this parameter.
798-
| TxBodyErrorMissingParamCostPerWord
799-
800796
-- | The transaction validity interval is too far into the future.
801797
-- See 'TransactionValidityIntervalError' for details.
802798
| TxBodyErrorValidityInterval TransactionValidityError
@@ -856,9 +852,6 @@ instance Error TxBodyErrorAutoBalance where
856852
displayError TxBodyErrorMissingParamMinUTxO =
857853
"The minUTxOValue protocol parameter is required but missing"
858854

859-
displayError TxBodyErrorMissingParamCostPerWord =
860-
"The utxoCostPerWord protocol parameter is required but missing"
861-
862855
displayError (TxBodyErrorValidityInterval err) =
863856
displayError err
864857

@@ -1259,13 +1252,9 @@ calculateMinimumUTxO era txout@(TxOut _ v _ _) pparams' =
12591252

12601253
data MinimumUTxOError =
12611254
PParamsMinUTxOMissing
1262-
| PParamsUTxOCostPerWordMissing
12631255
deriving Show
12641256

12651257
instance Error MinimumUTxOError where
12661258
displayError PParamsMinUTxOMissing =
12671259
"\"minUtxoValue\" field not present in protocol parameters when \
12681260
\trying to calculate minimum UTxO value."
1269-
displayError PParamsUTxOCostPerWordMissing =
1270-
"\"utxoCostPerWord\" field not present in protocol parameters when \
1271-
\trying to calculate minimum UTxO value."

0 commit comments

Comments
 (0)