Skip to content

Commit 8201de3

Browse files
authored
Merge branch 'master' into vrom911/1911-handle-clientInput-failures-http-api
2 parents 4b4c5c4 + a3061a1 commit 8201de3

File tree

7 files changed

+21
-21
lines changed

7 files changed

+21
-21
lines changed

hydra-chain-observer/src/Hydra/ChainObserver.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ main :: IO ()
2121
main = do
2222
Options{backend, startChainFrom, explorerBaseURI} <- execParser hydraChainObserverOptions
2323
withTracer (Verbose "hydra-chain-observer") $ \tracer -> do
24-
traceWith tracer KnownScripts{scriptInfo = Contract.scriptInfo}
24+
traceWith tracer KnownScripts{hydraScriptCatalogue = Contract.hydraScriptCatalogue}
2525
NodeClient{follow, networkId} <-
2626
case backend of
2727
Direct{networkId, nodeSocket} -> do

hydra-chain-observer/src/Hydra/ChainObserver/NodeClient.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import Hydra.Cardano.Api (
1313
UTxO,
1414
)
1515
import Hydra.Cardano.Api.Prelude (TxId)
16-
import Hydra.Contract (ScriptInfo)
16+
import Hydra.Contract (HydraScriptCatalogue)
1717
import Hydra.Ledger.Cardano (adjustUTxO)
1818
import Hydra.Tx.HeadId (HeadId (..))
1919
import Hydra.Tx.Observe (
@@ -54,7 +54,7 @@ data NodeClient m = NodeClient
5454

5555
type ChainObserverLog :: Type
5656
data ChainObserverLog
57-
= KnownScripts {scriptInfo :: ScriptInfo}
57+
= KnownScripts {hydraScriptCatalogue :: HydraScriptCatalogue}
5858
| ConnectingToNode {nodeSocket :: SocketPath, networkId :: NetworkId}
5959
| ConnectingToExternalNode {networkId :: NetworkId}
6060
| StartObservingFrom {chainPoint :: ChainPoint}

hydra-node/bench/tx-cost/Main.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import Hydra.Prelude hiding (catch)
33
import Data.ByteString (hPut)
44
import Data.Fixed (Centi)
55
import Hydra.Cardano.Api (Coin (..), serialiseToRawBytesHexText)
6-
import Hydra.Contract (ScriptInfo (..), scriptInfo)
6+
import Hydra.Contract (HydraScriptCatalogue (..), hydraScriptCatalogue)
77
import Hydra.Ledger.Cardano.Evaluate (maxCpu, maxMem, maxTxSize)
88
import Hydra.Plutus.Orphans ()
99
import Options.Applicative (
@@ -165,7 +165,7 @@ scriptSizes =
165165
, ""
166166
]
167167
where
168-
ScriptInfo
168+
HydraScriptCatalogue
169169
{ mintingScriptHash
170170
, mintingScriptSize
171171
, initialScriptHash
@@ -176,7 +176,7 @@ scriptSizes =
176176
, headScriptSize
177177
, depositScriptHash
178178
, depositScriptSize
179-
} = scriptInfo
179+
} = hydraScriptCatalogue
180180

181181
genFromSeed :: Gen a -> Int -> a
182182
genFromSeed (MkGen g) seed = g (mkQCGen seed) 30

hydra-node/src/Hydra/Options.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -881,7 +881,7 @@ hydraNodeCommand =
881881
info
882882
( commandParser
883883
<**> versionInfo
884-
<**> scriptInfo
884+
<**> hydraScriptCatalogue
885885
<**> helper
886886
)
887887
( fullDesc
@@ -895,10 +895,10 @@ hydraNodeCommand =
895895
(showVersion hydraNodeVersion)
896896
(long "version" <> help "Show version")
897897

898-
scriptInfo :: Parser (a -> a)
899-
scriptInfo =
898+
hydraScriptCatalogue :: Parser (a -> a)
899+
hydraScriptCatalogue =
900900
infoOption
901-
(decodeUtf8 $ encodePretty Contract.scriptInfo)
901+
(decodeUtf8 $ encodePretty Contract.hydraScriptCatalogue)
902902
(long "script-info" <> help "Dump script info as JSON")
903903

904904
defaultContestationPeriod :: ContestationPeriod

hydra-plutus/exe/inspect-script/Main.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ import Data.Aeson qualified as Aeson
77
import Data.ByteString.Lazy qualified as BL
88
import Data.Text (pack)
99
import Hydra.Cardano.Api.Prelude (unsafeHashFromBytes)
10-
import Hydra.Contract (scriptInfo)
10+
import Hydra.Contract (hydraScriptCatalogue)
1111
import Hydra.Contract.HeadState as Head
1212
import Hydra.Contract.HeadTokens qualified as HeadTokens
1313
import PlutusLedgerApi.V3 (Data, toData)
1414

1515
-- | Serialise Hydra scripts to files for submission through cardano-cli.
1616
main :: IO ()
1717
main = do
18-
putTextLn "Script info:"
19-
putLBSLn $ encodePretty scriptInfo
18+
putTextLn "Hydra script catalogue:"
19+
putLBSLn $ encodePretty hydraScriptCatalogue
2020

2121
putTextLn "Serialise datums:"
2222
writeData datums

hydra-plutus/src/Hydra/Contract.hs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import Hydra.Plutus (commitValidatorScript, depositValidatorScript, initialValid
1616
import PlutusLedgerApi.V3 (TxId (..), TxOutRef (..), toBuiltin)
1717

1818
-- | Information about relevant Hydra scripts.
19-
data ScriptInfo = ScriptInfo
19+
data HydraScriptCatalogue = HydraScriptCatalogue
2020
{ mintingScriptHash :: ScriptHash
2121
-- ^ Hash of the μHead minting script given some default parameters.
2222
, mintingScriptSize :: Int
@@ -33,11 +33,11 @@ data ScriptInfo = ScriptInfo
3333
deriving stock (Eq, Show, Generic)
3434
deriving anyclass (ToJSON)
3535

36-
-- | Gather 'ScriptInfo' from the current Hydra scripts. This is useful to
36+
-- | Gather 'HydraScriptCatalogue' from the current Hydra scripts. This is useful to
3737
-- determine changes in between version of 'hydra-plutus'.
38-
scriptInfo :: ScriptInfo
39-
scriptInfo =
40-
ScriptInfo
38+
hydraScriptCatalogue :: HydraScriptCatalogue
39+
hydraScriptCatalogue =
40+
HydraScriptCatalogue
4141
{ mintingScriptHash = scriptHash $ HeadTokens.mintingPolicyScript defaultOutRef
4242
, mintingScriptSize = scriptSize $ HeadTokens.mintingPolicyScript defaultOutRef
4343
, initialScriptHash = scriptHash initialValidatorScript

hydra-tx/src/Hydra/Tx/ScriptRegistry.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import Hydra.Cardano.Api (
1717
pattern ReferenceScript,
1818
pattern ReferenceScriptNone,
1919
)
20-
import Hydra.Contract (ScriptInfo (..), scriptInfo)
20+
import Hydra.Contract (HydraScriptCatalogue (..), hydraScriptCatalogue)
2121

2222
-- | Hydra scripts published as reference scripts at these UTxO.
2323
data ScriptRegistry = ScriptRegistry
@@ -67,11 +67,11 @@ newScriptRegistry =
6767
Nothing -> Left $ MissingScript name sh (Map.keysSet m)
6868
Just s -> Right s
6969

70-
ScriptInfo
70+
HydraScriptCatalogue
7171
{ initialScriptHash
7272
, commitScriptHash
7373
, headScriptHash
74-
} = scriptInfo
74+
} = hydraScriptCatalogue
7575

7676
-- | Get the UTxO that corresponds to a script registry.
7777
--

0 commit comments

Comments
 (0)