Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plutus: 1.30 -> 1.34.1 #1544

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,10 @@ test-show-details: direct

program-options
ghc-options: -fwrite-ide-info

constraints: plutus-core == 1.34.1.0

allow-newer: plutus-core
allow-newer: plutus-tx
allow-newer: plutus-ledger-api
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which packages do need these constraints? There is a nice syntax here to provide more context. I think it goes like: allow-newer: somepkg:base to say that somepkg needs to have its upper bounds removed for base

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't this is is noise.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is noise from ghc 9.10. Not relevant to this PR.

allow-newer: prettyprinter-configurable
2 changes: 1 addition & 1 deletion hydra-cardano-api/hydra-cardano-api.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ library
, base >=4.16
, base16-bytestring
, bytestring
, cardano-api ^>=9.1
, cardano-api ^>=9.3
, cardano-binary
, cardano-crypto-class
, cardano-ledger-allegra
Expand Down
14 changes: 8 additions & 6 deletions hydra-cardano-api/src/Hydra/Cardano/Api.hs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ import Cardano.Api as X hiding (
import Cardano.Api.Byron as X (
Address (..),
)
import Cardano.Api.Experimental as X (UnsignedTx (..))
import Cardano.Api.Ledger as X (
PParams,
)
Expand Down Expand Up @@ -154,6 +155,7 @@ import Hydra.Cardano.Api.VerificationKey ()
import Hydra.Cardano.Api.Witness as Extras

import Cardano.Api qualified
import Cardano.Api.Experimental (UnsignedTx)
import Cardano.Api.Shelley qualified
import Cardano.Ledger.Alonzo.TxAuxData qualified as Ledger
import Cardano.Ledger.Alonzo.TxWits qualified as Ledger
Expand Down Expand Up @@ -205,7 +207,7 @@ pattern ShelleyAddressInAnyEra <-
type BalancedTxBody = Cardano.Api.BalancedTxBody Era
{-# COMPLETE BalancedTxBody #-}

pattern BalancedTxBody :: TxBodyContent BuildTx -> TxBody -> TxOut CtxTx -> Coin -> BalancedTxBody
pattern BalancedTxBody :: TxBodyContent BuildTx -> UnsignedTx Era -> TxOut CtxTx -> Coin -> BalancedTxBody
pattern BalancedTxBody{balancedTxBodyContent, balancedTxBody, balancedTxChangeOutput, balancedTxFee} <-
Cardano.Api.BalancedTxBody balancedTxBodyContent balancedTxBody balancedTxChangeOutput balancedTxFee
where
Expand Down Expand Up @@ -386,7 +388,7 @@ type TxBodyContent buidl = Cardano.Api.TxBodyContent buidl Era
pattern TxBodyContent ::
TxIns buidl ->
TxInsCollateral ->
TxInsReference buidl ->
TxInsReference ->
[TxOut CtxTx] ->
TxTotalCollateral Era ->
TxReturnCollateral CtxTx Era ->
Expand All @@ -404,7 +406,7 @@ pattern TxBodyContent ::
TxScriptValidity ->
Maybe (Featured ConwayEraOnwards Era (TxProposalProcedures buidl Era)) ->
Maybe (Featured ConwayEraOnwards Era (TxVotingProcedures buidl Era)) ->
Maybe (Featured ConwayEraOnwards Era Coin) ->
Maybe (Featured ConwayEraOnwards Era (Maybe Coin)) ->
Maybe (Featured ConwayEraOnwards Era Coin) ->
TxBodyContent buidl
pattern TxBodyContent
Expand Down Expand Up @@ -515,17 +517,17 @@ type TxIns buidl = [(TxIn, BuildTxWith buidl (Cardano.Api.Witness WitCtxTxIn Era

-- ** TxInsReference

type TxInsReference buidl = Cardano.Api.TxInsReference buidl Era
type TxInsReference = Cardano.Api.TxInsReference Era
{-# COMPLETE TxInsReferenceNone, TxInsReference #-}

pattern TxInsReferenceNone :: TxInsReference buidl
pattern TxInsReferenceNone :: TxInsReference
pattern TxInsReferenceNone <-
Cardano.Api.TxInsReferenceNone
where
TxInsReferenceNone =
Cardano.Api.TxInsReferenceNone

pattern TxInsReference :: [TxIn] -> TxInsReference buidl
pattern TxInsReference :: [TxIn] -> TxInsReference
pattern TxInsReference{txInsReference'} <-
Cardano.Api.TxInsReference _ txInsReference'
where
Expand Down
13 changes: 7 additions & 6 deletions hydra-cluster/src/Hydra/Cluster/Faucet.hs
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ seedFromFaucet node@RunningNode{networkId, nodeSocket} receivingVerificationKey
let changeAddress = ShelleyAddressInEra (buildAddress faucetVk networkId)
buildTransaction networkId nodeSocket changeAddress faucetUTxO [] [theOutput] >>= \case
Left e -> throwIO $ FaucetFailedToBuildTx{reason = e}
Right body -> do
let signedTx = sign faucetSk body
submitTransaction networkId nodeSocket (sign faucetSk body)
Right tx -> do
let signedTx = sign faucetSk $ getTxBody tx
submitTransaction networkId nodeSocket signedTx
pure signedTx

receivingAddress = buildAddress receivingVerificationKey networkId
Expand Down Expand Up @@ -138,7 +138,7 @@ returnFundsToFaucet' tracer RunningNode{networkId, nodeSocket} senderSk = do
-- entire value is created and paid to the faucet address.
buildTransaction networkId nodeSocket faucetAddress utxo [] [] >>= \case
Left e -> throwIO $ FaucetFailedToBuildTx{reason = e}
Right body -> pure body
Right tx -> pure $ getTxBody tx

-- Use the Faucet utxo to create the output at specified address
createOutputAtAddress ::
Expand Down Expand Up @@ -169,7 +169,8 @@ createOutputAtAddress node@RunningNode{networkId, nodeSocket} atAddress datum =
>>= \case
Left e ->
throwErrorAsException e
Right body -> do
Right x -> do
let body = getTxBody x
let tx = makeSignedTransaction [makeShelleyKeyWitness body (WitnessPaymentKey faucetSk)] body
submitTransaction networkId nodeSocket tx
newUtxo <- awaitTransaction networkId nodeSocket tx
Expand All @@ -196,7 +197,7 @@ calculateTxFee RunningNode{networkId, nodeSocket} secretKey utxo addr lovelace =
let theOutput = TxOut addr (lovelaceToValue lovelace) TxOutDatumNone ReferenceScriptNone
in buildTransaction networkId nodeSocket addr utxo [] [theOutput] >>= \case
Left e -> throwIO $ FaucetFailedToBuildTx{reason = e}
Right body -> pure $ txFee' (sign secretKey body)
Right tx -> pure $ txFee' (sign secretKey $ getTxBody tx)

-- | Try to submit tx and retry when some caught exception/s take place.
retryOnExceptions :: (MonadCatch m, MonadDelay m) => Tracer m FaucetLog -> m a -> m a
Expand Down
8 changes: 4 additions & 4 deletions hydra-cluster/src/Hydra/Cluster/Scenarios.hs
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,8 @@ singlePartyCommitsFromExternalTxBlueprint tracer workDir node hydraScriptsTxId =
ReferenceScriptNone
buildTransaction networkId nodeSocket someAddress utxoToCommit (fst <$> UTxO.pairs someUTxO) [someOutput] >>= \case
Left e -> failure $ show e
Right body -> do
let unsignedTx = makeSignedTransaction [] body
Right tx -> do
let unsignedTx = makeSignedTransaction [] $ getTxBody tx
let clientPayload =
Aeson.object
[ "blueprintTx" .= unsignedTx
Expand Down Expand Up @@ -495,8 +495,8 @@ canSubmitTransactionThroughAPI tracer workDir node hydraScriptsTxId =
-- prepare fully balanced tx body
buildTransaction networkId nodeSocket bobsAddress bobUTxO (fst <$> UTxO.pairs bobUTxO) [carolsOutput] >>= \case
Left e -> failure $ show e
Right body -> do
let unsignedTx = makeSignedTransaction [] body
Right tx -> do
let unsignedTx = makeSignedTransaction [] $ getTxBody tx
let unsignedRequest = toJSON unsignedTx
sendRequest hydraNodeId unsignedRequest
`shouldThrow` expectErrorStatus 400 (Just "MissingVKeyWitnessesUTXOW")
Expand Down
4 changes: 2 additions & 2 deletions hydra-cluster/src/Hydra/Generator.hs
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ generateDemoUTxODataset network nodeSocket allClientKeys nTxs = do
ReferenceScriptNone
buildTransaction network nodeSocket changeAddress faucetUTxO [] recipientOutputs >>= \case
Left e -> throwIO $ FaucetFailedToBuildTx{reason = e}
Right body -> do
let signedTx = sign faucetSk body
Right tx -> do
let signedTx = sign faucetSk $ getTxBody tx
pure signedTx
let dataset clientKeys =
generateClientDataset network fundingTransaction clientKeys nTxs generateOneSelfTransfer
Expand Down
4 changes: 2 additions & 2 deletions hydra-node/src/Hydra/Chain/CardanoClient.hs
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,14 @@ buildTransaction ::
[TxIn] ->
-- | Outputs to create.
[TxOut CtxTx] ->
IO (Either (TxBodyErrorAutoBalance Era) TxBody)
IO (Either (TxBodyErrorAutoBalance Era) Tx)
buildTransaction networkId socket changeAddress utxoToSpend collateral outs = do
pparams <- queryProtocolParameters networkId socket QueryTip
systemStart <- querySystemStart networkId socket QueryTip
eraHistory <- queryEraHistory networkId socket QueryTip
stakePools <- queryStakePools networkId socket QueryTip
pure $
second balancedTxBody $
second ((\(UnsignedTx unsignedTx) -> fromLedgerTx unsignedTx) . balancedTxBody) $
makeTransactionBodyAutoBalance
shelleyBasedEra
systemStart
Expand Down
6 changes: 5 additions & 1 deletion hydra-node/src/Hydra/Chain/ScriptRegistry.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module Hydra.Chain.ScriptRegistry where

import Hydra.Prelude

import Cardano.Api.Experimental.Tx (UnsignedTx (..))
import Cardano.Api.UTxO qualified as UTxO
import Hydra.Cardano.Api (
Key (..),
Expand All @@ -17,6 +18,8 @@ import Hydra.Cardano.Api (
TxIx (..),
WitCtx (..),
examplePlutusScriptAlwaysFails,
fromLedgerTx,
getTxBody,
getTxId,
makeShelleyKeyWitness,
makeSignedTransaction,
Expand Down Expand Up @@ -95,7 +98,8 @@ publishHydraScripts networkId socketPath sk = do
>>= \case
Left e ->
throwErrorAsException e
Right body -> do
Right x -> do
let body = getTxBody x
let tx = makeSignedTransaction [makeShelleyKeyWitness body (WitnessPaymentKey sk)] body
submitTransaction networkId socketPath tx
void $ awaitTransaction networkId socketPath tx
Expand Down
4 changes: 2 additions & 2 deletions hydra-plutus/scripts/mHead.plutus

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions hydra-plutus/scripts/vCommit.plutus
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"type": "PlutusScriptV2",
"description": "hydra-vCommit-0.17.0-348-gd8c94a18c3",
"cborHex": "5906cc5906c9010000323233223322323232323323232322222533533300430050033232325333573466e1d2000002112200115333573466e1d200200211220021300c00b35573c0046aae74004dd50011991919191911919192999ab9a3370e90000010999109198008018011919192999ab9a3370e9000001099191919191919191919199999999999911111111111091999999999998008068060058050048040038030028020018011980e11919192999ab9a3370e900000109991091980080180118109aba10013016357426ae880044c08c088d55cf0011aab9d00137540026ae8402cd5d08051980e0091aba100933301675ca02a6ae84020ccc059d7280a9aba10073574200c6ae84014d5d08021980e3ae357420066ae84008ccc059d710009aba1001357426ae88004d5d10009aba2001357440026ae88004d5d10009aba2001357440026ae88004d5d10009aba20011301501435573c0046aae74004dd51aba10013232325333573466e1d2000002132122223003005375c6ae8400454ccd5cd19b87480080084c848888c004014c04cd5d08008a999ab9a3370e900200109909111180100298049aba100115333573466e1d20060021321222230040053232325333573466e1d2000002132122222223005008300c357420022a666ae68cdc3a400400426424444444600e01060186ae8400454ccd5cd19b87480100084cc8848888888cc018024020c030d5d08009bae357426ae8800454ccd5cd19b87480180084cc8848888888cc008024020dd71aba1001375c6ae84d5d10008a999ab9a3370e90040010999109111111198008048041bae357420026eb4d5d09aba200115333573466e1d200a00211222222200415333573466e1d200c0021122222220031301801735573c0046aae74004dd51aba10011301501435573c0046aae74004dd51aba135744002260240226aae78008d55ce8009baa0013223232325333573466e1d200000213232333322221233330010050040030023232325333573466e1d2000002133221233001003002300c35742002660140166ae84d5d10008980b80b1aab9e00235573a0026ea8d5d0801999805bae500a35742004646464a666ae68cdc3a4000004224440062a666ae68cdc3a4004004264244460020086eb8d5d08008a999ab9a3370e9002001099091118010021aba10011301701635573c0046aae74004dd51aba10013300775c6ae84d5d10009aba200135744002260240226aae78008d55ce8009baa001223232325333573466e1d2002002112200115333573466e1d20000021321223002003300535742002260240226aae78008d55ce8009baa00123232325333573466e1d200000213212230020033005357420022a666ae68cdc3a400400426466644424466600200a0080066eb4d5d08011bad357420026eb4d5d09aba2001357440022602001e6aae78008d55ce8009baa00123232325333573466e1d20000021321223002003375c6ae8400454ccd5cd19b87480080084c8488c00400cdd71aba10011300f00e35573c0046aae74004dd5000899800bae75a4464460046eac004c05088cccd55cf800900a91919a80a9991091980080180118031aab9d001300535573c00260086ae8800cd5d08010070008a4c2601292103505435003223232325333573466e1d200000213233322212333001004003002375c6ae84008c018d5d08009bae357426ae88004d5d1000898048041aab9e00235573a0026ea8004c0048c8c8c94ccd5cd19b87480000084cc8848cc00400c008c018d5d08009bae357426ae880044c02001cd55cf0011aab9d0013754002464460046eb0004c03488cccd55cf8009007119a80698021aba100230033574400400e4646464a666ae68cdc3a4000004266442466002006004646464a666ae68cdc3a400000426eb8d5d0800898048041aab9e00235573a0026ea8d5d08009bad357426ae880044c018014d55cf0011aab9d001375400292103505431003232222350032223232533500713300a49010343303100300135300900622222222222200813300a49010343303200300235533535300900622222222222200a1300b491035054380022100222220033013225335001101022135002225333573466e3c0080204c0480044c01800cc048894cd4004403c884d4008894ccd5cd19b8f0020071301200113006003235001220022253350011008133573800400e464c66ae7000400848004c01c894cd40044010884d4008894ccd5cd19b8f00200c1333573466e1d2001001009008130060033006225335001100322135002225333573466e3c00802c4ccd5cd19b874800800402001c4c01800c488008488004488008488488cc00401000d22010b4879647261486561645631002323001001230022330020020011"
"description": "hydra-vCommit-0.19.0-21-gfd1be023e",
"cborHex": "59076e59076b010000323233223322323232323323232322222533533300430050033232325335333573466e1d2000002011010112200115335333573466e1d200200201101011220021300c00b35573c0046aae74004dd5001199191919191191919299a999ab9a3370e900000100b80b099910919800801801191919299a999ab9a3370e900000100d00c899191919191919191919199999999999911111111111091999999999998008068060058050048040038030028020018011980e1191919299a999ab9a3370e900000101401389991091980080180118109aba10013016357426ae880044c08c088d55cf0011aab9d00137540026ae8402cd5d08051980e0091aba100933301675ca02a6ae84020ccc059d7280a9aba10073574200c6ae84014d5d08021980e3ae357420066ae84008ccc059d710009aba1001357426ae88004d5d10009aba2001357440026ae88004d5d10009aba2001357440026ae88004d5d10009aba20011301501435573c0046aae74004dd51aba10013232325335333573466e1d200000201a019132122223003005375c6ae8400454cd4ccd5cd19b87480080080680644c848888c004014c04cd5d08008a99a999ab9a3370e900200100d00c89909111180100298049aba100115335333573466e1d200600201a0191321222230040053232325335333573466e1d200000201d01c132122222223005008300c357420022a66a666ae68cdc3a400400403a03826424444444600e01060186ae8400454cd4ccd5cd19b87480100080740704cc8848888888cc018024020c030d5d08009bae357426ae8800454cd4ccd5cd19b87480180080740704cc8848888888cc008024020dd71aba1001375c6ae84d5d10008a99a999ab9a3370e900400100e80e0999109111111198008048041bae357420026eb4d5d09aba200115335333573466e1d200a00201d01c11222222200415335333573466e1d200c00201d01c1122222220031301801735573c0046aae74004dd51aba10011301501435573c0046aae74004dd51aba135744002260240226aae78008d55ce8009baa0013223232325335333573466e1d200000201701613232333322221233330010050040030023232325335333573466e1d200000201c01b133221233001003002300c35742002660140166ae84d5d10008980b80b1aab9e00235573a0026ea8d5d0801999805bae500a35742004646464a66a666ae68cdc3a4000004038036224440062a66a666ae68cdc3a4004004038036264244460020086eb8d5d08008a99a999ab9a3370e900200100e00d899091118010021aba10011301701635573c0046aae74004dd51aba10013300775c6ae84d5d10009aba200135744002260240226aae78008d55ce8009baa001223232325335333573466e1d2002002017016112200115335333573466e1d20000020170161321223002003300535742002260240226aae78008d55ce8009baa00123232325335333573466e1d200000201501413212230020033005357420022a66a666ae68cdc3a400400402a02826466644424466600200a0080066eb4d5d08011bad357420026eb4d5d09aba2001357440022602001e6aae78008d55ce8009baa00123232325335333573466e1d20000020140131321223002003375c6ae8400454cd4ccd5cd19b874800800805004c4c8488c00400cdd71aba10011300f00e35573c0046aae74004dd5000899800bae75a4464460046eac004c05088cccd55cf800900a91919a80a9991091980080180118031aab9d001300535573c00260086ae8800cd5d08010070008a4c26012920103505435003223232325335333573466e1d200000200e00d13233322212333001004003002375c6ae84008c018d5d08009bae357426ae88004d5d1000898048041aab9e00235573a0026ea8004c0048c8c8c94cd4ccd5cd19b87480000080340304cc8848cc00400c008c018d5d08009bae357426ae880044c02001cd55cf0011aab9d0013754002464460046eb0004c03488cccd55cf8009007119a80698021aba100230033574400400e4646464a66a666ae68cdc3a4000004016014266442466002006004646464a66a666ae68cdc3a400000401c01a26eb8d5d0800898048041aab9e00235573a0026ea8d5d08009bad357426ae880044c018014d55cf0011aab9d001375400292103505431003232222350032223232533500713300a49010343303100300135300900622222222222200813300a49010343303200300235533535300900622222222222200a1300b491035054380022100222220033013225335001101022135002225335333573466e3c0080200540504c0480044c01800cc048894cd4004403c884d4008894cd4ccd5cd19b8f0020070140131301200113006003235001220022253350011008133573800400e464c66ae7000400848004c01c894cd40044010884d4008894cd4ccd5cd19b8f00200c0090081333573466e1c004cdc0a4000900100480409803001980311299a80088019109a80111299a999ab9a3371e00401601000e2666ae68cdc3a400400201000e2600c006244004244002244004244244660020080069110b4879647261486561645631002323001001230022330020020011"
}
Loading
Loading