From f57654c281081280a7cfa7c268810358dace3ecd Mon Sep 17 00:00:00 2001 From: Mateusz Galazyn Date: Mon, 2 Nov 2026 19:04:43 +0100 Subject: [PATCH 1/3] Replace the Alonzo-based eons with ShelleyBasedEra Remove the AlonzoBasedEra, IsAlonzoBasedEra and ToShelleyBasedEra eons. ShelleyBasedEra is now the only era witness, and Dijkstra gets its IsShelleyBasedEra instance. Wrappers and encoders for values that exist only from Alonzo onwards take PlutusEraConstraints era. It bundles EraPlutusContext era, EraTxCert era and Script era ~ AlonzoScript era. The script equality makes the pre-Alonzo ShelleyBasedEra arms inaccessible, so matches on them list only the Alonzo-onwards eras and no arm needs an error call. The JSON output does not change. Co-authored-by: Jordan Millar --- .../Data/Json/Ledger/PredicateFailure.hs | 24 ++++---- server/src/Ogmios/Data/Ledger.hs | 46 +++++++-------- .../Data/Ledger/PredicateFailure/Alonzo.hs | 30 +++++----- .../Data/Ledger/PredicateFailure/Babbage.hs | 10 ++-- .../Data/Ledger/PredicateFailure/Conway.hs | 8 +-- .../Data/Ledger/PredicateFailure/Dijkstra.hs | 6 +- .../src/Ogmios/Data/Ledger/ScriptFailure.hs | 11 ++-- .../src/Ogmios/Data/Protocol/TxSubmission.hs | 7 +-- server/src/Ogmios/Prelude.hs | 56 +++++++------------ server/test/unit/Test/Generators.hs | 14 ++--- server/test/unit/Test/Generators/Orphans.hs | 6 +- 11 files changed, 95 insertions(+), 123 deletions(-) diff --git a/server/src/Ogmios/Data/Json/Ledger/PredicateFailure.hs b/server/src/Ogmios/Data/Json/Ledger/PredicateFailure.hs index 9be293de6..e2289654c 100644 --- a/server/src/Ogmios/Data/Json/Ledger/PredicateFailure.hs +++ b/server/src/Ogmios/Data/Json/Ledger/PredicateFailure.hs @@ -1200,39 +1200,39 @@ encodeScriptPurposeItemInAnyEra :: ScriptPurposeItemInAnyEra -> StrictMaybe Json encodeScriptPurposeItemInAnyEra = \case - ScriptPurposeItemInAnyEra (AlonzoBasedEraAlonzo, purpose) -> + ScriptPurposeItemInAnyEra (ShelleyBasedEraAlonzo, purpose) -> Alonzo.encodeScriptPurposeItem purpose - ScriptPurposeItemInAnyEra (AlonzoBasedEraBabbage, purpose) -> + ScriptPurposeItemInAnyEra (ShelleyBasedEraBabbage, purpose) -> Alonzo.encodeScriptPurposeItem purpose - ScriptPurposeItemInAnyEra (AlonzoBasedEraConway, purpose) -> + ScriptPurposeItemInAnyEra (ShelleyBasedEraConway, purpose) -> SJust (Conway.encodeScriptPurposeItem purpose) - ScriptPurposeItemInAnyEra (AlonzoBasedEraDijkstra, purpose) -> + ScriptPurposeItemInAnyEra (ShelleyBasedEraDijkstra, purpose) -> SJust (Dijkstra.encodeScriptPurposeItem purpose) encodeScriptPurposeIndexInAnyEra :: ScriptPurposeIndexInAnyEra -> Json encodeScriptPurposeIndexInAnyEra = \case - ScriptPurposeIndexInAnyEra (AlonzoBasedEraAlonzo, purpose) -> + ScriptPurposeIndexInAnyEra (ShelleyBasedEraAlonzo, purpose) -> Alonzo.encodeScriptPurposeIndex purpose - ScriptPurposeIndexInAnyEra (AlonzoBasedEraBabbage, purpose) -> + ScriptPurposeIndexInAnyEra (ShelleyBasedEraBabbage, purpose) -> Alonzo.encodeScriptPurposeIndex purpose - ScriptPurposeIndexInAnyEra (AlonzoBasedEraConway, purpose) -> + ScriptPurposeIndexInAnyEra (ShelleyBasedEraConway, purpose) -> Conway.encodeScriptPurposeIndex purpose - ScriptPurposeIndexInAnyEra (AlonzoBasedEraDijkstra, purpose) -> + ScriptPurposeIndexInAnyEra (ShelleyBasedEraDijkstra, purpose) -> Dijkstra.encodeScriptPurposeIndex purpose encodeContextErrorInAnyEra :: ContextErrorInAnyEra -> Json encodeContextErrorInAnyEra = \case - ContextErrorInAnyEra (AlonzoBasedEraAlonzo, err) -> + ContextErrorInAnyEra (ShelleyBasedEraAlonzo, err) -> Alonzo.encodeContextError err - ContextErrorInAnyEra (AlonzoBasedEraBabbage, err) -> + ContextErrorInAnyEra (ShelleyBasedEraBabbage, err) -> Babbage.encodeContextError err - ContextErrorInAnyEra (AlonzoBasedEraConway, err) -> + ContextErrorInAnyEra (ShelleyBasedEraConway, err) -> Conway.encodeContextError err - ContextErrorInAnyEra (AlonzoBasedEraDijkstra, err) -> + ContextErrorInAnyEra (ShelleyBasedEraDijkstra, err) -> Dijkstra.encodeContextError err encodeDiscriminatedEntities diff --git a/server/src/Ogmios/Data/Ledger.hs b/server/src/Ogmios/Data/Ledger.hs index 9f65ffb4e..f4751e795 100644 --- a/server/src/Ogmios/Data/Ledger.hs +++ b/server/src/Ogmios/Data/Ledger.hs @@ -69,17 +69,17 @@ data TxOutInAnyEra data ScriptPurposeItemInAnyEra = forall era. - (Era era) => + (PlutusEraConstraints era) => ScriptPurposeItemInAnyEra - ( AlonzoBasedEra era + ( ShelleyBasedEra era , PlutusPurpose AsItem era ) data ScriptPurposeIndexInAnyEra = forall era. - (Era era) => + (PlutusEraConstraints era) => ScriptPurposeIndexInAnyEra - ( AlonzoBasedEra era + ( ShelleyBasedEra era , PlutusPurpose AsIx era ) @@ -96,34 +96,28 @@ scriptPurposeInMostRecentEra :: ScriptPurposeIndexInAnyEra -> PlutusPurpose AsIx (MostRecentEra (CardanoBlock crypto)) scriptPurposeInMostRecentEra = \case - ScriptPurposeIndexInAnyEra (AlonzoBasedEraAlonzo, ix) -> - upgradePlutusPurposeAsIx - ( upgradePlutusPurposeAsIx - (upgradePlutusPurposeAsIx ix) - ) - ScriptPurposeIndexInAnyEra (AlonzoBasedEraBabbage, ix) -> - upgradePlutusPurposeAsIx - (upgradePlutusPurposeAsIx ix) - ScriptPurposeIndexInAnyEra (AlonzoBasedEraConway, ix) -> - upgradePlutusPurposeAsIx ix - ScriptPurposeIndexInAnyEra (AlonzoBasedEraDijkstra, ix) -> + ScriptPurposeIndexInAnyEra (ShelleyBasedEraAlonzo, ix) -> + upgradePlutusPurposeAsIx @DijkstraEra + . upgradePlutusPurposeAsIx @ConwayEra + . upgradePlutusPurposeAsIx @BabbageEra + $ ix + ScriptPurposeIndexInAnyEra (ShelleyBasedEraBabbage, ix) -> + upgradePlutusPurposeAsIx @DijkstraEra + . upgradePlutusPurposeAsIx @ConwayEra + $ ix + ScriptPurposeIndexInAnyEra (ShelleyBasedEraConway, ix) -> + upgradePlutusPurposeAsIx @DijkstraEra ix + ScriptPurposeIndexInAnyEra (ShelleyBasedEraDijkstra, ix) -> ix data ContextErrorInAnyEra = forall era. - (Era era) => + (PlutusEraConstraints era) => ContextErrorInAnyEra - ( AlonzoBasedEra era + ( ShelleyBasedEra era , ContextError era ) instance Show ContextErrorInAnyEra where - show = \case - ContextErrorInAnyEra (AlonzoBasedEraAlonzo, e) -> - show e - ContextErrorInAnyEra (AlonzoBasedEraBabbage, e) -> - show e - ContextErrorInAnyEra (AlonzoBasedEraConway, e) -> - show e - ContextErrorInAnyEra (AlonzoBasedEraDijkstra, e) -> - show e + show (ContextErrorInAnyEra (_, e)) = + show e diff --git a/server/src/Ogmios/Data/Ledger/PredicateFailure/Alonzo.hs b/server/src/Ogmios/Data/Ledger/PredicateFailure/Alonzo.hs index 7e919733d..e02f8f529 100644 --- a/server/src/Ogmios/Data/Ledger/PredicateFailure/Alonzo.hs +++ b/server/src/Ogmios/Data/Ledger/PredicateFailure/Alonzo.hs @@ -56,8 +56,8 @@ encodeLedgerFailure encodeLedgerFailure = \case Sh.UtxowFailure e -> encodeUtxowFailure - AlonzoBasedEraAlonzo - (let era = AlonzoBasedEraAlonzo in encodeUtxoFailure era (encodeUtxosFailure era)) + ShelleyBasedEraAlonzo + (let era = ShelleyBasedEraAlonzo in encodeUtxoFailure era (encodeUtxosFailure era)) e Sh.DelegsFailure e -> encodeDelegsFailure e @@ -74,9 +74,9 @@ encodeLedgerFailure = \case encodeUtxowFailure :: forall era. - ( Era era + ( PlutusEraConstraints era ) - => AlonzoBasedEra era + => ShelleyBasedEra era -> (PredicateFailure (EraRule "UTXO" era) -> MultiEraPredicateFailure) -> Al.AlonzoUtxowPredFailure era -> MultiEraPredicateFailure @@ -104,7 +104,7 @@ encodeUtxoFailure :: forall era. ( Era era ) - => AlonzoBasedEra era + => ShelleyBasedEra era -> (PredicateFailure (EraRule "UTXOS" era) -> MultiEraPredicateFailure) -> Al.AlonzoUtxoPredFailure era -> MultiEraPredicateFailure @@ -114,7 +114,7 @@ encodeUtxoFailure era encodeUtxosFailure' = \case Al.OutsideValidityIntervalUTxO validityInterval currentSlot -> TransactionOutsideValidityInterval { validityInterval, currentSlot } Al.OutputTooBigUTxO outs -> - let culpritOutputs = (\(_, _, out) -> TxOutInAnyEra (toShelleyBasedEra era, out)) <$> toList outs in + let culpritOutputs = (\(_, _, out) -> TxOutInAnyEra (era, out)) <$> toList outs in ValueSizeAboveLimit culpritOutputs Al.MaxTxSizeUTxO (Mismatch measuredSize maximumSize) -> TransactionTooLarge @@ -126,8 +126,8 @@ encodeUtxoFailure era encodeUtxosFailure' = \case Al.FeeTooSmallUTxO (Mismatch suppliedFee minimumRequiredFee) -> TransactionFeeTooSmall { minimumRequiredFee, suppliedFee } Al.ValueNotConservedUTxO (Mismatch consumed produced) -> - let valueConsumed = ValueInAnyEra (toShelleyBasedEra era, consumed) in - let valueProduced = ValueInAnyEra (toShelleyBasedEra era, produced) in + let valueConsumed = ValueInAnyEra (era, consumed) in + let valueProduced = ValueInAnyEra (era, produced) in ValueNotConserved { valueConsumed, valueProduced } Al.WrongNetwork expectedNetwork invalidAddrs -> let invalidEntities = DiscriminatedAddresses (NESet.toSet invalidAddrs) in @@ -137,10 +137,10 @@ encodeUtxoFailure era encodeUtxosFailure' = \case NetworkMismatch { expectedNetwork, invalidEntities } Al.OutputTooSmallUTxO outs -> let insufficientlyFundedOutputs = - (\out -> (TxOutInAnyEra (toShelleyBasedEra era, out), Nothing)) <$> toList outs + (\out -> (TxOutInAnyEra (era, out), Nothing)) <$> toList outs in InsufficientAdaInOutput { insufficientlyFundedOutputs } Al.OutputBootAddrAttrsTooBig outs -> - let culpritOutputs = (\out -> TxOutInAnyEra (toShelleyBasedEra era, out)) <$> toList outs in + let culpritOutputs = (\out -> TxOutInAnyEra (era, out)) <$> toList outs in BootstrapAddressAttributesTooLarge { culpritOutputs } Al.InsufficientCollateral providedCollateral minimumRequiredCollateral -> InsufficientCollateral { providedCollateral, minimumRequiredCollateral } @@ -152,7 +152,7 @@ encodeUtxoFailure era encodeUtxosFailure' = \case Al.OutsideForecast slot -> SlotOutsideForeseeableFuture { slot } Al.CollateralContainsNonADA value -> - let valueInAnyEra = ValueInAnyEra (toShelleyBasedEra era, value) in + let valueInAnyEra = ValueInAnyEra (era, value) in NonAdaValueAsCollateral valueInAnyEra Al.NoCollateralInputs{} -> MissingCollateralInputs @@ -168,9 +168,9 @@ encodeUtxoFailure era encodeUtxosFailure' = \case encodeUtxosFailure :: forall era. - ( Era era + ( PlutusEraConstraints era ) - => AlonzoBasedEra era + => ShelleyBasedEra era -> Al.AlonzoUtxosPredFailure era -> MultiEraPredicateFailure encodeUtxosFailure era = \case @@ -183,9 +183,9 @@ encodeUtxosFailure era = \case encodeCollectErrors :: forall era. - ( Era era + ( PlutusEraConstraints era ) - => AlonzoBasedEra era + => ShelleyBasedEra era -> [CollectError era] -> NonEmpty MultiEraPredicateFailure encodeCollectErrors era errors = diff --git a/server/src/Ogmios/Data/Ledger/PredicateFailure/Babbage.hs b/server/src/Ogmios/Data/Ledger/PredicateFailure/Babbage.hs index d994cd4a6..a6a7592b4 100644 --- a/server/src/Ogmios/Data/Ledger/PredicateFailure/Babbage.hs +++ b/server/src/Ogmios/Data/Ledger/PredicateFailure/Babbage.hs @@ -39,7 +39,7 @@ encodeLedgerFailure :: MultiEraPredicateFailure encodeLedgerFailure = \case Sh.UtxowFailure e -> - encodeUtxowFailure AlonzoBasedEraBabbage (Alonzo.encodeUtxosFailure AlonzoBasedEraBabbage) e + encodeUtxowFailure ShelleyBasedEraBabbage (Alonzo.encodeUtxosFailure ShelleyBasedEraBabbage) e Sh.DelegsFailure e -> encodeDelegsFailure e Sh.ShelleyIncompleteWithdrawals ws -> @@ -55,10 +55,10 @@ encodeLedgerFailure = \case encodeUtxowFailure :: forall era. - ( Era era + ( PlutusEraConstraints era , PredicateFailure (EraRule "UTXO" era) ~ Ba.BabbageUtxoPredFailure era ) => - AlonzoBasedEra era -> + ShelleyBasedEra era -> (PredicateFailure (EraRule "UTXOS" era) -> MultiEraPredicateFailure) -> Ba.BabbageUtxowPredFailure era -> MultiEraPredicateFailure @@ -77,7 +77,7 @@ encodeUtxowFailure era encodeUtxosFailure = \case encodeUtxoFailure :: forall era. (Era era) => - AlonzoBasedEra era -> + ShelleyBasedEra era -> (PredicateFailure (EraRule "UTXOS" era) -> MultiEraPredicateFailure) -> Ba.BabbageUtxoPredFailure era -> MultiEraPredicateFailure @@ -89,7 +89,7 @@ encodeUtxoFailure era encodeUtxosFailureInEra = \case Ba.BabbageOutputTooSmallUTxO outs -> let insufficientlyFundedOutputs = ( \(out, minAda) -> - ( TxOutInAnyEra (toShelleyBasedEra era, out) + ( TxOutInAnyEra (era, out) , Just minAda ) ) diff --git a/server/src/Ogmios/Data/Ledger/PredicateFailure/Conway.hs b/server/src/Ogmios/Data/Ledger/PredicateFailure/Conway.hs index 8c3979fbc..47aa1efd0 100644 --- a/server/src/Ogmios/Data/Ledger/PredicateFailure/Conway.hs +++ b/server/src/Ogmios/Data/Ledger/PredicateFailure/Conway.hs @@ -267,7 +267,7 @@ encodeUtxoFailure -> MultiEraPredicateFailure encodeUtxoFailure = \case Cn.UtxosFailure e -> - encodeUtxosFailure AlonzoBasedEraConway e + encodeUtxosFailure era e Cn.BadInputsUTxO inputs -> UnknownUtxoReference (NESet.toSet inputs) Cn.OutsideValidityIntervalUTxO validityInterval currentSlot -> @@ -339,9 +339,9 @@ encodeUtxoFailure = \case encodeUtxosFailure :: forall era. - ( Era era + ( PlutusEraConstraints era ) - => AlonzoBasedEra era + => ShelleyBasedEra era -> Cn.ConwayUtxosPredFailure era -> MultiEraPredicateFailure encodeUtxosFailure era = \case @@ -395,4 +395,4 @@ encodeUtxowFailure = \case Cn.MalformedReferenceScripts scripts -> MalformedScripts (NESet.toSet scripts) where - era = AlonzoBasedEraConway + era = ShelleyBasedEraConway diff --git a/server/src/Ogmios/Data/Ledger/PredicateFailure/Dijkstra.hs b/server/src/Ogmios/Data/Ledger/PredicateFailure/Dijkstra.hs index 2dc3beaad..bbb736269 100644 --- a/server/src/Ogmios/Data/Ledger/PredicateFailure/Dijkstra.hs +++ b/server/src/Ogmios/Data/Ledger/PredicateFailure/Dijkstra.hs @@ -125,14 +125,14 @@ encodeUtxowFailure = \case Di.MalformedGuardDatums guards -> MalformedGuardDatums { malformedGuards = NESet.toSet guards } where - era = AlonzoBasedEraDijkstra + era = ShelleyBasedEraDijkstra encodeUtxoFailure :: Di.DijkstraUtxoPredFailure DijkstraEra -> MultiEraPredicateFailure encodeUtxoFailure = \case Di.UtxosFailure e -> - encodeUtxosFailure AlonzoBasedEraDijkstra e + encodeUtxosFailure era e Di.BadInputsUTxO inputs -> UnknownUtxoReference (NESet.toSet inputs) Di.OutsideValidityIntervalUTxO validityInterval currentSlot -> @@ -406,7 +406,7 @@ encodeSubUtxowFailure = \case Di.SubMalformedGuardDatums guards -> MalformedGuardDatums { malformedGuards = NESet.toSet guards } where - era = AlonzoBasedEraDijkstra + era = ShelleyBasedEraDijkstra encodeSubUtxoFailure :: Di.DijkstraSubUtxoPredFailure DijkstraEra diff --git a/server/src/Ogmios/Data/Ledger/ScriptFailure.hs b/server/src/Ogmios/Data/Ledger/ScriptFailure.hs index 13c577549..e0749ec53 100644 --- a/server/src/Ogmios/Data/Ledger/ScriptFailure.hs +++ b/server/src/Ogmios/Data/Ledger/ScriptFailure.hs @@ -36,18 +36,15 @@ data NodeTipTooOldError = NodeTipTooOld deriving instance Show EvaluateTransactionError data TransactionScriptFailureInAnyEra = - forall era. (Era era) + forall era. (PlutusEraConstraints era) => TransactionScriptFailureInAnyEra - ( AlonzoBasedEra era + ( ShelleyBasedEra era , Ledger.TransactionScriptFailure era ) instance Show TransactionScriptFailureInAnyEra where - show = \case - TransactionScriptFailureInAnyEra (AlonzoBasedEraAlonzo, e) -> show e - TransactionScriptFailureInAnyEra (AlonzoBasedEraBabbage, e) -> show e - TransactionScriptFailureInAnyEra (AlonzoBasedEraConway, e) -> show e - TransactionScriptFailureInAnyEra (AlonzoBasedEraDijkstra, e) -> show e + show (TransactionScriptFailureInAnyEra (_, e)) = + show e -- | Return the most relevant script failure from a list of errors. -- diff --git a/server/src/Ogmios/Data/Protocol/TxSubmission.hs b/server/src/Ogmios/Data/Protocol/TxSubmission.hs index 10f79e0c9..7b411f9e8 100644 --- a/server/src/Ogmios/Data/Protocol/TxSubmission.hs +++ b/server/src/Ogmios/Data/Protocol/TxSubmission.hs @@ -419,10 +419,9 @@ type CanEvaluateScriptsInEra era = , BabbageEraTxBody era , EraPlutusContext era , EraUTxO era + , IsShelleyBasedEra era , ScriptsNeeded era ~ AlonzoScriptsNeeded era , Script era ~ AlonzoScript era - , EraPlutusContext era - , IsAlonzoBasedEra era ) -- | Evaluate script executions units for the given transaction. @@ -457,7 +456,7 @@ evaluateExecutionUnits pparams systemStart epochInfo utxo tx = aggregateReports ptr result (failures, successes) = case result of Left scriptFailure -> - let failureInAnyEra = TransactionScriptFailureInAnyEra (alonzoBasedEra @era, scriptFailure) + let failureInAnyEra = TransactionScriptFailureInAnyEra (shelleyBasedEra @era, scriptFailure) in ( Map.unionWith (++) (Map.singleton ix [failureInAnyEra]) failures , successes ) @@ -466,7 +465,7 @@ evaluateExecutionUnits pparams systemStart epochInfo utxo tx = , Map.singleton ix exUnits <> successes ) where - ix = ScriptPurposeIndexInAnyEra (alonzoBasedEra @era, ptr) + ix = ScriptPurposeIndexInAnyEra (shelleyBasedEra @era, ptr) reports :: Map diff --git a/server/src/Ogmios/Prelude.hs b/server/src/Ogmios/Prelude.hs index f4d19383f..bb2204877 100644 --- a/server/src/Ogmios/Prelude.hs +++ b/server/src/Ogmios/Prelude.hs @@ -86,13 +86,17 @@ module Ogmios.Prelude ( ByronEra, EraIndex (..), ShelleyBasedEra (..), - ToShelleyBasedEra (..), IsShelleyBasedEra (..), - AlonzoBasedEra (..), - IsAlonzoBasedEra (..), + PlutusEraConstraints, fromEraIndex, ) where +import Cardano.Ledger.Alonzo.Plutus.Context ( + EraPlutusContext, + ) +import Cardano.Ledger.Alonzo.Scripts ( + AlonzoScript, + ) import Cardano.Ledger.Api.Era ( DijkstraEra, ) @@ -103,6 +107,8 @@ import Cardano.Ledger.Binary ( import Cardano.Ledger.Core ( ByronEra, Era, + EraTxCert, + Script, ) import Data.Aeson ( ToJSON (..), @@ -302,40 +308,13 @@ deriving instance Show (ShelleyBasedEra era) deriving instance Eq (ShelleyBasedEra era) deriving instance Ord (ShelleyBasedEra era) -data AlonzoBasedEra era where - AlonzoBasedEraAlonzo :: AlonzoBasedEra AlonzoEra - AlonzoBasedEraBabbage :: AlonzoBasedEra BabbageEra - AlonzoBasedEraConway :: AlonzoBasedEra ConwayEra - AlonzoBasedEraDijkstra :: AlonzoBasedEra DijkstraEra - -deriving instance Show (AlonzoBasedEra era) -deriving instance Eq (AlonzoBasedEra era) -deriving instance Ord (AlonzoBasedEra era) - -class ToShelleyBasedEra f where - toShelleyBasedEra :: f era -> ShelleyBasedEra era - -instance ToShelleyBasedEra AlonzoBasedEra where - toShelleyBasedEra = \case - AlonzoBasedEraAlonzo -> ShelleyBasedEraAlonzo - AlonzoBasedEraBabbage -> ShelleyBasedEraBabbage - AlonzoBasedEraConway -> ShelleyBasedEraConway - AlonzoBasedEraDijkstra -> ShelleyBasedEraDijkstra - -class IsAlonzoBasedEra era where - alonzoBasedEra :: AlonzoBasedEra era - -instance IsAlonzoBasedEra AlonzoEra where - alonzoBasedEra = AlonzoBasedEraAlonzo - -instance IsAlonzoBasedEra BabbageEra where - alonzoBasedEra = AlonzoBasedEraBabbage - -instance IsAlonzoBasedEra ConwayEra where - alonzoBasedEra = AlonzoBasedEraConway - -instance IsAlonzoBasedEra DijkstraEra where - alonzoBasedEra = AlonzoBasedEraDijkstra +-- | Ledger classes of the eras with Plutus scripts. The script equality also +-- lets GHC rule out pre-Alonzo eras when matching on 'ShelleyBasedEra'. +type PlutusEraConstraints era = + ( EraPlutusContext era + , EraTxCert era + , Script era ~ AlonzoScript era + ) data SomeShelleyEra = forall era. SomeShelleyEra (ShelleyBasedEra era) @@ -373,6 +352,9 @@ instance IsShelleyBasedEra BabbageEra where instance IsShelleyBasedEra ConwayEra where shelleyBasedEra = ShelleyBasedEraConway +instance IsShelleyBasedEra DijkstraEra where + shelleyBasedEra = ShelleyBasedEraDijkstra + type family BlockCrypto block :: Type where BlockCrypto (CardanoBlock crypto) = crypto diff --git a/server/test/unit/Test/Generators.hs b/server/test/unit/Test/Generators.hs index 753a1143d..3446d174a 100644 --- a/server/test/unit/Test/Generators.hs +++ b/server/test/unit/Test/Generators.hs @@ -404,10 +404,10 @@ genEvaluateTransactionError = frequency genContextError :: Gen ContextErrorInAnyEra genContextError = oneof - [ ContextErrorInAnyEra . (AlonzoBasedEraAlonzo,) <$> arbitrary - , ContextErrorInAnyEra . (AlonzoBasedEraBabbage,) <$> arbitrary - , ContextErrorInAnyEra . (AlonzoBasedEraConway,) <$> arbitrary - , ContextErrorInAnyEra . (AlonzoBasedEraDijkstra,) <$> arbitrary + [ ContextErrorInAnyEra . (ShelleyBasedEraAlonzo,) <$> arbitrary + , ContextErrorInAnyEra . (ShelleyBasedEraBabbage,) <$> arbitrary + , ContextErrorInAnyEra . (ShelleyBasedEraConway,) <$> arbitrary + , ContextErrorInAnyEra . (ShelleyBasedEraDijkstra,) <$> arbitrary ] genPreAlonzoEra :: Gen Text @@ -441,17 +441,17 @@ genScriptFailure = oneof inAlonzoEra :: Gen (TransactionScriptFailure AlonzoEra) -> Gen TransactionScriptFailureInAnyEra - inAlonzoEra = fmap (TransactionScriptFailureInAnyEra . (AlonzoBasedEraAlonzo,)) + inAlonzoEra = fmap (TransactionScriptFailureInAnyEra . (ShelleyBasedEraAlonzo,)) inBabbageEra :: Gen (TransactionScriptFailure BabbageEra) -> Gen TransactionScriptFailureInAnyEra - inBabbageEra = fmap (TransactionScriptFailureInAnyEra . (AlonzoBasedEraBabbage,)) + inBabbageEra = fmap (TransactionScriptFailureInAnyEra . (ShelleyBasedEraBabbage,)) inConwayEra :: Gen (TransactionScriptFailure ConwayEra) -> Gen TransactionScriptFailureInAnyEra - inConwayEra = fmap (TransactionScriptFailureInAnyEra . (AlonzoBasedEraConway,)) + inConwayEra = fmap (TransactionScriptFailureInAnyEra . (ShelleyBasedEraConway,)) genAcquireFailure :: Gen AcquireFailure genAcquireFailure = elements diff --git a/server/test/unit/Test/Generators/Orphans.hs b/server/test/unit/Test/Generators/Orphans.hs index 9e96a5932..8d89dab26 100644 --- a/server/test/unit/Test/Generators/Orphans.hs +++ b/server/test/unit/Test/Generators/Orphans.hs @@ -42,9 +42,9 @@ import Test.Cardano.Ledger.Dijkstra.Arbitrary instance Arbitrary ScriptPurposeIndexInAnyEra where arbitrary = oneof - [ ScriptPurposeIndexInAnyEra . (AlonzoBasedEraAlonzo,) <$> arbitrary - , ScriptPurposeIndexInAnyEra . (AlonzoBasedEraBabbage,) <$> arbitrary - , ScriptPurposeIndexInAnyEra . (AlonzoBasedEraConway,) <$> arbitrary + [ ScriptPurposeIndexInAnyEra . (ShelleyBasedEraAlonzo,) <$> arbitrary + , ScriptPurposeIndexInAnyEra . (ShelleyBasedEraBabbage,) <$> arbitrary + , ScriptPurposeIndexInAnyEra . (ShelleyBasedEraConway,) <$> arbitrary ] instance Arbitrary RewardAccountSummary where From 60a7b17d573e6e0cdbae45ac7f5784eb47068718 Mon Sep 17 00:00:00 2001 From: Mateusz Galazyn Date: Mon, 2 Nov 2026 19:19:08 +0100 Subject: [PATCH 2/3] Handle every case in unit-test pattern matches Four matches in the unit tests missed a constructor and raised -Wincomplete-patterns warnings: the transaction id match in TxMonitorSpec and three UTxO matches in JsonSpec. The Dijkstra transaction id is now unwrapped like the other eras. The UTxO matches fail the test with a clear message when they decode a Dijkstra UTxO. --- server/test/unit/Ogmios/App/Protocol/TxMonitorSpec.hs | 1 + server/test/unit/Ogmios/Data/JsonSpec.hs | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/server/test/unit/Ogmios/App/Protocol/TxMonitorSpec.hs b/server/test/unit/Ogmios/App/Protocol/TxMonitorSpec.hs index 364716fba..7b00022a7 100644 --- a/server/test/unit/Ogmios/App/Protocol/TxMonitorSpec.hs +++ b/server/test/unit/Ogmios/App/Protocol/TxMonitorSpec.hs @@ -389,6 +389,7 @@ plausibleTxsIds :: [Ledger.TxId] plausibleTxsIds = unGenTxId . txId <$> plausibleTxs where unGenTxId = \case + GenTxIdDijkstra (ShelleyTxId x) -> x GenTxIdConway (ShelleyTxId x) -> x GenTxIdBabbage (ShelleyTxId x) -> x GenTxIdAlonzo (ShelleyTxId x) -> x diff --git a/server/test/unit/Ogmios/Data/JsonSpec.hs b/server/test/unit/Ogmios/Data/JsonSpec.hs index 4edbb5ebd..63e88a47a 100644 --- a/server/test/unit/Ogmios/Data/JsonSpec.hs +++ b/server/test/unit/Ogmios/Data/JsonSpec.hs @@ -402,6 +402,9 @@ spec = do utxo' === upgrade utxo & counterexample (decodeUtf8 $ Json.encodePretty encoded) + Json.Success UTxOInDijkstraEra{} -> + property False + & counterexample "decoded a Babbage Utxo as Dijkstra" specify "Golden: Utxo_1.json" $ do json <- decodeFileThrow "Utxo_1.json" @@ -413,6 +416,8 @@ spec = do fail "successfully decoded an invalid payload (as Babbage Utxo)?" Json.Success UTxOInConwayEra{} -> fail "successfully decoded an invalid payload( as Conway Utxo)?" + Json.Success UTxOInDijkstraEra{} -> + fail "successfully decoded an invalid payload (as Dijkstra Utxo)?" specify "Golden: Utxo_2.json" $ do json <- decodeFileThrow "Utxo_2.json" @@ -444,6 +449,8 @@ spec = do fail "successfully decoded an invalid payload( as Babbage Utxo)?" Json.Success UTxOInConwayEra{} -> fail "successfully decoded an invalid payload (as Conway Utxo)?" + Json.Success UTxOInDijkstraEra{} -> + fail "successfully decoded an invalid payload (as Dijkstra Utxo)?" specify "Golden: Script_Native_0.json" $ do json <- decodeFileThrow "Script_Native_0.json" From ece6b413c95a3f77c8a8279e219a82152c2eed04 Mon Sep 17 00:00:00 2001 From: Mateusz Galazyn Date: Mon, 2 Nov 2026 19:19:08 +0100 Subject: [PATCH 3/3] Generate Dijkstra redeemer pointers in unit tests The ScriptPurposeIndexInAnyEra generator covered only the eras before Dijkstra. It now also produces Dijkstra purposes, which changes the seeded test vectors, so they are regenerated. --- flake.lock | 6 +++--- server/cabal.project | 4 ++-- server/test/unit/Test/Generators/Orphans.hs | 1 + server/test/vectors/EvaluateTransactionResponse/010.json | 2 +- server/test/vectors/EvaluateTransactionResponse/013.json | 2 +- server/test/vectors/EvaluateTransactionResponse/014.json | 2 +- server/test/vectors/EvaluateTransactionResponse/015.json | 2 +- server/test/vectors/EvaluateTransactionResponse/017.json | 2 +- server/test/vectors/EvaluateTransactionResponse/019.json | 2 +- server/test/vectors/EvaluateTransactionResponse/022.json | 2 +- server/test/vectors/EvaluateTransactionResponse/025.json | 2 +- server/test/vectors/EvaluateTransactionResponse/036.json | 2 +- server/test/vectors/EvaluateTransactionResponse/037.json | 2 +- server/test/vectors/EvaluateTransactionResponse/039.json | 2 +- server/test/vectors/EvaluateTransactionResponse/045.json | 2 +- 15 files changed, 18 insertions(+), 17 deletions(-) diff --git a/flake.lock b/flake.lock index 9d437a1f8..063b9473b 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "CHaP": { "flake": false, "locked": { - "lastModified": 1793096209, - "narHash": "sha256-0IdpHmkjiA9MFpQdeXAh+sPERPwxUGcbXCyXRe0bnf0=", + "lastModified": 1793387056, + "narHash": "sha256-b9iFweYcsxm97EHhbEBZUEePSoEye4PDZ4Rh0w0p1iw=", "owner": "intersectmbo", "repo": "cardano-haskell-packages", - "rev": "ca2eb6262234e31bfcd411d98dc3079943c5fdc2", + "rev": "60c2f8adf87302355db3a15258eb562a4af9f22d", "type": "github" }, "original": { diff --git a/server/cabal.project b/server/cabal.project index ca441a789..48606c980 100644 --- a/server/cabal.project +++ b/server/cabal.project @@ -11,12 +11,12 @@ repository cardano-haskell-packages index-state: , hackage.haskell.org 2026-10-23T00:00:00Z - , cardano-haskell-packages 2026-10-27T09:47:50Z + , cardano-haskell-packages 2026-10-30T18:36:41Z constraints: , any.cardano-ledger-conway >= 1.24 - , any.ouroboros-consensus ^>= 5.2 + , any.ouroboros-consensus ^>= 5.3 , any.ouroboros-network ^>= 2.0 , any.small-steps >= 1.2 , any.cardano-ledger-core >= 1.22 diff --git a/server/test/unit/Test/Generators/Orphans.hs b/server/test/unit/Test/Generators/Orphans.hs index 8d89dab26..cb6d44897 100644 --- a/server/test/unit/Test/Generators/Orphans.hs +++ b/server/test/unit/Test/Generators/Orphans.hs @@ -45,6 +45,7 @@ instance Arbitrary ScriptPurposeIndexInAnyEra where [ ScriptPurposeIndexInAnyEra . (ShelleyBasedEraAlonzo,) <$> arbitrary , ScriptPurposeIndexInAnyEra . (ShelleyBasedEraBabbage,) <$> arbitrary , ScriptPurposeIndexInAnyEra . (ShelleyBasedEraConway,) <$> arbitrary + , ScriptPurposeIndexInAnyEra . (ShelleyBasedEraDijkstra,) <$> arbitrary ] instance Arbitrary RewardAccountSummary where diff --git a/server/test/vectors/EvaluateTransactionResponse/010.json b/server/test/vectors/EvaluateTransactionResponse/010.json index 4f39db4e7..dd6633a8b 100644 --- a/server/test/vectors/EvaluateTransactionResponse/010.json +++ b/server/test/vectors/EvaluateTransactionResponse/010.json @@ -1 +1 @@ -{"jsonrpc":"2.0","method":"evaluateTransaction","result":[{"validator":{"index":0,"purpose":"mint"},"budget":{"memory":7425195338392539783,"cpu":2773102022741127362}},{"validator":{"index":7,"purpose":"publish"},"budget":{"memory":6619685211402292632,"cpu":2557258429458408290}}],"id":null} \ No newline at end of file +{"jsonrpc":"2.0","method":"evaluateTransaction","result":[{"validator":{"index":3,"purpose":"spend"},"budget":{"memory":6619685211402292632,"cpu":2557258429458408290}},{"validator":{"index":0,"purpose":"mint"},"budget":{"memory":7425195338392539783,"cpu":2773102022741127362}}],"id":null} \ No newline at end of file diff --git a/server/test/vectors/EvaluateTransactionResponse/013.json b/server/test/vectors/EvaluateTransactionResponse/013.json index 3221750a9..f8f98cb56 100644 --- a/server/test/vectors/EvaluateTransactionResponse/013.json +++ b/server/test/vectors/EvaluateTransactionResponse/013.json @@ -1 +1 @@ -{"jsonrpc":"2.0","method":"evaluateTransaction","error":{"code":3010,"message":"Some scripts of the transactions terminated with error(s).","data":[{"validator":{"index":2,"purpose":"spend"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":0,"purpose":"spend"}]}}},{"validator":{"index":5,"purpose":"mint"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":8,"purpose":"publish"}]}}},{"validator":{"index":7,"purpose":"propose"},"error":{"code":3117,"message":"The transaction contains unknown UTxO references as inputs. This can happen if the inputs you're trying to spend have already been spent, or if you've simply referred to non-existing UTxO altogether. The field 'data.unknownOutputReferences' indicates all unknown inputs.","data":{"unknownOutputReferences":[{"transaction":{"id":"5f5040fc322c39af557d6454f698d4d247f518b86523ca39f8fb6ca9a60f8abe"},"index":5}]}}}]},"id":"mK9IYY6GandR"} \ No newline at end of file +{"jsonrpc":"2.0","method":"evaluateTransaction","error":{"code":3010,"message":"Some scripts of the transactions terminated with error(s).","data":[{"validator":{"index":2,"purpose":"spend"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":0,"purpose":"spend"}]}}},{"validator":{"index":5,"purpose":"mint"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":8,"purpose":"publish"}]}}},{"validator":{"index":5,"purpose":"propose"},"error":{"code":3117,"message":"The transaction contains unknown UTxO references as inputs. This can happen if the inputs you're trying to spend have already been spent, or if you've simply referred to non-existing UTxO altogether. The field 'data.unknownOutputReferences' indicates all unknown inputs.","data":{"unknownOutputReferences":[{"transaction":{"id":"5f5040fc322c39af557d6454f698d4d247f518b86523ca39f8fb6ca9a60f8abe"},"index":5}]}}}]},"id":"mK9IYY6GandR"} \ No newline at end of file diff --git a/server/test/vectors/EvaluateTransactionResponse/014.json b/server/test/vectors/EvaluateTransactionResponse/014.json index a331b80d2..a87357c9d 100644 --- a/server/test/vectors/EvaluateTransactionResponse/014.json +++ b/server/test/vectors/EvaluateTransactionResponse/014.json @@ -1 +1 @@ -{"jsonrpc":"2.0","method":"evaluateTransaction","result":[{"validator":{"index":1,"purpose":"spend"},"budget":{"memory":5543181870361291648,"cpu":2251643430894285464}},{"validator":{"index":5,"purpose":"spend"},"budget":{"memory":2766916028110716146,"cpu":6325731070934221229}},{"validator":{"index":4,"purpose":"mint"},"budget":{"memory":8077018848019191010,"cpu":5784350407601980451}},{"validator":{"index":3,"purpose":"withdraw"},"budget":{"memory":4926587050210136942,"cpu":2982577810151428748}},{"validator":{"index":8,"purpose":"withdraw"},"budget":{"memory":3603965291794951667,"cpu":937555587227912939}},{"validator":{"index":4,"purpose":"propose"},"budget":{"memory":2637140371843253789,"cpu":2402106629276216153}}],"id":"kuOpGfqeiHbY"} \ No newline at end of file +{"jsonrpc":"2.0","method":"evaluateTransaction","result":[{"validator":{"index":1,"purpose":"spend"},"budget":{"memory":5543181870361291648,"cpu":2251643430894285464}},{"validator":{"index":5,"purpose":"spend"},"budget":{"memory":2766916028110716146,"cpu":6325731070934221229}},{"validator":{"index":7,"purpose":"spend"},"budget":{"memory":8077018848019191010,"cpu":5784350407601980451}},{"validator":{"index":3,"purpose":"withdraw"},"budget":{"memory":4926587050210136942,"cpu":2982577810151428748}},{"validator":{"index":7,"purpose":"withdraw"},"budget":{"memory":3603965291794951667,"cpu":937555587227912939}},{"validator":{"index":4,"purpose":"propose"},"budget":{"memory":2637140371843253789,"cpu":2402106629276216153}}],"id":"kuOpGfqeiHbY"} \ No newline at end of file diff --git a/server/test/vectors/EvaluateTransactionResponse/015.json b/server/test/vectors/EvaluateTransactionResponse/015.json index 23966f5f5..7e844303c 100644 --- a/server/test/vectors/EvaluateTransactionResponse/015.json +++ b/server/test/vectors/EvaluateTransactionResponse/015.json @@ -1 +1 @@ -{"jsonrpc":"2.0","method":"evaluateTransaction","error":{"code":3010,"message":"Some scripts of the transactions terminated with error(s).","data":[{"validator":{"index":2,"purpose":"publish"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":8,"purpose":"spend"}]}}},{"validator":{"index":4,"purpose":"publish"},"error":{"code":3111,"message":"Transaction failed because some Plutus scripts are missing their associated datums. 'data.missingDatums' contains a set of data hashes for the missing datums. Ensure all Plutus scripts have an associated datum in the transaction's witness set or, are provided through inline datums in reference inputs.","data":{"missingDatums":["9bd636b8877b0ea4da00d18e67370feb9d8ce2cf47a22ef5dd233fe8b46f2ace"]}}},{"validator":{"index":7,"purpose":"withdraw"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":0,"purpose":"spend"}]}}},{"validator":{"index":1,"purpose":"vote"},"error":{"code":3111,"message":"Transaction failed because some Plutus scripts are missing their associated datums. 'data.missingDatums' contains a set of data hashes for the missing datums. Ensure all Plutus scripts have an associated datum in the transaction's witness set or, are provided through inline datums in reference inputs.","data":{"missingDatums":["29935394bb54f793069bd3ff932a5d538b81a7bd489803ee3bbad1404aa43782"]}}},{"validator":{"index":6,"purpose":"vote"},"error":{"code":3117,"message":"The transaction contains unknown UTxO references as inputs. This can happen if the inputs you're trying to spend have already been spent, or if you've simply referred to non-existing UTxO altogether. The field 'data.unknownOutputReferences' indicates all unknown inputs.","data":{"unknownOutputReferences":[{"transaction":{"id":"3b0f0400c1041062bc8aee6e58633c55f61abecd8053177071e449ee28e1deb0"},"index":7}]}}}]},"id":"cYvQoMi1GZua"} \ No newline at end of file +{"jsonrpc":"2.0","method":"evaluateTransaction","error":{"code":3010,"message":"Some scripts of the transactions terminated with error(s).","data":[{"validator":{"index":7,"purpose":"spend"},"error":{"code":3111,"message":"Transaction failed because some Plutus scripts are missing their associated datums. 'data.missingDatums' contains a set of data hashes for the missing datums. Ensure all Plutus scripts have an associated datum in the transaction's witness set or, are provided through inline datums in reference inputs.","data":{"missingDatums":["29935394bb54f793069bd3ff932a5d538b81a7bd489803ee3bbad1404aa43782"]}}},{"validator":{"index":4,"purpose":"publish"},"error":{"code":3111,"message":"Transaction failed because some Plutus scripts are missing their associated datums. 'data.missingDatums' contains a set of data hashes for the missing datums. Ensure all Plutus scripts have an associated datum in the transaction's witness set or, are provided through inline datums in reference inputs.","data":{"missingDatums":["9bd636b8877b0ea4da00d18e67370feb9d8ce2cf47a22ef5dd233fe8b46f2ace"]}}},{"validator":{"index":6,"purpose":"withdraw"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":8,"purpose":"spend"}]}}},{"validator":{"index":7,"purpose":"withdraw"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":0,"purpose":"spend"}]}}},{"validator":{"index":4,"purpose":"vote"},"error":{"code":3117,"message":"The transaction contains unknown UTxO references as inputs. This can happen if the inputs you're trying to spend have already been spent, or if you've simply referred to non-existing UTxO altogether. The field 'data.unknownOutputReferences' indicates all unknown inputs.","data":{"unknownOutputReferences":[{"transaction":{"id":"3b0f0400c1041062bc8aee6e58633c55f61abecd8053177071e449ee28e1deb0"},"index":7}]}}}]},"id":"cYvQoMi1GZua"} \ No newline at end of file diff --git a/server/test/vectors/EvaluateTransactionResponse/017.json b/server/test/vectors/EvaluateTransactionResponse/017.json index 42bd7d682..5de7056a6 100644 --- a/server/test/vectors/EvaluateTransactionResponse/017.json +++ b/server/test/vectors/EvaluateTransactionResponse/017.json @@ -1 +1 @@ -{"jsonrpc":"2.0","method":"evaluateTransaction","result":[{"validator":{"index":5,"purpose":"spend"},"budget":{"memory":4560595379272592650,"cpu":3408080390908896183}},{"validator":{"index":7,"purpose":"spend"},"budget":{"memory":5799859191134237304,"cpu":1949943787519450882}},{"validator":{"index":4,"purpose":"mint"},"budget":{"memory":8429980677604485530,"cpu":8885147433967660506}},{"validator":{"index":5,"purpose":"publish"},"budget":{"memory":4105181819761541316,"cpu":4407244611925100008}},{"validator":{"index":1,"purpose":"vote"},"budget":{"memory":2373381141931037856,"cpu":6664906541509988387}}],"id":"6lh5ihLhCILG"} \ No newline at end of file +{"jsonrpc":"2.0","method":"evaluateTransaction","result":[{"validator":{"index":5,"purpose":"spend"},"budget":{"memory":4560595379272592650,"cpu":3408080390908896183}},{"validator":{"index":4,"purpose":"mint"},"budget":{"memory":8429980677604485530,"cpu":8885147433967660506}},{"validator":{"index":8,"purpose":"mint"},"budget":{"memory":5799859191134237304,"cpu":1949943787519450882}},{"validator":{"index":5,"purpose":"publish"},"budget":{"memory":4105181819761541316,"cpu":4407244611925100008}},{"validator":{"index":1,"purpose":"vote"},"budget":{"memory":2373381141931037856,"cpu":6664906541509988387}}],"id":"6lh5ihLhCILG"} \ No newline at end of file diff --git a/server/test/vectors/EvaluateTransactionResponse/019.json b/server/test/vectors/EvaluateTransactionResponse/019.json index 4bb9fdfc0..5870da82d 100644 --- a/server/test/vectors/EvaluateTransactionResponse/019.json +++ b/server/test/vectors/EvaluateTransactionResponse/019.json @@ -1 +1 @@ -{"jsonrpc":"2.0","method":"evaluateTransaction","result":[{"validator":{"index":0,"purpose":"spend"},"budget":{"memory":3903295265744535113,"cpu":8155694405885886919}},{"validator":{"index":6,"purpose":"spend"},"budget":{"memory":2501918926494059935,"cpu":3361596475780733127}},{"validator":{"index":4,"purpose":"withdraw"},"budget":{"memory":4507198372532098940,"cpu":5453995265004964629}},{"validator":{"index":0,"purpose":"propose"},"budget":{"memory":7255041994612466254,"cpu":7016388029373208048}}],"id":"7gg5CabTig9W"} \ No newline at end of file +{"jsonrpc":"2.0","method":"evaluateTransaction","result":[{"validator":{"index":0,"purpose":"spend"},"budget":{"memory":3903295265744535113,"cpu":8155694405885886919}},{"validator":{"index":6,"purpose":"spend"},"budget":{"memory":2501918926494059935,"cpu":3361596475780733127}},{"validator":{"index":4,"purpose":"publish"},"budget":{"memory":325829114303264294,"cpu":2151676899420935700}},{"validator":{"index":4,"purpose":"withdraw"},"budget":{"memory":4507198372532098940,"cpu":5453995265004964629}},{"validator":{"index":0,"purpose":"propose"},"budget":{"memory":7255041994612466254,"cpu":7016388029373208048}}],"id":"7gg5CabTig9W"} \ No newline at end of file diff --git a/server/test/vectors/EvaluateTransactionResponse/022.json b/server/test/vectors/EvaluateTransactionResponse/022.json index 5cecd0061..0c33fc7c1 100644 --- a/server/test/vectors/EvaluateTransactionResponse/022.json +++ b/server/test/vectors/EvaluateTransactionResponse/022.json @@ -1 +1 @@ -{"jsonrpc":"2.0","method":"evaluateTransaction","error":{"code":3010,"message":"Some scripts of the transactions terminated with error(s).","data":[{"validator":{"index":3,"purpose":"mint"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":5,"purpose":"publish"}]}}},{"validator":{"index":5,"purpose":"mint"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":3,"purpose":"publish"}]}}},{"validator":{"index":0,"purpose":"publish"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":1,"purpose":"withdraw"}]}}},{"validator":{"index":1,"purpose":"publish"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":0,"purpose":"spend"}]}}},{"validator":{"index":3,"purpose":"publish"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":1,"purpose":"vote"}]}}},{"validator":{"index":4,"purpose":"publish"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":5,"purpose":"mint"}]}}}]},"id":"GsOkoSN5ql5H"} \ No newline at end of file +{"jsonrpc":"2.0","method":"evaluateTransaction","error":{"code":3010,"message":"Some scripts of the transactions terminated with error(s).","data":[{"validator":{"index":3,"purpose":"mint"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":5,"purpose":"publish"}]}}},{"validator":{"index":5,"purpose":"mint"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":3,"purpose":"publish"}]}}},{"validator":{"index":1,"purpose":"publish"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":0,"purpose":"spend"}]}}},{"validator":{"index":4,"purpose":"publish"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":5,"purpose":"mint"}]}}},{"validator":{"index":5,"purpose":"withdraw"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":1,"purpose":"vote"}]}}}]},"id":"GsOkoSN5ql5H"} \ No newline at end of file diff --git a/server/test/vectors/EvaluateTransactionResponse/025.json b/server/test/vectors/EvaluateTransactionResponse/025.json index 91fd8457f..0c866ee8d 100644 --- a/server/test/vectors/EvaluateTransactionResponse/025.json +++ b/server/test/vectors/EvaluateTransactionResponse/025.json @@ -1 +1 @@ -{"jsonrpc":"2.0","method":"evaluateTransaction","error":{"code":3010,"message":"Some scripts of the transactions terminated with error(s).","data":[{"validator":{"index":4,"purpose":"spend"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":6,"purpose":"publish"}]}}},{"validator":{"index":5,"purpose":"mint"},"error":{"code":3110,"message":"Extraneous (non-required) redeemers found in the transaction. There are some redeemers that aren't pointing to any script. This could be because you've left some orphan redeemer behind, because they are pointing at the wrong thing or because you forgot to include their associated validator. Either way, the field 'data.extraneousRedeemers' lists the different orphan redeemer pointers.","data":{"extraneousRedeemers":[{"index":8,"purpose":"mint"}]}}},{"validator":{"index":0,"purpose":"publish"},"error":{"code":3117,"message":"The transaction contains unknown UTxO references as inputs. This can happen if the inputs you're trying to spend have already been spent, or if you've simply referred to non-existing UTxO altogether. The field 'data.unknownOutputReferences' indicates all unknown inputs.","data":{"unknownOutputReferences":[{"transaction":{"id":"4a8af452d96f6b5c9ac6389f35691b960d2d8ecf0bddde60777b87f4dcf6bc25"},"index":0}]}}},{"validator":{"index":3,"purpose":"publish"},"error":{"code":3111,"message":"Transaction failed because some Plutus scripts are missing their associated datums. 'data.missingDatums' contains a set of data hashes for the missing datums. Ensure all Plutus scripts have an associated datum in the transaction's witness set or, are provided through inline datums in reference inputs.","data":{"missingDatums":["cdbf8459d49314c7fa1d677e17505d205808cd94bbe6a41e80b0a4b26e0168ec"]}}},{"validator":{"index":4,"purpose":"publish"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":3,"purpose":"withdraw"}]}}}]},"id":"OsVoqSCZZO3o"} \ No newline at end of file +{"jsonrpc":"2.0","method":"evaluateTransaction","error":{"code":3010,"message":"Some scripts of the transactions terminated with error(s).","data":[{"validator":{"index":4,"purpose":"spend"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":6,"purpose":"publish"}]}}},{"validator":{"index":5,"purpose":"mint"},"error":{"code":3110,"message":"Extraneous (non-required) redeemers found in the transaction. There are some redeemers that aren't pointing to any script. This could be because you've left some orphan redeemer behind, because they are pointing at the wrong thing or because you forgot to include their associated validator. Either way, the field 'data.extraneousRedeemers' lists the different orphan redeemer pointers.","data":{"extraneousRedeemers":[{"index":8,"purpose":"mint"}]}}},{"validator":{"index":0,"purpose":"publish"},"error":{"code":3117,"message":"The transaction contains unknown UTxO references as inputs. This can happen if the inputs you're trying to spend have already been spent, or if you've simply referred to non-existing UTxO altogether. The field 'data.unknownOutputReferences' indicates all unknown inputs.","data":{"unknownOutputReferences":[{"transaction":{"id":"4a8af452d96f6b5c9ac6389f35691b960d2d8ecf0bddde60777b87f4dcf6bc25"},"index":0}]}}},{"validator":{"index":3,"purpose":"publish"},"error":{"code":3111,"message":"Transaction failed because some Plutus scripts are missing their associated datums. 'data.missingDatums' contains a set of data hashes for the missing datums. Ensure all Plutus scripts have an associated datum in the transaction's witness set or, are provided through inline datums in reference inputs.","data":{"missingDatums":["cdbf8459d49314c7fa1d677e17505d205808cd94bbe6a41e80b0a4b26e0168ec"]}}},{"validator":{"index":6,"purpose":"vote"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":3,"purpose":"withdraw"}]}}}]},"id":"OsVoqSCZZO3o"} \ No newline at end of file diff --git a/server/test/vectors/EvaluateTransactionResponse/036.json b/server/test/vectors/EvaluateTransactionResponse/036.json index 72bffc4f0..8f07eaa80 100644 --- a/server/test/vectors/EvaluateTransactionResponse/036.json +++ b/server/test/vectors/EvaluateTransactionResponse/036.json @@ -1 +1 @@ -{"jsonrpc":"2.0","method":"evaluateTransaction","error":{"code":3010,"message":"Some scripts of the transactions terminated with error(s).","data":[{"validator":{"index":8,"purpose":"spend"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":6,"purpose":"vote"}]}}},{"validator":{"index":3,"purpose":"mint"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":8,"purpose":"publish"}]}}},{"validator":{"index":2,"purpose":"publish"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":8,"purpose":"withdraw"}]}}},{"validator":{"index":4,"purpose":"publish"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":4,"purpose":"mint"}]}}},{"validator":{"index":6,"purpose":"publish"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":1,"purpose":"propose"}]}}},{"validator":{"index":1,"purpose":"vote"},"error":{"code":3110,"message":"Extraneous (non-required) redeemers found in the transaction. There are some redeemers that aren't pointing to any script. This could be because you've left some orphan redeemer behind, because they are pointing at the wrong thing or because you forgot to include their associated validator. Either way, the field 'data.extraneousRedeemers' lists the different orphan redeemer pointers.","data":{"extraneousRedeemers":[{"index":7,"purpose":"publish"}]}}}]},"id":null} \ No newline at end of file +{"jsonrpc":"2.0","method":"evaluateTransaction","error":{"code":3010,"message":"Some scripts of the transactions terminated with error(s).","data":[{"validator":{"index":2,"purpose":"spend"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":8,"purpose":"withdraw"}]}}},{"validator":{"index":8,"purpose":"spend"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":6,"purpose":"vote"}]}}},{"validator":{"index":2,"purpose":"publish"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":8,"purpose":"publish"}]}}},{"validator":{"index":4,"purpose":"publish"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":4,"purpose":"mint"}]}}},{"validator":{"index":1,"purpose":"vote"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":1,"purpose":"propose"}]}}}]},"id":null} \ No newline at end of file diff --git a/server/test/vectors/EvaluateTransactionResponse/037.json b/server/test/vectors/EvaluateTransactionResponse/037.json index 517522cc8..a17c57fb4 100644 --- a/server/test/vectors/EvaluateTransactionResponse/037.json +++ b/server/test/vectors/EvaluateTransactionResponse/037.json @@ -1 +1 @@ -{"jsonrpc":"2.0","method":"evaluateTransaction","error":{"code":3010,"message":"Some scripts of the transactions terminated with error(s).","data":[{"validator":{"index":0,"purpose":"mint"},"error":{"code":3115,"message":"It seems like the transaction is using a Plutus version for which there's no available cost model yet. This could be because that language version is known of the ledger but hasn't yet been enabled through hard-fork. The field 'data.missingCostModels' lists all the languages for which a cost model is missing.","data":{"missingCostModels":["plutus:v3"]}}},{"validator":{"index":4,"purpose":"mint"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":7,"purpose":"publish"}]}}},{"validator":{"index":5,"purpose":"mint"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":3,"purpose":"withdraw"}]}}},{"validator":{"index":3,"purpose":"withdraw"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":3,"purpose":"publish"}]}}},{"validator":{"index":6,"purpose":"withdraw"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":3,"purpose":"spend"}]}}},{"validator":{"index":7,"purpose":"withdraw"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":3,"purpose":"mint"}]}}}]},"id":"7UlZXn3P2UdM"} \ No newline at end of file +{"jsonrpc":"2.0","method":"evaluateTransaction","error":{"code":3010,"message":"Some scripts of the transactions terminated with error(s).","data":[{"validator":{"index":5,"purpose":"spend"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":3,"purpose":"publish"}]}}},{"validator":{"index":4,"purpose":"mint"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":7,"purpose":"publish"}]}}},{"validator":{"index":5,"purpose":"mint"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":3,"purpose":"withdraw"}]}}},{"validator":{"index":6,"purpose":"withdraw"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":3,"purpose":"spend"}]}}},{"validator":{"index":7,"purpose":"withdraw"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":3,"purpose":"mint"}]}}},{"validator":{"index":3,"purpose":"vote"},"error":{"code":3115,"message":"It seems like the transaction is using a Plutus version for which there's no available cost model yet. This could be because that language version is known of the ledger but hasn't yet been enabled through hard-fork. The field 'data.missingCostModels' lists all the languages for which a cost model is missing.","data":{"missingCostModels":["plutus:v3"]}}}]},"id":"7UlZXn3P2UdM"} \ No newline at end of file diff --git a/server/test/vectors/EvaluateTransactionResponse/039.json b/server/test/vectors/EvaluateTransactionResponse/039.json index 9dbc9ccf8..dcdc34a2b 100644 --- a/server/test/vectors/EvaluateTransactionResponse/039.json +++ b/server/test/vectors/EvaluateTransactionResponse/039.json @@ -1 +1 @@ -{"jsonrpc":"2.0","method":"evaluateTransaction","error":{"code":3010,"message":"Some scripts of the transactions terminated with error(s).","data":[{"validator":{"index":1,"purpose":"spend"},"error":{"code":3117,"message":"The transaction contains unknown UTxO references as inputs. This can happen if the inputs you're trying to spend have already been spent, or if you've simply referred to non-existing UTxO altogether. The field 'data.unknownOutputReferences' indicates all unknown inputs.","data":{"unknownOutputReferences":[{"transaction":{"id":"e006ae47b8532e63c345681ddbe4e54693305ee1ee055967c0f4e90a93eb96d0"},"index":2}]}}},{"validator":{"index":4,"purpose":"spend"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":3,"purpose":"withdraw"}]}}},{"validator":{"index":8,"purpose":"spend"},"error":{"code":3013,"message":"A redeemer points to an input that isn't locked by a Plutus script. Double-check your redeemer pointers and note that, inputs are ordered lexicographically by the ledger (using their transaction id and output index). This order may differ from the one you originally defined in your transaction and may be the cause of misalignment of your redeemer pointers. The field 'data.unsuitableOutputReference' indicates which input was wrongly targeted by a redeemer.","data":{"unsuitableOutputReference":{"transaction":{"id":"e2a999d42748f10612a52f8ea9012ba166a3c82ab6d08f9a94d82ea85973952f"},"index":8}}}},{"validator":{"index":2,"purpose":"publish"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":7,"purpose":"publish"}]}}},{"validator":{"index":6,"purpose":"publish"},"error":{"code":3117,"message":"The transaction contains unknown UTxO references as inputs. This can happen if the inputs you're trying to spend have already been spent, or if you've simply referred to non-existing UTxO altogether. The field 'data.unknownOutputReferences' indicates all unknown inputs.","data":{"unknownOutputReferences":[{"transaction":{"id":"44a0f76f0c8da453c1059bae12e3f3df849ed65c886068a248882979713011c7"},"index":8}]}}},{"validator":{"index":8,"purpose":"vote"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":5,"purpose":"mint"}]}}}]},"id":null} \ No newline at end of file +{"jsonrpc":"2.0","method":"evaluateTransaction","error":{"code":3010,"message":"Some scripts of the transactions terminated with error(s).","data":[{"validator":{"index":1,"purpose":"spend"},"error":{"code":3117,"message":"The transaction contains unknown UTxO references as inputs. This can happen if the inputs you're trying to spend have already been spent, or if you've simply referred to non-existing UTxO altogether. The field 'data.unknownOutputReferences' indicates all unknown inputs.","data":{"unknownOutputReferences":[{"transaction":{"id":"e006ae47b8532e63c345681ddbe4e54693305ee1ee055967c0f4e90a93eb96d0"},"index":2}]}}},{"validator":{"index":4,"purpose":"spend"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":3,"purpose":"withdraw"}]}}},{"validator":{"index":6,"purpose":"publish"},"error":{"code":3117,"message":"The transaction contains unknown UTxO references as inputs. This can happen if the inputs you're trying to spend have already been spent, or if you've simply referred to non-existing UTxO altogether. The field 'data.unknownOutputReferences' indicates all unknown inputs.","data":{"unknownOutputReferences":[{"transaction":{"id":"44a0f76f0c8da453c1059bae12e3f3df849ed65c886068a248882979713011c7"},"index":8}]}}},{"validator":{"index":0,"purpose":"vote"},"error":{"code":3013,"message":"A redeemer points to an input that isn't locked by a Plutus script. Double-check your redeemer pointers and note that, inputs are ordered lexicographically by the ledger (using their transaction id and output index). This order may differ from the one you originally defined in your transaction and may be the cause of misalignment of your redeemer pointers. The field 'data.unsuitableOutputReference' indicates which input was wrongly targeted by a redeemer.","data":{"unsuitableOutputReference":{"transaction":{"id":"e2a999d42748f10612a52f8ea9012ba166a3c82ab6d08f9a94d82ea85973952f"},"index":8}}}},{"validator":{"index":8,"purpose":"vote"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":5,"purpose":"mint"}]}}},{"validator":{"index":7,"purpose":"propose"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":7,"purpose":"publish"}]}}}]},"id":null} \ No newline at end of file diff --git a/server/test/vectors/EvaluateTransactionResponse/045.json b/server/test/vectors/EvaluateTransactionResponse/045.json index 5b8937e8b..c1140a43f 100644 --- a/server/test/vectors/EvaluateTransactionResponse/045.json +++ b/server/test/vectors/EvaluateTransactionResponse/045.json @@ -1 +1 @@ -{"jsonrpc":"2.0","method":"evaluateTransaction","error":{"code":3010,"message":"Some scripts of the transactions terminated with error(s).","data":[{"validator":{"index":2,"purpose":"spend"},"error":{"code":3117,"message":"The transaction contains unknown UTxO references as inputs. This can happen if the inputs you're trying to spend have already been spent, or if you've simply referred to non-existing UTxO altogether. The field 'data.unknownOutputReferences' indicates all unknown inputs.","data":{"unknownOutputReferences":[{"transaction":{"id":"5cffdab56e491bb528f3baef88f518ac0e6a0bee238d1f34027caea897fba3e5"},"index":0}]}}},{"validator":{"index":2,"purpose":"withdraw"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":5,"purpose":"mint"}]}}}]},"id":"893w6VAkYwwz"} \ No newline at end of file +{"jsonrpc":"2.0","method":"evaluateTransaction","error":{"code":3010,"message":"Some scripts of the transactions terminated with error(s).","data":[{"validator":{"index":2,"purpose":"spend"},"error":{"code":3117,"message":"The transaction contains unknown UTxO references as inputs. This can happen if the inputs you're trying to spend have already been spent, or if you've simply referred to non-existing UTxO altogether. The field 'data.unknownOutputReferences' indicates all unknown inputs.","data":{"unknownOutputReferences":[{"transaction":{"id":"5cffdab56e491bb528f3baef88f518ac0e6a0bee238d1f34027caea897fba3e5"},"index":0}]}}},{"validator":{"index":7,"purpose":"spend"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":3,"purpose":"publish"}]}}},{"validator":{"index":7,"purpose":"mint"},"error":{"code":3011,"message":"An associated script witness is missing. Indeed, any script used in a transaction (when spending, minting, withdrawing or publishing certificates) must be provided in full with the transaction. Scripts must therefore be added either to the witness set or provided as a reference inputs should you use Plutus V2+ and a format from Babbage and beyond.","data":{"missingScripts":[{"index":5,"purpose":"mint"}]}}}]},"id":"893w6VAkYwwz"} \ No newline at end of file