diff --git a/eras/conway/impl/src/Cardano/Ledger/Conway/Rules/Bbody.hs b/eras/conway/impl/src/Cardano/Ledger/Conway/Rules/Bbody.hs index 19ef90b041a..bcb5acd681b 100644 --- a/eras/conway/impl/src/Cardano/Ledger/Conway/Rules/Bbody.hs +++ b/eras/conway/impl/src/Cardano/Ledger/Conway/Rules/Bbody.hs @@ -104,6 +104,11 @@ data ConwayBbodyPredFailure era !ExUnits -- | Maximum allowed by protocal parameters !ExUnits + | RefScriptsSizeTooBig + -- | Computed sum of reference script size + Int + -- | Maximum allowed total reference script size + Int deriving (Generic) deriving instance @@ -130,6 +135,7 @@ instance InvalidBodyHashBBODY x y -> Sum (InvalidBodyHashBBODY @era) 1 !> To x !> To y LedgersFailure x -> Sum (LedgersFailure @era) 2 !> To x TooManyExUnits x y -> Sum TooManyExUnits 3 !> To x !> To y + RefScriptsSizeTooBig x y -> Sum RefScriptsSizeTooBig 4 !> To x !> To y instance ( Era era @@ -142,6 +148,7 @@ instance 1 -> SumD InvalidBodyHashBBODY SumD LedgersFailure SumD TooManyExUnits SumD RefScriptsSizeTooBig Invalid n type instance EraRuleFailure "BBODY" (ConwayEra c) = ConwayBbodyPredFailure (ConwayEra c) diff --git a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Generic/PrettyCore.hs b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Generic/PrettyCore.hs index f919af56355..75e81ab9c54 100644 --- a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Generic/PrettyCore.hs +++ b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Generic/PrettyCore.hs @@ -1656,6 +1656,12 @@ instance Reflect era => PrettyA (ShelleyBbodyPredFailure era) where -- ================ ppConwayBbodyPredFail :: forall era. Reflect era => ConwayBbodyPredFailure era -> PDoc +ppConwayBbodyPredFail (ConwayRules.RefScriptsSizeTooBig s1 s2) = + ppRecord + "RefScriptsSizeTooBig" + [ ("Computed sum of reference script size", ppInt s1) + , ("Maximum allowed total reference script size", ppInt s2) + ] ppConwayBbodyPredFail (ConwayRules.TooManyExUnits e1 e2) = ppRecord "TooManyExUnits"