Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete all the things #2555

Merged
merged 2 commits into from
Nov 22, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion alonzo

This file was deleted.

1 change: 0 additions & 1 deletion byron

This file was deleted.

5 changes: 0 additions & 5 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -25,11 +25,6 @@ packages:
libs/small-steps-test
libs/compact-map

-- Deprecations
eras/shelley/chain-and-ledger/executable-spec
eras/shelley/chain-and-ledger/shelley-spec-ledger-test
eras/shelley/chain-and-ledger/dependencies/non-integer

-- Always write GHC env files, because they are needed by the doctests.
write-ghc-environment-files: always

1 change: 0 additions & 1 deletion cardano-ledger-core

This file was deleted.

1 change: 0 additions & 1 deletion cardano-ledger-test

This file was deleted.

7 changes: 0 additions & 7 deletions eras/alonzo/impl/src/Cardano/Ledger/Alonzo/Genesis.hs
Original file line number Diff line number Diff line change
@@ -5,9 +5,6 @@
module Cardano.Ledger.Alonzo.Genesis
( AlonzoGenesis (..),
extendPPWithGenesis,

-- * Deprecated
adaPerUTxOWord,
)
where

@@ -36,10 +33,6 @@ data AlonzoGenesis = AlonzoGenesis
}
deriving (Eq, Generic, NoThunks)

{-# DEPRECATED adaPerUTxOWord "Use coinsPerUTxOWord instead" #-}
adaPerUTxOWord :: AlonzoGenesis -> Coin
adaPerUTxOWord = coinsPerUTxOWord

-- | Given the missing pieces turn a Shelley.PParams' into an Params'
extendPPWithGenesis ::
Shelley.PParams' Identity era1 ->
16 changes: 0 additions & 16 deletions eras/alonzo/impl/src/Cardano/Ledger/Alonzo/PParams.hs
Original file line number Diff line number Diff line change
@@ -27,10 +27,6 @@ module Cardano.Ledger.Alonzo.PParams
encodeLangViews,
retractPP,
extendPP,
-- Deprecated
ProtVer,
pvMajor,
pvMinor,
)
where

@@ -542,15 +538,3 @@ extendPP
col
mxCol =
PParams ma mb mxBB mxT mxBH kd pd emx a n rho tau d eE pv mnP ada cost price mxTx mxBl mxV col mxCol

{-# DEPRECATED ProtVer "Import from Cardano.Ledger.BaseTypes instead" #-}

type ProtVer = BT.ProtVer

{-# DEPRECATED pvMajor "Import from Cardano.Ledger.BaseTypes instead" #-}
pvMajor :: ProtVer -> Natural
pvMajor = BT.pvMajor

{-# DEPRECATED pvMinor "Import from Cardano.Ledger.BaseTypes instead" #-}
pvMinor :: ProtVer -> Natural
pvMinor = BT.pvMinor
21 changes: 0 additions & 21 deletions eras/alonzo/impl/src/Cardano/Ledger/Alonzo/Scripts.hs
Original file line number Diff line number Diff line change
@@ -34,11 +34,6 @@ module Cardano.Ledger.Alonzo.Scripts
validateCostModelParams,
decodeCostModelMap,
decodeCostModel,

-- * Deprecated
defaultCostModel,
alwaysSucceeds,
alwaysFails,
)
where

@@ -73,10 +68,6 @@ import GHC.Generics (Generic)
import NoThunks.Class (InspectHeapNamed (..), NoThunks)
import Numeric.Natural (Natural)
import Plutus.V1.Ledger.Api as PV1 hiding (Map, Script)
import qualified Plutus.V1.Ledger.Examples as Plutus
( alwaysFailingNAryFunction,
alwaysSucceedingNAryFunction,
)
import Plutus.V2.Ledger.Api as PV2 hiding (Map, Script)

-- | Marker indicating the part of a transaction for which this script is acting
@@ -118,14 +109,6 @@ instance SafeToHash (Script era) where
originalBytes (TimelockScript t) = originalBytes t
originalBytes (PlutusScript _ bs) = fromShort bs

{-# DEPRECATED alwaysSucceeds "import from Test.Cardano.Ledger.Alonzo.Scripts instead" #-}
alwaysSucceeds :: Language -> Natural -> Script era
alwaysSucceeds lang n = PlutusScript lang (Plutus.alwaysSucceedingNAryFunction n)

{-# DEPRECATED alwaysFails "import from Test.Cardano.Ledger.Alonzo.Scripts instead" #-}
alwaysFails :: Language -> Natural -> Script era
alwaysFails lang n = PlutusScript lang (Plutus.alwaysFailingNAryFunction n)

isPlutusScript :: Script era -> Bool
isPlutusScript (PlutusScript _ _) = True
isPlutusScript (TimelockScript _) = False
@@ -220,10 +203,6 @@ checkCostModel PlutusV2 cm =
then Right (CostModel cm)
else Left ("Invalid PlutusV2 cost model: " ++ show cm)

defaultCostModel :: Language -> Maybe CostModel
defaultCostModel PlutusV1 = CostModel <$> PV1.defaultCostModelParams
defaultCostModel PlutusV2 = CostModel <$> PV2.defaultCostModelParams

decodeCostModelMap :: Decoder s (Map Language CostModel)
decodeCostModelMap = decodeMapByKey fromCBOR decodeCostModel

32 changes: 0 additions & 32 deletions eras/alonzo/impl/src/Cardano/Ledger/Alonzo/Tx.hs
Original file line number Diff line number Diff line change
@@ -60,11 +60,6 @@ module Cardano.Ledger.Alonzo.Tx
-- Other
toCBORForSizeComputation,
toCBORForMempoolSubmission,
-- Deprecated
IsValidating,
isValidating,
WitnessPPData,
hashWitnessPPData,
)
where

@@ -150,18 +145,6 @@ import Numeric.Natural (Natural)

-- ===================================================

{-# DEPRECATED IsValidating "Use IsValid instead" #-}

type IsValidating = IsValid

{-# DEPRECATED isValidating "Use isValid instead" #-}
isValidating :: ValidatedTx era -> IsValid
isValidating = isValid

-- | DEPRECATED - remove this HasField instance once we have removed IsValidating
instance HasField "isValidating" (ValidatedTx era) IsValid where
getField = isValid

-- | Tag indicating whether non-native scripts in this transaction are expected
-- to validate. This is added by the block creator when constructing the block.
newtype IsValid = IsValid Bool
@@ -250,10 +233,6 @@ data ScriptIntegrity era
!(Set LangDepView) -- From the Porotocl parameters
deriving (Show, Eq, Generic, Typeable)

{-# DEPRECATED WitnessPPData "Use ScriptIntegrity instead" #-}

type WitnessPPData = ScriptIntegrity

deriving instance Typeable era => NoThunks (ScriptIntegrity era)

-- ScriptIntegrity is not transmitted over the network. The bytes are independently
@@ -283,17 +262,6 @@ hashScriptIntegrity pp langs rdmrs dats =
let newset = Set.map (getLanguageView pp) langs
in SJust (hashAnnotated (ScriptIntegrity rdmrs dats newset))

{-# DEPRECATED hashWitnessPPData "Use hashScriptIntegrity instead" #-}
hashWitnessPPData ::
forall era.
Era era =>
PParams era ->
Set Language ->
Redeemers era ->
TxDats era ->
StrictMaybe (ScriptIntegrityHash (Crypto era))
hashWitnessPPData = hashScriptIntegrity

-- ===============================================================
-- From the specification, Figure 5 "Functions related to fees"
-- ===============================================================
14 changes: 0 additions & 14 deletions eras/alonzo/impl/src/Cardano/Ledger/Alonzo/TxBody.hs
Original file line number Diff line number Diff line change
@@ -54,9 +54,6 @@ module Cardano.Ledger.Alonzo.TxBody
AlonzoBody,
EraIndependentScriptIntegrity,
ScriptIntegrityHash,

-- * deprecated
WitnessPPDataHash,
)
where

@@ -382,10 +379,6 @@ pattern TxOutCompactDH addr vl dh <-

type ScriptIntegrityHash crypto = SafeHash crypto EraIndependentScriptIntegrity

{-# DEPRECATED WitnessPPDataHash "Use ScriptIntegrityHash instead" #-}

type WitnessPPDataHash crypto = SafeHash crypto EraIndependentScriptIntegrity

data TxBodyRaw era = TxBodyRaw
{ _inputs :: !(Set (TxIn (Crypto era))),
_collateral :: !(Set (TxIn (Crypto era))),
@@ -846,13 +839,6 @@ instance
where
getField (TxBodyConstr (Memo m _)) = _adHash m

-- | TODO deprecated
instance
c ~ Crypto era =>
HasField "wppHash" (TxBody era) (StrictMaybe (ScriptIntegrityHash c))
where
getField (TxBodyConstr (Memo m _)) = _scriptIntegrityHash m

instance
c ~ Crypto era =>
HasField "scriptIntegrityHash" (TxBody era) (StrictMaybe (ScriptIntegrityHash c))
25 changes: 11 additions & 14 deletions eras/alonzo/impl/src/Cardano/Ledger/Alonzo/TxInfo.hs
Original file line number Diff line number Diff line change
@@ -540,18 +540,17 @@ runPLCScript proxy lang (CostModel cost) scriptbytestring units ds =
-- It pays to decode the context data into a real context because that provides
-- way more information. But there is no guarantee the context data really can
-- be decoded.
explainPlutusFailure,
explain_plutus_failure ::
forall era.
Show (Script era) =>
Proxy era ->
Language ->
SBS.ShortByteString ->
PV1.EvaluationError ->
[PV1.Data] ->
CostModel ->
ExUnits ->
ScriptResult
explainPlutusFailure ::
forall era.
Show (Script era) =>
Proxy era ->
Language ->
SBS.ShortByteString ->
PV1.EvaluationError ->
[PV1.Data] ->
CostModel ->
ExUnits ->
ScriptResult
explainPlutusFailure _proxy lang scriptbytestring e ds@[dat, redeemer, info] cm eu =
-- A three data argument script.
let ss :: Script era
@@ -632,8 +631,6 @@ explainPlutusFailure _proxy lang scriptbytestring e ds cm eu =
++ map show ds
)
db = B64.encode . serialize' $ PlutusDebug cm eu scriptbytestring ds PlutusV1
explain_plutus_failure = explainPlutusFailure
{-# DEPRECATED explain_plutus_failure "In favor of properly named `explainPlutusFailure`" #-}

validPlutusdata :: PV1.Data -> Bool
validPlutusdata (PV1.Constr _n ds) = all validPlutusdata ds
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ module Test.Cardano.Ledger.ShelleyMA.Serialisation.Roundtrip where
import Cardano.Binary (Annotator (..), FromCBOR, ToCBOR)
import qualified Cardano.Ledger.Core as Core
import Cardano.Ledger.Shelley.API (ApplyTx, ApplyTxError)
import Cardano.Ledger.Shelley.Constraints (ShelleyBased)
import Cardano.Ledger.Shelley.Constraints
import qualified Data.ByteString.Lazy.Char8 as BSL
import Data.Proxy (Proxy (Proxy))
import Data.Typeable (typeRep)
@@ -68,7 +68,10 @@ property x =

allprops ::
forall e.
( ShelleyBased e,
( UsesValue e,
UsesScript e,
UsesTxBody e,
UsesAuxiliary e,
ApplyTx e,
Arbitrary (Core.TxBody e),
Arbitrary (Core.AuxiliaryData e),

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions eras/shelley/chain-and-ledger/executable-spec/Setup.hs

This file was deleted.

Loading