{-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} module Test.Cardano.Ledger.Conway.Imp (spec, conwaySpec) where import Cardano.Ledger.Alonzo.Plutus.Context ( EraPlutusContext (ContextError), EraPlutusTxInfo, ) import Cardano.Ledger.Alonzo.Rules ( AlonzoUtxoPredFailure, AlonzoUtxosPredFailure, AlonzoUtxowPredFailure, ) import Cardano.Ledger.Babbage.Rules (BabbageUtxoPredFailure, BabbageUtxowPredFailure) import Cardano.Ledger.Babbage.TxInfo (BabbageContextError) import Cardano.Ledger.BaseTypes (Inject) import Cardano.Ledger.Conway.Core import Cardano.Ledger.Conway.Rules ( ConwayBbodyPredFailure, ConwayCertsPredFailure, ConwayDelegPredFailure, ConwayEpochEvent, ConwayGovCertPredFailure, ConwayGovPredFailure, ConwayHardForkEvent, ConwayLedgerPredFailure, ConwayNewEpochEvent, ConwayUtxoPredFailure, ConwayUtxowPredFailure, ) import Cardano.Ledger.Conway.TxInfo (ConwayContextError) import Cardano.Ledger.Plutus (Language (..)) import Cardano.Ledger.Shelley.API.Mempool (ApplyTx (..)) import Cardano.Ledger.Shelley.Rules ( ShelleyDelegPredFailure, ShelleyPoolPredFailure, ShelleyUtxoPredFailure, ShelleyUtxowPredFailure, ) import Control.State.Transition.Extended import Data.Typeable (Typeable) import qualified Test.Cardano.Ledger.Babbage.Imp as BabbageImp import qualified Test.Cardano.Ledger.Conway.Imp.BbodySpec as Bbody import qualified Test.Cardano.Ledger.Conway.Imp.CertsSpec as Certs import qualified Test.Cardano.Ledger.Conway.Imp.DelegSpec as Deleg import qualified Test.Cardano.Ledger.Conway.Imp.EnactSpec as Enact import qualified Test.Cardano.Ledger.Conway.Imp.EpochSpec as Epoch import qualified Test.Cardano.Ledger.Conway.Imp.GovCertSpec as GovCert import qualified Test.Cardano.Ledger.Conway.Imp.GovSpec as Gov import qualified Test.Cardano.Ledger.Conway.Imp.HardForkSpec as HardFork import qualified Test.Cardano.Ledger.Conway.Imp.LedgerSpec as Ledger import qualified Test.Cardano.Ledger.Conway.Imp.RatifySpec as Ratify import qualified Test.Cardano.Ledger.Conway.Imp.UtxoSpec as Utxo import qualified Test.Cardano.Ledger.Conway.Imp.UtxosSpec as Utxos import qualified Test.Cardano.Ledger.Conway.Imp.UtxowSpec as Utxow import Test.Cardano.Ledger.Conway.ImpTest import Test.Cardano.Ledger.Imp.Common spec :: forall era. ( ConwayEraImp era , Inject (BabbageContextError era) (ContextError era) , Inject (ConwayContextError era) (ContextError era) , InjectRuleFailure "LEDGER" ConwayGovPredFailure era , InjectRuleFailure "LEDGER" ConwayCertsPredFailure era , InjectRuleFailure "LEDGER" BabbageUtxoPredFailure era , InjectRuleFailure "LEDGER" BabbageUtxowPredFailure era , InjectRuleFailure "LEDGER" AlonzoUtxoPredFailure era , InjectRuleFailure "LEDGER" AlonzoUtxosPredFailure era , InjectRuleFailure "LEDGER" AlonzoUtxowPredFailure era , InjectRuleFailure "LEDGER" ShelleyDelegPredFailure era , InjectRuleFailure "LEDGER" ShelleyUtxoPredFailure era , InjectRuleFailure "LEDGER" ShelleyUtxowPredFailure era , InjectRuleFailure "LEDGER" ShelleyPoolPredFailure era , InjectRuleFailure "LEDGER" ConwayDelegPredFailure era , InjectRuleFailure "LEDGER" ConwayGovCertPredFailure era , InjectRuleFailure "LEDGER" ConwayLedgerPredFailure era , InjectRuleFailure "LEDGER" ConwayUtxoPredFailure era , InjectRuleFailure "LEDGER" ConwayUtxowPredFailure era , InjectRuleFailure "BBODY" ConwayBbodyPredFailure era , InjectRuleEvent "TICK" ConwayEpochEvent era , Event (EraRule "EPOCH" era) ~ ConwayEpochEvent era , Event (EraRule "NEWEPOCH" era) ~ ConwayNewEpochEvent era , Event (EraRule "HARDFORK" era) ~ ConwayHardForkEvent era , ApplyTx era , NFData (Event (EraRule "ENACT" era)) , ToExpr (Event (EraRule "ENACT" era)) , Eq (Event (EraRule "ENACT" era)) , Typeable (Event (EraRule "ENACT" era)) , ToExpr (Event (EraRule "BBODY" era)) , EraPlutusTxInfo PlutusV2 era ) => Spec spec :: forall era. (ConwayEraImp era, Inject (BabbageContextError era) (ContextError era), Inject (ConwayContextError era) (ContextError era), InjectRuleFailure "LEDGER" ConwayGovPredFailure era, InjectRuleFailure "LEDGER" ConwayCertsPredFailure era, InjectRuleFailure "LEDGER" BabbageUtxoPredFailure era, InjectRuleFailure "LEDGER" BabbageUtxowPredFailure era, InjectRuleFailure "LEDGER" AlonzoUtxoPredFailure era, InjectRuleFailure "LEDGER" AlonzoUtxosPredFailure era, InjectRuleFailure "LEDGER" AlonzoUtxowPredFailure era, InjectRuleFailure "LEDGER" ShelleyDelegPredFailure era, InjectRuleFailure "LEDGER" ShelleyUtxoPredFailure era, InjectRuleFailure "LEDGER" ShelleyUtxowPredFailure era, InjectRuleFailure "LEDGER" ShelleyPoolPredFailure era, InjectRuleFailure "LEDGER" ConwayDelegPredFailure era, InjectRuleFailure "LEDGER" ConwayGovCertPredFailure era, InjectRuleFailure "LEDGER" ConwayLedgerPredFailure era, InjectRuleFailure "LEDGER" ConwayUtxoPredFailure era, InjectRuleFailure "LEDGER" ConwayUtxowPredFailure era, InjectRuleFailure "BBODY" ConwayBbodyPredFailure era, InjectRuleEvent "TICK" ConwayEpochEvent era, Event (EraRule "EPOCH" era) ~ ConwayEpochEvent era, Event (EraRule "NEWEPOCH" era) ~ ConwayNewEpochEvent era, Event (EraRule "HARDFORK" era) ~ ConwayHardForkEvent era, ApplyTx era, NFData (Event (EraRule "ENACT" era)), ToExpr (Event (EraRule "ENACT" era)), Eq (Event (EraRule "ENACT" era)), Typeable (Event (EraRule "ENACT" era)), ToExpr (Event (EraRule "BBODY" era)), EraPlutusTxInfo 'PlutusV2 era) => Spec spec = do forall era. (AlonzoEraImp era, BabbageEraTxBody era, InjectRuleFailure "LEDGER" ShelleyDelegPredFailure era, InjectRuleFailure "LEDGER" ShelleyPoolPredFailure era, InjectRuleFailure "LEDGER" ShelleyUtxoPredFailure era, InjectRuleFailure "LEDGER" AlonzoUtxoPredFailure era, InjectRuleFailure "LEDGER" AlonzoUtxosPredFailure era, InjectRuleFailure "LEDGER" AlonzoUtxowPredFailure era, InjectRuleFailure "LEDGER" ShelleyUtxowPredFailure era, InjectRuleFailure "LEDGER" BabbageUtxoPredFailure era, InjectRuleFailure "LEDGER" BabbageUtxowPredFailure era, Inject (BabbageContextError era) (ContextError era)) => Spec BabbageImp.spec @era forall era. ShelleyEraImp era => SpecWith (ImpInit (LedgerSpec era)) -> Spec withEachEraVersion @era (SpecWith (ImpInit (LedgerSpec era)) -> Spec) -> SpecWith (ImpInit (LedgerSpec era)) -> Spec forall a b. (a -> b) -> a -> b $ forall era. (ConwayEraImp era, Inject (BabbageContextError era) (ContextError era), Inject (ConwayContextError era) (ContextError era), InjectRuleFailure "LEDGER" ConwayGovPredFailure era, InjectRuleFailure "LEDGER" ConwayCertsPredFailure era, InjectRuleFailure "LEDGER" BabbageUtxoPredFailure era, InjectRuleFailure "LEDGER" AlonzoUtxosPredFailure era, InjectRuleFailure "LEDGER" AlonzoUtxowPredFailure era, InjectRuleFailure "LEDGER" ShelleyUtxowPredFailure era, InjectRuleFailure "LEDGER" ConwayDelegPredFailure era, InjectRuleFailure "LEDGER" ConwayGovCertPredFailure era, InjectRuleFailure "LEDGER" ConwayLedgerPredFailure era, InjectRuleFailure "LEDGER" ConwayUtxoPredFailure era, InjectRuleFailure "LEDGER" ConwayUtxowPredFailure era, InjectRuleFailure "BBODY" ConwayBbodyPredFailure era, InjectRuleEvent "TICK" ConwayEpochEvent era, Event (EraRule "EPOCH" era) ~ ConwayEpochEvent era, Event (EraRule "NEWEPOCH" era) ~ ConwayNewEpochEvent era, Event (EraRule "HARDFORK" era) ~ ConwayHardForkEvent era, ApplyTx era, NFData (Event (EraRule "ENACT" era)), ToExpr (Event (EraRule "ENACT" era)), Eq (Event (EraRule "ENACT" era)), Typeable (Event (EraRule "ENACT" era)), ToExpr (Event (EraRule "BBODY" era)), EraPlutusTxInfo 'PlutusV2 era) => SpecWith (ImpInit (LedgerSpec era)) conwaySpec @era conwaySpec :: forall era. ( ConwayEraImp era , Inject (BabbageContextError era) (ContextError era) , Inject (ConwayContextError era) (ContextError era) , InjectRuleFailure "LEDGER" ConwayGovPredFailure era , InjectRuleFailure "LEDGER" ConwayCertsPredFailure era , InjectRuleFailure "LEDGER" BabbageUtxoPredFailure era , InjectRuleFailure "LEDGER" AlonzoUtxosPredFailure era , InjectRuleFailure "LEDGER" AlonzoUtxowPredFailure era , InjectRuleFailure "LEDGER" ShelleyUtxowPredFailure era , InjectRuleFailure "LEDGER" ConwayDelegPredFailure era , InjectRuleFailure "LEDGER" ConwayGovCertPredFailure era , InjectRuleFailure "LEDGER" ConwayLedgerPredFailure era , InjectRuleFailure "LEDGER" ConwayUtxoPredFailure era , InjectRuleFailure "LEDGER" ConwayUtxowPredFailure era , InjectRuleFailure "BBODY" ConwayBbodyPredFailure era , InjectRuleEvent "TICK" ConwayEpochEvent era , Event (EraRule "EPOCH" era) ~ ConwayEpochEvent era , Event (EraRule "NEWEPOCH" era) ~ ConwayNewEpochEvent era , Event (EraRule "HARDFORK" era) ~ ConwayHardForkEvent era , ApplyTx era , NFData (Event (EraRule "ENACT" era)) , ToExpr (Event (EraRule "ENACT" era)) , Eq (Event (EraRule "ENACT" era)) , Typeable (Event (EraRule "ENACT" era)) , ToExpr (Event (EraRule "BBODY" era)) , EraPlutusTxInfo PlutusV2 era ) => SpecWith (ImpInit (LedgerSpec era)) conwaySpec :: forall era. (ConwayEraImp era, Inject (BabbageContextError era) (ContextError era), Inject (ConwayContextError era) (ContextError era), InjectRuleFailure "LEDGER" ConwayGovPredFailure era, InjectRuleFailure "LEDGER" ConwayCertsPredFailure era, InjectRuleFailure "LEDGER" BabbageUtxoPredFailure era, InjectRuleFailure "LEDGER" AlonzoUtxosPredFailure era, InjectRuleFailure "LEDGER" AlonzoUtxowPredFailure era, InjectRuleFailure "LEDGER" ShelleyUtxowPredFailure era, InjectRuleFailure "LEDGER" ConwayDelegPredFailure era, InjectRuleFailure "LEDGER" ConwayGovCertPredFailure era, InjectRuleFailure "LEDGER" ConwayLedgerPredFailure era, InjectRuleFailure "LEDGER" ConwayUtxoPredFailure era, InjectRuleFailure "LEDGER" ConwayUtxowPredFailure era, InjectRuleFailure "BBODY" ConwayBbodyPredFailure era, InjectRuleEvent "TICK" ConwayEpochEvent era, Event (EraRule "EPOCH" era) ~ ConwayEpochEvent era, Event (EraRule "NEWEPOCH" era) ~ ConwayNewEpochEvent era, Event (EraRule "HARDFORK" era) ~ ConwayHardForkEvent era, ApplyTx era, NFData (Event (EraRule "ENACT" era)), ToExpr (Event (EraRule "ENACT" era)), Eq (Event (EraRule "ENACT" era)), Typeable (Event (EraRule "ENACT" era)), ToExpr (Event (EraRule "BBODY" era)), EraPlutusTxInfo 'PlutusV2 era) => SpecWith (ImpInit (LedgerSpec era)) conwaySpec = do String -> SpecWith (ImpInit (LedgerSpec era)) -> SpecWith (ImpInit (LedgerSpec era)) forall a. HasCallStack => String -> SpecWith a -> SpecWith a describe String "BBODY" SpecWith (ImpInit (LedgerSpec era)) forall era. (AlonzoEraImp era, BabbageEraTxBody era, InjectRuleFailure "BBODY" ConwayBbodyPredFailure era, InjectRuleFailure "LEDGER" AlonzoUtxosPredFailure era, ToExpr (Event (EraRule "BBODY" era)), ConwayEraPParams era) => SpecWith (ImpInit (LedgerSpec era)) Bbody.spec String -> SpecWith (ImpInit (LedgerSpec era)) -> SpecWith (ImpInit (LedgerSpec era)) forall a. HasCallStack => String -> SpecWith a -> SpecWith a describe String "CERTS" SpecWith (ImpInit (LedgerSpec era)) forall era. (ConwayEraImp era, InjectRuleFailure "LEDGER" ConwayCertsPredFailure era, InjectRuleFailure "LEDGER" ConwayLedgerPredFailure era) => SpecWith (ImpInit (LedgerSpec era)) Certs.spec String -> SpecWith (ImpInit (LedgerSpec era)) -> SpecWith (ImpInit (LedgerSpec era)) forall a. HasCallStack => String -> SpecWith a -> SpecWith a describe String "DELEG" SpecWith (ImpInit (LedgerSpec era)) forall era. (ConwayEraImp era, InjectRuleFailure "LEDGER" ConwayDelegPredFailure era) => SpecWith (ImpInit (LedgerSpec era)) Deleg.spec String -> SpecWith (ImpInit (LedgerSpec era)) -> SpecWith (ImpInit (LedgerSpec era)) forall a. HasCallStack => String -> SpecWith a -> SpecWith a describe String "ENACT" SpecWith (ImpInit (LedgerSpec era)) forall era. (ConwayEraImp era, NFData (Event (EraRule "ENACT" era)), ToExpr (Event (EraRule "ENACT" era)), Eq (Event (EraRule "ENACT" era)), Typeable (Event (EraRule "ENACT" era)), Event (EraRule "HARDFORK" era) ~ ConwayHardForkEvent era, Event (EraRule "NEWEPOCH" era) ~ ConwayNewEpochEvent era, Event (EraRule "EPOCH" era) ~ ConwayEpochEvent era, InjectRuleEvent "TICK" ConwayEpochEvent era, InjectRuleFailure "LEDGER" ConwayGovPredFailure era) => SpecWith (ImpInit (LedgerSpec era)) Enact.spec String -> SpecWith (ImpInit (LedgerSpec era)) -> SpecWith (ImpInit (LedgerSpec era)) forall a. HasCallStack => String -> SpecWith a -> SpecWith a describe String "EPOCH" SpecWith (ImpInit (LedgerSpec era)) forall era. (ConwayEraImp era, InjectRuleEvent "TICK" ConwayEpochEvent era, Event (EraRule "EPOCH" era) ~ ConwayEpochEvent era, Event (EraRule "NEWEPOCH" era) ~ ConwayNewEpochEvent era) => SpecWith (ImpInit (LedgerSpec era)) Epoch.spec String -> SpecWith (ImpInit (LedgerSpec era)) -> SpecWith (ImpInit (LedgerSpec era)) forall a. HasCallStack => String -> SpecWith a -> SpecWith a describe String "GOV" SpecWith (ImpInit (LedgerSpec era)) forall era. (ConwayEraImp era, InjectRuleFailure "LEDGER" ConwayGovPredFailure era) => SpecWith (ImpInit (LedgerSpec era)) Gov.spec String -> SpecWith (ImpInit (LedgerSpec era)) -> SpecWith (ImpInit (LedgerSpec era)) forall a. HasCallStack => String -> SpecWith a -> SpecWith a describe String "GOVCERT" SpecWith (ImpInit (LedgerSpec era)) forall era. (ConwayEraImp era, InjectRuleFailure "LEDGER" ConwayGovCertPredFailure era, InjectRuleFailure "LEDGER" ConwayGovPredFailure era) => SpecWith (ImpInit (LedgerSpec era)) GovCert.spec String -> SpecWith (ImpInit (LedgerSpec era)) -> SpecWith (ImpInit (LedgerSpec era)) forall a. HasCallStack => String -> SpecWith a -> SpecWith a describe String "LEDGER" SpecWith (ImpInit (LedgerSpec era)) forall era. (ConwayEraImp era, InjectRuleFailure "LEDGER" ConwayLedgerPredFailure era, InjectRuleFailure "LEDGER" ConwayUtxoPredFailure era, InjectRuleFailure "LEDGER" ConwayGovPredFailure era, ApplyTx era) => SpecWith (ImpInit (LedgerSpec era)) Ledger.spec String -> SpecWith (ImpInit (LedgerSpec era)) -> SpecWith (ImpInit (LedgerSpec era)) forall a. HasCallStack => String -> SpecWith a -> SpecWith a describe String "HARDFORK" SpecWith (ImpInit (LedgerSpec era)) forall era. ConwayEraImp era => SpecWith (ImpInit (LedgerSpec era)) HardFork.spec String -> SpecWith (ImpInit (LedgerSpec era)) -> SpecWith (ImpInit (LedgerSpec era)) forall a. HasCallStack => String -> SpecWith a -> SpecWith a describe String "RATIFY" SpecWith (ImpInit (LedgerSpec era)) forall era. (HasCallStack, ConwayEraImp era) => SpecWith (ImpInit (LedgerSpec era)) Ratify.spec String -> SpecWith (ImpInit (LedgerSpec era)) -> SpecWith (ImpInit (LedgerSpec era)) forall a. HasCallStack => String -> SpecWith a -> SpecWith a describe String "UTXO" SpecWith (ImpInit (LedgerSpec era)) forall era. (ConwayEraImp era, InjectRuleFailure "LEDGER" BabbageUtxoPredFailure era, InjectRuleFailure "LEDGER" AlonzoUtxosPredFailure era, Inject (ConwayContextError era) (ContextError era)) => SpecWith (ImpInit (LedgerSpec era)) Utxo.spec String -> SpecWith (ImpInit (LedgerSpec era)) -> SpecWith (ImpInit (LedgerSpec era)) forall a. HasCallStack => String -> SpecWith a -> SpecWith a describe String "UTXOS" SpecWith (ImpInit (LedgerSpec era)) forall era. (ConwayEraImp era, Inject (BabbageContextError era) (ContextError era), Inject (ConwayContextError era) (ContextError era), InjectRuleFailure "LEDGER" BabbageUtxoPredFailure era, InjectRuleFailure "LEDGER" AlonzoUtxosPredFailure era, InjectRuleFailure "LEDGER" AlonzoUtxowPredFailure era, InjectRuleFailure "LEDGER" ShelleyUtxowPredFailure era) => SpecWith (ImpInit (LedgerSpec era)) Utxos.spec String -> SpecWith (ImpInit (LedgerSpec era)) -> SpecWith (ImpInit (LedgerSpec era)) forall a. HasCallStack => String -> SpecWith a -> SpecWith a describe String "UTXOW" SpecWith (ImpInit (LedgerSpec era)) forall era. (ConwayEraImp era, InjectRuleFailure "LEDGER" ConwayUtxowPredFailure era, EraPlutusTxInfo 'PlutusV2 era) => SpecWith (ImpInit (LedgerSpec era)) Utxow.spec