diff --git a/plutus-core/changelog.d/20250114_110640_bezirg_steppable_sop_fix.md b/plutus-core/changelog.d/20250114_110640_bezirg_steppable_sop_fix.md new file mode 100644 index 00000000000..7a086724790 --- /dev/null +++ b/plutus-core/changelog.d/20250114_110640_bezirg_steppable_sop_fix.md @@ -0,0 +1,3 @@ +### Fixed + +- Fix the Steppable CEK machine to correctly "pause/step" in case of SOPs. diff --git a/plutus-core/untyped-plutus-core/src/UntypedPlutusCore/Evaluation/Machine/SteppableCek/Internal.hs b/plutus-core/untyped-plutus-core/src/UntypedPlutusCore/Evaluation/Machine/SteppableCek/Internal.hs index c5260720803..38925a58e1a 100644 --- a/plutus-core/untyped-plutus-core/src/UntypedPlutusCore/Evaluation/Machine/SteppableCek/Internal.hs +++ b/plutus-core/untyped-plutus-core/src/UntypedPlutusCore/Evaluation/Machine/SteppableCek/Internal.hs @@ -157,13 +157,13 @@ computeCek !ctx !_ (Builtin _ bn) = do -- s ; ρ ▻ constr I T0 .. Tn ↦ s , constr I _ (T1 ... Tn, ρ) ; ρ ▻ T0 computeCek !ctx !env (Constr ann i es) = do stepAndMaybeSpend BConstr - case es of - (t : rest) -> computeCek (FrameConstr ann env i rest EmptyStack ctx) env t - [] -> returnCek ctx $ VConstr i EmptyStack + pure $ case es of + (t : rest) -> Computing (FrameConstr ann env i rest EmptyStack ctx) env t + [] -> Returning ctx $ VConstr i EmptyStack -- s ; ρ ▻ case S C0 ... Cn ↦ s , case _ (C0 ... Cn, ρ) ; ρ ▻ S computeCek !ctx !env (Case ann scrut cs) = do stepAndMaybeSpend BCase - computeCek (FrameCases ann env cs ctx) env scrut + pure $ Computing (FrameCases ann env cs ctx) env scrut -- s ; ρ ▻ error A ↦ <> A computeCek !_ !_ (Error _) = throwing_ _EvaluationFailure