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

ghc: 9.6 -> 9.10 #1611

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
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
53 changes: 51 additions & 2 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ repository cardano-haskell-packages

-- See CONTRIBUTING.md for information about when and how to update these.
index-state:
, hackage.haskell.org 2024-07-19T19:07:04Z
, cardano-haskell-packages 2024-07-19T19:04:02Z
, hackage.haskell.org 2024-09-23T15:45:50Z
, cardano-haskell-packages 2024-09-20T19:39:13Z

packages:
hydra-prelude
Expand Down Expand Up @@ -41,3 +41,52 @@ benchmarks: True

-- Always show detailed output for tests
test-show-details: direct

constraints: plutus-core == 1.34.1.0

allow-newer: plutus-core
allow-newer: plutus-tx
allow-newer: plutus-ledger-api
allow-newer: prettyprinter-configurable

source-repository-package
type: git
location: https://github.com/locallycompact/plutus
tag: 393809cf734dfbbedd0a3b9aae5fd1b7d7812ef1
subdir:
plutus-core
plutus-ledger-api
plutus-tx
plutus-tx-plugin
--sha256: sha256-GXYA6HNLUDfID8HMDKPhxaXEp+1okESqA01xSt8zLoY=

source-repository-package
type: git
location: https://github.com/locallycompact/websockets
tag: a0ec91c7ec6861ac576259f63692c216177eee78
--sha256: sha256-fSOKbwTDd8zC7xDa+poTNf6F8DfSrApqgHrSod1Ejkc=

source-repository-package
type: git
location: https://github.com/erikd/ekg-wai
tag: 37620ea26f703ff65c61cbe0e22c545d85bd817a
--sha256: sha256-R+kBg6ckOOFnVn3qMBmnF57VzWqM2B36AdSjBzs75h0=

source-repository-package
type: git
location: https://github.com/ysangkok/openapi3
tag: a41903b6c548dc5c7c9d070cc4d4851799a9c866
--sha256: sha256-EowHNo1Y4G27SAf/b2V4eBr1RIgNcvn7LgjCZpB1bU8=

source-repository-package
type: git
location: https://github.com/IntersectMBO/ouroboros-consensus
tag: 0ea6deb139d7dd4a08e63e234e1a45bbb9cac44d
--sha256: sha256-aIG0UimMklmHXjqqjpY3Dg3c7PDpSgs4nlfcSSxyv9w=
subdir:
ouroboros-consensus
ouroboros-consensus-cardano
ouroboros-consensus-diffusion
ouroboros-consensus-protocol
sop-extras
strict-sop-core
69 changes: 43 additions & 26 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 9 additions & 8 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
];
perSystem = { pkgs, config, lib, system, ... }:
let
compiler = "ghc966";
compiler = "ghc9101";

# nixpkgs enhanced with haskell.nix and crypto libs as used by iohk

Expand All @@ -70,16 +70,16 @@
inputs.nix-npm-buildpackage.overlays.default
# Specific versions of tools we require
(final: prev: {
apply-refact = pkgs.haskell-nix.tool compiler "apply-refact" "0.14.0.0";
#apply-refact = pkgs.haskell-nix.tool compiler "apply-refact" "0.14.0.0";
cabal-fmt = pkgs.haskell-nix.tool compiler "cabal-fmt" "0.1.9";
cabal-install = pkgs.haskell-nix.cabal-install.${compiler};
cabal-plan = pkgs.haskell-nix.tool compiler "cabal-plan" "0.7.3.0";
fourmolu = pkgs.haskell-nix.tool compiler "fourmolu" "0.14.1.0";
cabal-install = pkgs.haskell-nix.tool compiler "cabal-install" "3.12.1.0";
cabal-plan = pkgs.haskell-nix.tool compiler "cabal-plan" "0.7.4.0";
fourmolu = pkgs.haskell-nix.tool compiler "fourmolu" "0.16.2.0";
haskell-language-server = pkgs.haskell-nix.tool compiler "haskell-language-server" rec {
src = inputs.hls;
cabalProject = builtins.readFile (src + "/cabal.project");
};
hlint = pkgs.haskell-nix.tool compiler "hlint" "3.8";
# hlint = pkgs.haskell-nix.tool compiler "hlint" "3.8";
cardano-cli = inputs.cardano-node.packages.${system}.cardano-cli;
cardano-node = inputs.cardano-node.packages.${system}.cardano-node;
mithril-client-cli = inputs.mithril.packages.${system}.mithril-client-cli;
Expand Down Expand Up @@ -149,7 +149,7 @@
pkgs.nixpkgs-fmt
pkgs.fourmolu
];
treefmt = pkgs.treefmt;
treefmt = pkgsLatest.treefmt;
};
} // lib.attrsets.mergeAttrsList (map (x: componentsToWerrors x hsPkgs.${x}) [
"hydra-cardano-api"
Expand All @@ -167,7 +167,8 @@
]);

devShells = import ./nix/hydra/shell.nix {
inherit inputs pkgs hsPkgs system compiler pkgsLatest;
inherit inputs pkgs hsPkgs system pkgsLatest;
ghc = pkgs.buildPackages.haskell-nix.compiler.${compiler};
};
};
};
Expand Down
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
Loading
Loading