diff --git a/hydra-plutus/src/Hydra/Contract/Commit.hs b/hydra-plutus/src/Hydra/Contract/Commit.hs index 069934c917b..fcead9e931f 100644 --- a/hydra-plutus/src/Hydra/Contract/Commit.hs +++ b/hydra-plutus/src/Hydra/Contract/Commit.hs @@ -1,8 +1,8 @@ {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-specialize #-} {-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:defer-errors #-} --- Avoid trace calls to be optimized away when inlining functions. -{-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:no-simplifier-inline #-} +-- Avoid trace calls to be optimized away. +{-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:conservative-optimisation #-} -- Plutus core version to compile to. In babbage era, that is Cardano protocol -- version 7 and 8, only plutus-core version 1.0.0 is available. {-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:target-version=1.0.0 #-} diff --git a/hydra-plutus/src/Hydra/Contract/Head.hs b/hydra-plutus/src/Hydra/Contract/Head.hs index 7380284d83c..28c1a99b735 100644 --- a/hydra-plutus/src/Hydra/Contract/Head.hs +++ b/hydra-plutus/src/Hydra/Contract/Head.hs @@ -2,8 +2,8 @@ {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-specialize #-} {-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:defer-errors #-} --- Avoid trace calls to be optimized away when inlining functions. -{-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:no-simplifier-inline #-} +-- Avoid trace calls to be optimized away. +{-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:conservative-optimisation #-} -- Plutus core version to compile to. In babbage era, that is Cardano protocol -- version 7 and 8, only plutus-core version 1.0.0 is available. {-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:target-version=1.0.0 #-} diff --git a/hydra-plutus/src/Hydra/Contract/HeadTokens.hs b/hydra-plutus/src/Hydra/Contract/HeadTokens.hs index abcf91be160..728676355a5 100644 --- a/hydra-plutus/src/Hydra/Contract/HeadTokens.hs +++ b/hydra-plutus/src/Hydra/Contract/HeadTokens.hs @@ -1,8 +1,8 @@ {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-specialize #-} {-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:defer-errors #-} --- Avoid trace calls to be optimized away when inlining functions. -{-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:no-simplifier-inline #-} +-- Avoid trace calls to be optimized away. +{-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:conservative-optimisation #-} -- Plutus core version to compile to. In babbage era, that is Cardano protocol -- version 7 and 8, only plutus-core version 1.0.0 is available. {-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:target-version=1.0.0 #-} diff --git a/hydra-plutus/src/Hydra/Contract/Initial.hs b/hydra-plutus/src/Hydra/Contract/Initial.hs index c83bf27b2b0..96ec623f899 100644 --- a/hydra-plutus/src/Hydra/Contract/Initial.hs +++ b/hydra-plutus/src/Hydra/Contract/Initial.hs @@ -1,8 +1,8 @@ {-# LANGUAGE TemplateHaskell #-} {-# OPTIONS_GHC -fno-specialize #-} +-- Avoid trace calls to be optimized away. +{-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:conservative-optimisation #-} {-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:defer-errors #-} --- Avoid trace calls to be optimized away when inlining functions. -{-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:no-simplifier-inline #-} -- Plutus core version to compile to. In babbage era, that is Cardano protocol -- version 7 and 8, only plutus-core version 1.0.0 is available. {-# OPTIONS_GHC -fplugin-opt PlutusTx.Plugin:target-version=1.0.0 #-} @@ -173,7 +173,7 @@ checkCommit commitValidator headId committedRefs context = Nothing -> traceError $(errorCode ExpectedCommitDatumTypeGotSomethingElse) Just (_party, commits, hid) -> (commits, hid) - _ -> traceError $(errorCode ExpectedSingleCommitOutput) + _ -> traceIfFalse $(errorCode ExpectedSingleCommitOutput) False ScriptContext{scriptContextTxInfo = txInfo} = context