From a2f8af028baf41b77e97397470c91fce4c0825c7 Mon Sep 17 00:00:00 2001 From: Alexey Kuleshevich Date: Tue, 26 Jul 2022 02:05:34 +0300 Subject: [PATCH] Rename `SupportsSegWit` -> `EraSegWits` --- .../src/Cardano/Ledger/Alonzo/Rules/Bbody.hs | 4 +-- .../impl/src/Cardano/Ledger/Alonzo/TxSeq.hs | 2 +- .../impl/src/Cardano/Ledger/Babbage/Tx.hs | 2 +- .../impl/src/Cardano/Ledger/ShelleyMA.hs | 4 +-- .../src/Cardano/Ledger/Shelley/BlockChain.hs | 2 +- .../src/Cardano/Ledger/Shelley/Rules/Bbody.hs | 4 +-- .../Ledger/Shelley/Examples/Consensus.hs | 4 +-- .../Cardano/Ledger/Shelley/Generator/Core.hs | 4 +-- .../Ledger/Shelley/Generator/EraGen.hs | 2 +- .../Ledger/Shelley/Generator/Trace/Chain.hs | 2 +- .../Test/Cardano/Ledger/Shelley/LaxBlock.hs | 2 +- .../Ledger/Shelley/Rules/ClassifyTraces.hs | 2 +- .../Cardano/Ledger/Shelley/Rules/TestChain.hs | 26 +++++++++---------- .../Serialisation/EraIndepGenerators.hs | 8 +++--- .../Ledger/Shelley/Examples/EmptyBlock.hs | 8 +++--- .../Ledger/Shelley/Examples/TwoPools.hs | 2 +- .../src/Cardano/Ledger/Block.hs | 4 +-- .../src/Cardano/Ledger/Core.hs | 4 +-- .../src/Cardano/Ledger/Era.hs | 2 +- .../Ledger/Examples/TwoPhaseValidation.hs | 6 ++--- 20 files changed, 47 insertions(+), 47 deletions(-) diff --git a/eras/alonzo/impl/src/Cardano/Ledger/Alonzo/Rules/Bbody.hs b/eras/alonzo/impl/src/Cardano/Ledger/Alonzo/Rules/Bbody.hs index e3f9b44976f..ccebc1759db 100644 --- a/eras/alonzo/impl/src/Cardano/Ledger/Alonzo/Rules/Bbody.hs +++ b/eras/alonzo/impl/src/Cardano/Ledger/Alonzo/Rules/Bbody.hs @@ -130,7 +130,7 @@ bbodyTransition :: -- Conditions to define the rule in this Era HasField "_d" (PParams era) UnitInterval, HasField "_maxBlockExUnits" (PParams era) ExUnits, - SupportsSegWit era, + EraSegWits era, AlonzoEraWitnesses era, Era.TxSeq era ~ AlonzoTxSeq era, Tx era ~ AlonzoTx era @@ -204,7 +204,7 @@ instance HasField "_maxBlockExUnits" (PParams era) ExUnits, Era.TxSeq era ~ AlonzoTxSeq era, Tx era ~ AlonzoTx era, - SupportsSegWit era + EraSegWits era ) => STS (AlonzoBBODY era) where diff --git a/eras/alonzo/impl/src/Cardano/Ledger/Alonzo/TxSeq.hs b/eras/alonzo/impl/src/Cardano/Ledger/Alonzo/TxSeq.hs index 26a05bc19db..db0e524ecff 100644 --- a/eras/alonzo/impl/src/Cardano/Ledger/Alonzo/TxSeq.hs +++ b/eras/alonzo/impl/src/Cardano/Ledger/Alonzo/TxSeq.hs @@ -93,7 +93,7 @@ data AlonzoTxSeq era = TxSeq' } deriving (Generic) -instance CC.Crypto c => SupportsSegWit (AlonzoEra c) where +instance CC.Crypto c => EraSegWits (AlonzoEra c) where type TxSeq (AlonzoEra c) = AlonzoTxSeq (AlonzoEra c) fromTxSeq = txSeqTxns toTxSeq = AlonzoTxSeq diff --git a/eras/babbage/impl/src/Cardano/Ledger/Babbage/Tx.hs b/eras/babbage/impl/src/Cardano/Ledger/Babbage/Tx.hs index b8fa6a4a624..b644ae758be 100644 --- a/eras/babbage/impl/src/Cardano/Ledger/Babbage/Tx.hs +++ b/eras/babbage/impl/src/Cardano/Ledger/Babbage/Tx.hs @@ -75,7 +75,7 @@ instance CC.Crypto c => AlonzoEraWitnesses (BabbageEra c) where datsWitsL = datsAlonzoWitsL rdmrsWitsL = rdmrsAlonzoWitsL -instance CC.Crypto c => SupportsSegWit (BabbageEra c) where +instance CC.Crypto c => EraSegWits (BabbageEra c) where type TxSeq (BabbageEra c) = AlonzoTxSeq (BabbageEra c) fromTxSeq = txSeqTxns toTxSeq = AlonzoTxSeq diff --git a/eras/shelley-ma/impl/src/Cardano/Ledger/ShelleyMA.hs b/eras/shelley-ma/impl/src/Cardano/Ledger/ShelleyMA.hs index 230dade7945..21fc6f1aa37 100644 --- a/eras/shelley-ma/impl/src/Cardano/Ledger/ShelleyMA.hs +++ b/eras/shelley-ma/impl/src/Cardano/Ledger/ShelleyMA.hs @@ -25,7 +25,7 @@ module Cardano.Ledger.ShelleyMA ) where -import Cardano.Ledger.Core (SupportsSegWit (..)) +import Cardano.Ledger.Core (EraSegWits (..)) import Cardano.Ledger.Shelley.BlockChain (ShelleyTxSeq (..)) import qualified Cardano.Ledger.Shelley.BlockChain as Shelley ( bbHash, @@ -49,7 +49,7 @@ import Cardano.Ledger.ShelleyMA.TxBody (MATxBody, TxBody) -- Uses the default instance of hashScript -instance MAClass ma crypto => SupportsSegWit (ShelleyMAEra ma crypto) where +instance MAClass ma crypto => EraSegWits (ShelleyMAEra ma crypto) where type TxSeq (ShelleyMAEra ma crypto) = ShelleyTxSeq (ShelleyMAEra ma crypto) fromTxSeq = Shelley.txSeqTxns toTxSeq = ShelleyTxSeq diff --git a/eras/shelley/impl/src/Cardano/Ledger/Shelley/BlockChain.hs b/eras/shelley/impl/src/Cardano/Ledger/Shelley/BlockChain.hs index 8528db338d0..2ff9665924a 100644 --- a/eras/shelley/impl/src/Cardano/Ledger/Shelley/BlockChain.hs +++ b/eras/shelley/impl/src/Cardano/Ledger/Shelley/BlockChain.hs @@ -88,7 +88,7 @@ data ShelleyTxSeq era = TxSeq' } deriving (Generic) -instance CC.Crypto c => SupportsSegWit (ShelleyEra c) where +instance CC.Crypto c => EraSegWits (ShelleyEra c) where type TxSeq (ShelleyEra c) = ShelleyTxSeq (ShelleyEra c) fromTxSeq = txSeqTxns toTxSeq = ShelleyTxSeq diff --git a/eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/Bbody.hs b/eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/Bbody.hs index ee1898358d9..340a65d6cdd 100644 --- a/eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/Bbody.hs +++ b/eras/shelley/impl/src/Cardano/Ledger/Shelley/Rules/Bbody.hs @@ -96,7 +96,7 @@ instance NoThunks (BbodyPredicateFailure era) instance - ( SupportsSegWit era, + ( EraSegWits era, DSignable (Crypto era) (Hash (Crypto era) EraIndependentTxBody), Embed (EraRule "LEDGERS" era) (BBODY era), Environment (EraRule "LEDGERS" era) ~ LedgersEnv era, @@ -128,7 +128,7 @@ instance bbodyTransition :: forall era. ( STS (BBODY era), - SupportsSegWit era, + EraSegWits era, Embed (EraRule "LEDGERS" era) (BBODY era), Environment (EraRule "LEDGERS" era) ~ LedgersEnv era, State (EraRule "LEDGERS" era) ~ LedgerState era, diff --git a/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Examples/Consensus.hs b/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Examples/Consensus.hs index 358383b2d86..db8078b4dca 100644 --- a/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Examples/Consensus.hs +++ b/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Examples/Consensus.hs @@ -105,7 +105,7 @@ type ShelleyBasedEra' era = defaultShelleyLedgerExamples :: forall era. ( ShelleyBasedEra' era, - SupportsSegWit era, + EraSegWits era, PredicateFailure (Core.EraRule "DELEGS" era) ~ DelegsPredicateFailure era, PredicateFailure (Core.EraRule "LEDGER" era) ~ LedgerPredicateFailure era, Core.PParams era ~ ShelleyPParams era, @@ -160,7 +160,7 @@ defaultShelleyLedgerExamples mkWitnesses mkAlonzoTx value txBody auxData transla exampleShelleyLedgerBlock :: forall era. - (Core.EraTx era, SupportsSegWit era, ShelleyBasedEra' era) => + (Core.EraTx era, EraSegWits era, ShelleyBasedEra' era) => Core.Tx era -> Block (BHeader (Era.Crypto era)) era exampleShelleyLedgerBlock tx = Block blockHeader blockBody diff --git a/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Generator/Core.hs b/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Generator/Core.hs index 1244fd350d5..6cc4bd5112e 100644 --- a/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Generator/Core.hs +++ b/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Generator/Core.hs @@ -534,7 +534,7 @@ mkBlockHeader prev pkeys s blockNo enonce kesPeriod c0 oCert bodySize bodyHash = mkBlock :: forall era r. - (SupportsSegWit era, Mock (Crypto era)) => + (EraSegWits era, Mock (Crypto era)) => -- | Hash of previous block HashHeader (Crypto era) -> -- | All keys in the stake pool @@ -564,7 +564,7 @@ mkBlock prev pkeys txns s blockNo enonce kesPeriod c0 oCert = -- | Create a block with a faked VRF result. mkBlockFakeVRF :: forall era r. - (SupportsSegWit era, ExMock (Crypto era)) => + (EraSegWits era, ExMock (Crypto era)) => -- | Hash of previous block HashHeader (Crypto era) -> -- | All keys in the stake pool diff --git a/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Generator/EraGen.hs b/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Generator/EraGen.hs index b7a34653610..5a87a94d9ab 100644 --- a/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Generator/EraGen.hs +++ b/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Generator/EraGen.hs @@ -172,7 +172,7 @@ class Show (TxOut era) => MinGenTxout era where -- ====================================================================================== class - ( SupportsSegWit era, + ( EraSegWits era, ShelleyEraTxBody era, Split (Value era), ScriptClass era, diff --git a/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Generator/Trace/Chain.hs b/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Generator/Trace/Chain.hs index ab59ec799f0..1bb7b195968 100644 --- a/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Generator/Trace/Chain.hs +++ b/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Generator/Trace/Chain.hs @@ -95,7 +95,7 @@ import Test.QuickCheck (Gen) -- with meaningful delegation certificates, protocol and application updates, withdrawals etc. instance ( EraGen era, - Core.SupportsSegWit era, + Core.EraSegWits era, Mock (Crypto era), ApplyBlock era, GetLedgerView era, diff --git a/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/LaxBlock.hs b/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/LaxBlock.hs index d0e43629243..18f69c07b50 100644 --- a/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/LaxBlock.hs +++ b/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/LaxBlock.hs @@ -17,7 +17,7 @@ import Cardano.Binary annotatorSlice, ) import Cardano.Ledger.Block (Block (..)) -import Cardano.Ledger.Core (Era, EraTx, SupportsSegWit (TxSeq)) +import Cardano.Ledger.Core (Era, EraTx, EraSegWits (TxSeq)) import Cardano.Ledger.Serialization (decodeRecordNamed) import Cardano.Ledger.Shelley.BlockChain (ShelleyTxSeq, txSeqDecoder) import Data.Typeable (Typeable) diff --git a/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Rules/ClassifyTraces.hs b/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Rules/ClassifyTraces.hs index 6ab5be80a55..4356355a511 100644 --- a/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Rules/ClassifyTraces.hs +++ b/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Rules/ClassifyTraces.hs @@ -117,7 +117,7 @@ relevantCasesAreCovered = do relevantCasesAreCoveredForTrace :: forall era. ( ChainProperty era, - SupportsSegWit era, + EraSegWits era, ShelleyEraTxBody era ) => Trace (CHAIN era) -> diff --git a/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Rules/TestChain.hs b/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Rules/TestChain.hs index 2d535e37e2c..c9c6febaa5b 100644 --- a/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Rules/TestChain.hs +++ b/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Rules/TestChain.hs @@ -230,7 +230,7 @@ stakeIncrTest = incrStakeComp :: forall era ledger. - (SupportsSegWit era, ChainProperty era, TestingLedger era ledger) => + (EraSegWits era, ChainProperty era, TestingLedger era ledger) => SourceSignalTarget (CHAIN era) -> Property incrStakeComp SourceSignalTarget {source = chainSt, signal = block} = @@ -312,7 +312,7 @@ adaPreservationChain = -- ADA should be preserved for all state transitions in the generated trace checkPreservation :: forall era. - ( SupportsSegWit era, + ( EraSegWits era, ShelleyEraTxBody era, HasField "_protocolVersion" (PParams era) ProtVer, HasField "_keyDeposit" (PParams era) Coin, @@ -539,7 +539,7 @@ potsSumIncreaseWdrlsPerTx SourceSignalTarget {source = chainSt, signal = block} potsSumIncreaseByRewardsPerTx :: forall era ledger. ( ChainProperty era, - SupportsSegWit era, + EraSegWits era, TestingLedger era ledger ) => SourceSignalTarget (CHAIN era) -> @@ -648,7 +648,7 @@ preserveBalanceRestricted :: ( ChainProperty era, TestingLedger era ledger, ShelleyEraTxBody era, - SupportsSegWit era, + EraSegWits era, HasField "_keyDeposit" (PParams era) Coin, HasField "_poolDeposit" (PParams era) Coin ) => @@ -710,7 +710,7 @@ preserveOutputsTx SourceSignalTarget {source = chainSt, signal = block} = canRestrictUTxO :: forall era ledger. ( ChainProperty era, - SupportsSegWit era, + EraSegWits era, TestingLedger era ledger ) => SourceSignalTarget (CHAIN era) -> @@ -931,7 +931,7 @@ poolProperties = -- retirement. poolRetirement :: ( ChainProperty era, - SupportsSegWit era, + EraSegWits era, ShelleyEraTxBody era, HasField "_eMax" (PParams era) EpochNo, HasField "_minPoolCost" (PParams era) Coin @@ -951,7 +951,7 @@ poolRetirement SourceSignalTarget {source = chainSt, signal = block} = -- in the retiring map. poolRegistration :: ( ChainProperty era, - SupportsSegWit era, + EraSegWits era, ShelleyEraTxBody era, HasField "_eMax" (PParams era) EpochNo, HasField "_minPoolCost" (PParams era) Coin @@ -968,7 +968,7 @@ poolRegistration (SourceSignalTarget {source = chainSt, signal = block}) = -- POOL` transition. poolStateIsInternallyConsistent :: ( ChainProperty era, - SupportsSegWit era, + EraSegWits era, ShelleyEraTxBody era, HasField "_eMax" (PParams era) EpochNo, HasField "_minPoolCost" (PParams era) Coin @@ -1025,7 +1025,7 @@ delegProperties = ledgerTraceFromBlock :: forall era ledger. ( ChainProperty era, - SupportsSegWit era, + EraSegWits era, TestingLedger era ledger ) => ChainState era -> @@ -1045,7 +1045,7 @@ ledgerTraceFromBlock chainSt block = ledgerTraceFromBlockWithRestrictedUTxO :: forall era ledger. ( ChainProperty era, - SupportsSegWit era, + EraSegWits era, TestingLedger era ledger ) => ChainState era -> @@ -1069,7 +1069,7 @@ poolTraceFromBlock :: forall era. ( ChainProperty era, ShelleyEraTxBody era, - SupportsSegWit era, + EraSegWits era, HasField "_eMax" (PParams era) EpochNo, HasField "_minPoolCost" (PParams era) Coin ) => @@ -1099,7 +1099,7 @@ delegTraceFromBlock :: forall era. ( ChainProperty era, ShelleyEraTxBody era, - SupportsSegWit era + EraSegWits era ) => ChainState era -> Block (BHeader (Crypto era)) era -> @@ -1132,7 +1132,7 @@ delegTraceFromBlock chainSt block = -- transactions with the LEDGERS rule) ledgerTraceBase :: forall era. - ( SupportsSegWit era, + ( EraSegWits era, GetLedgerView era, ApplyBlock era ) => diff --git a/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Serialisation/EraIndepGenerators.hs b/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Serialisation/EraIndepGenerators.hs index e3cbab7339a..d155cf139f6 100644 --- a/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Serialisation/EraIndepGenerators.hs +++ b/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Serialisation/EraIndepGenerators.hs @@ -58,7 +58,7 @@ import Cardano.Ledger.BaseTypes textToUrl, ) import Cardano.Ledger.Coin (CompactForm (..), DeltaCoin (..)) -import Cardano.Ledger.Core (Crypto, Era, EraScript (..), SupportsSegWit (..)) +import Cardano.Ledger.Core (Crypto, Era, EraScript (..), EraSegWits (..)) import qualified Cardano.Ledger.Core as Core import Cardano.Ledger.Crypto (DSIGN) import qualified Cardano.Ledger.Crypto as CC (Crypto) @@ -831,7 +831,7 @@ genTx = genBlock :: forall era h. - ( SupportsSegWit era, + ( EraSegWits era, Mock (Crypto era), Arbitrary (Core.Tx era), h ~ BHeader (Crypto era) @@ -850,7 +850,7 @@ genBlock = Block <$> arbitrary <*> (toTxSeq @era <$> arbitrary) genCoherentBlock :: forall era h. ( Mock (Crypto era), - SupportsSegWit era, + EraSegWits era, Arbitrary (Core.Tx era), h ~ BHeader (Crypto era) ) => @@ -894,7 +894,7 @@ instance instance ( Core.EraTxBody era, ToCBORGroup (TxSeq era), - SupportsSegWit era, + EraSegWits era, Mock (Crypto era), Arbitrary (Core.Tx era), h ~ BHeader (Crypto era) diff --git a/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/EmptyBlock.hs b/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/EmptyBlock.hs index 9a40f4ceb1c..851ad9862e7 100644 --- a/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/EmptyBlock.hs +++ b/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/EmptyBlock.hs @@ -53,7 +53,7 @@ blockEx1 :: forall era. ( HasCallStack, ShelleyTest era, - SupportsSegWit era, + EraSegWits era, ExMock (Crypto era) ) => Block (BHeader (Crypto era)) era @@ -76,7 +76,7 @@ blockNonce :: ( HasCallStack, PreAlonzo era, ShelleyTest era, - SupportsSegWit era, + EraSegWits era, ExMock (Crypto era) ) => Nonce @@ -85,7 +85,7 @@ blockNonce = getBlockNonce (blockEx1 @era) expectedStEx1 :: forall era. ( ShelleyTest era, - SupportsSegWit era, + EraSegWits era, ExMock (Crypto era), PreAlonzo era, PParams era ~ ShelleyPParams era @@ -104,7 +104,7 @@ exEmptyBlock :: ( ShelleyTest era, ExMock (Crypto era), PreAlonzo era, - SupportsSegWit era, + EraSegWits era, PParams era ~ ShelleyPParams era ) => CHAINExample (BHeader (Crypto era)) era diff --git a/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/TwoPools.hs b/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/TwoPools.hs index 50c5793de34..a9d1f43892a 100644 --- a/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/TwoPools.hs +++ b/eras/shelley/test-suite/test/Test/Cardano/Ledger/Shelley/Examples/TwoPools.hs @@ -157,7 +157,7 @@ type TwoPoolsConstraints era = Core.Tx era ~ ShelleyTx era, Core.PParams era ~ ShelleyPParams era, PreAlonzo era, - Core.SupportsSegWit era, + Core.EraSegWits era, ToCBOR (Core.Script era) ) diff --git a/libs/cardano-ledger-core/src/Cardano/Ledger/Block.hs b/libs/cardano-ledger-core/src/Cardano/Ledger/Block.hs index 8a22d0b03af..879708c1cfe 100644 --- a/libs/cardano-ledger-core/src/Cardano/Ledger/Block.hs +++ b/libs/cardano-ledger-core/src/Cardano/Ledger/Block.hs @@ -116,7 +116,7 @@ instance (EraTx era, Typeable h) => ToCBOR (Block h era) where instance forall h era. - ( SupportsSegWit era, + ( EraSegWits era, FromCBOR (Annotator h), Typeable h ) => @@ -151,7 +151,7 @@ bbody (Block' _ txs _) = txs -- and present only those to the ledger. neededTxInsForBlock :: forall h era. - SupportsSegWit era => + EraSegWits era => Block h era -> Set (TxIn (Crypto era)) neededTxInsForBlock (Block' _ txsSeq _) = Set.filter isNotNewInput allTxIns diff --git a/libs/cardano-ledger-core/src/Cardano/Ledger/Core.hs b/libs/cardano-ledger-core/src/Cardano/Ledger/Core.hs index e136af110c6..1af30f2a8be 100644 --- a/libs/cardano-ledger-core/src/Cardano/Ledger/Core.hs +++ b/libs/cardano-ledger-core/src/Cardano/Ledger/Core.hs @@ -43,7 +43,7 @@ module Cardano.Ledger.Core translateEra', translateEraMaybe, -- $segWit - SupportsSegWit (..), + EraSegWits (..), -- * Protocol version constraints ProtVerAtLeast, @@ -410,7 +410,7 @@ class ToCBORGroup (TxSeq era), FromCBOR (Annotator (TxSeq era)) ) => - SupportsSegWit era + EraSegWits era where type TxSeq era = (r :: Type) | r -> era diff --git a/libs/cardano-ledger-core/src/Cardano/Ledger/Era.hs b/libs/cardano-ledger-core/src/Cardano/Ledger/Era.hs index 59b55886794..805a1bf4824 100644 --- a/libs/cardano-ledger-core/src/Cardano/Ledger/Era.hs +++ b/libs/cardano-ledger-core/src/Cardano/Ledger/Era.hs @@ -12,7 +12,7 @@ module Cardano.Ledger.Era translateEra', translateEraMaybe, -- $segWit - SupportsSegWit (..), + EraSegWits (..), ) where diff --git a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Examples/TwoPhaseValidation.hs b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Examples/TwoPhaseValidation.hs index a076e232460..1db9f3062cf 100644 --- a/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Examples/TwoPhaseValidation.hs +++ b/libs/cardano-ledger-test/src/Test/Cardano/Ledger/Examples/TwoPhaseValidation.hs @@ -1764,7 +1764,7 @@ coldKeys = KeyPair vk sk (sk, vk) = mkKeyPair (RawSeed 1 2 3 2 1) makeNaiveBlock :: - forall era. SupportsSegWit era => [Tx era] -> Block (BHeaderView (Crypto era)) era + forall era. EraSegWits era => [Tx era] -> Block (BHeaderView (Crypto era)) era makeNaiveBlock txs = UnsafeUnserialisedBlock bhView txs' where bhView = @@ -1786,7 +1786,7 @@ testAlonzoBlock :: ( GoodCrypto (Crypto era), HasTokens era, Scriptic era, - SupportsSegWit era + EraSegWits era ) => Proof era -> Block (BHeaderView (Crypto era)) era @@ -2417,7 +2417,7 @@ alonzoBBODYexamplesP :: HasTokens era, Default (State (EraRule "PPUP" era)), PostShelley era, - SupportsSegWit era + EraSegWits era ) => Proof era -> TestTree