Skip to content

Commit 4bb2048

Browse files
authored
Merge pull request #5648 from IntersectMBO/zliu41/880pre
8.8.0-pre
2 parents 32a7687 + 0ba03ab commit 4bb2048

File tree

48 files changed

+493
-380
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+493
-380
lines changed

.github/workflows/check-mainnet-config.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,3 @@ jobs:
5656
exit 1
5757
fi
5858
done
59-

.github/workflows/haskell.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838

3939
env:
4040
# Modify this value to "invalidate" the cabal cache.
41-
CABAL_CACHE_VERSION: "2024-01-24"
41+
CABAL_CACHE_VERSION: "2024-02-07"
4242

4343
concurrency:
4444
group: >

bench/locli/locli.cabal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ library
121121
, optparse-generic
122122
, ouroboros-consensus
123123
-- for Data.SOP.Strict:
124-
, ouroboros-network ^>= 0.10
124+
, ouroboros-network ^>= 0.11
125125
, ouroboros-network-api
126126
, process
127127
, quiet
@@ -175,7 +175,7 @@ test-suite test-locli
175175
build-depends: cardano-prelude
176176
, containers
177177
, hedgehog
178-
, hedgehog-extras ^>= 0.6.0.1
178+
, hedgehog-extras ^>= 0.6.0
179179
, locli
180180
, text
181181

bench/plutus-scripts-bench/plutus-scripts-bench.cabal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ common project-config
2727
if os(windows)
2828
buildable: False
2929

30-
if impl(ghc < 9)
30+
if impl(ghc < 9.6)
3131
buildable: False
3232

3333

@@ -73,7 +73,7 @@ library
7373
-- IOG dependencies
7474
--------------------------
7575
build-depends:
76-
, cardano-api ^>= 8.37.1.0
76+
, cardano-api ^>= 8.38
7777
, plutus-ledger-api >=1.0.0
7878
, plutus-tx >=1.0.0
7979
, plutus-tx-plugin >=1.0.0

bench/plutus-scripts-bench/src/Cardano/Benchmarking/PlutusScripts/CustomCallTypes.hs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
{-# LANGUAGE TemplateHaskell #-}
55
{-# LANGUAGE TypeApplications #-}
66
{-# LANGUAGE TypeFamilies #-}
7+
{-# LANGUAGE ViewPatterns #-}
78

89
module Cardano.Benchmarking.PlutusScripts.CustomCallTypes
910
where

bench/tx-generator/src/Cardano/Benchmarking/Script/Core.hs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ import Cardano.Benchmarking.Script.Env hiding (Error (TxGenError))
7373
import qualified Cardano.Benchmarking.Script.Env as Env (Error (TxGenError))
7474
import Cardano.Benchmarking.Script.Types
7575
import Cardano.Benchmarking.Version as Version
76+
import Ouroboros.Network.Protocol.LocalStateQuery.Type (Target (..))
7677

7778
liftCoreWithEra :: AnyCardanoEra -> (forall era. IsShelleyBasedEra era => AsType era -> ExceptT TxGenError IO x) -> ActionM (Either TxGenError x)
7879
liftCoreWithEra era coreCall = withEra era ( liftIO . runExceptT . coreCall)
@@ -167,7 +168,7 @@ queryEra :: ActionM AnyCardanoEra
167168
queryEra = do
168169
localNodeConnectInfo <- getLocalConnectInfo
169170
chainTip <- liftIO $ getLocalChainTip localNodeConnectInfo
170-
ret <- liftIO $ queryNodeLocalState localNodeConnectInfo (Just $ chainTipToChainPoint chainTip) QueryCurrentEra
171+
ret <- liftIO $ queryNodeLocalState localNodeConnectInfo (SpecificPoint $ chainTipToChainPoint chainTip) QueryCurrentEra
171172
case ret of
172173
Right era -> return era
173174
Left err -> liftTxGenError $ TxGenError $ show err
@@ -182,7 +183,7 @@ queryRemoteProtocolParameters = do
182183
QueryInEra era (Ledger.PParams (ShelleyLedgerEra era))
183184
-> ActionM ProtocolParameters
184185
callQuery query@(QueryInShelleyBasedEra shelleyEra _) = do
185-
res <- liftIO $ queryNodeLocalState localNodeConnectInfo (Just $ chainTipToChainPoint chainTip) (QueryInEra query)
186+
res <- liftIO $ queryNodeLocalState localNodeConnectInfo (SpecificPoint $ chainTipToChainPoint chainTip) (QueryInEra query)
186187
case res of
187188
Right (Right pp) -> do
188189
let pp' = fromLedgerPParams shelleyEra pp

bench/tx-generator/src/Cardano/TxGenerator/Setup/Plutus.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import Cardano.CLI.Read (readFileScriptInAnyLang)
2727
import Cardano.Api
2828
import Cardano.Api.Shelley (PlutusScript (..), ProtocolParameters (..), fromAlonzoExUnits,
2929
protocolParamCostModels, toPlutusData)
30-
import Cardano.Ledger.Alonzo.Plutus.TxInfo (exBudgetToExUnits)
30+
import Cardano.Ledger.Plutus.TxInfo (exBudgetToExUnits)
3131

3232
import qualified PlutusLedgerApi.V1 as PlutusV1
3333
import qualified PlutusLedgerApi.V2 as PlutusV2
@@ -252,7 +252,7 @@ preExecutePlutusV3 (major, _minor) (PlutusScript _ (PlutusScriptSerialised (scri
252252
dummyTxInfo = PlutusV3.TxInfo
253253
{ PlutusV3.txInfoInputs = []
254254
, PlutusV3.txInfoOutputs = []
255-
, PlutusV3.txInfoFee = mempty
255+
, PlutusV3.txInfoFee = 0
256256
, PlutusV3.txInfoMint = mempty
257257
, PlutusV3.txInfoTxCerts = []
258258
, PlutusV3.txInfoWdrl = PlutusV3.fromList []

bench/tx-generator/tx-generator.cabal

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ common project-config
2626
buildable: False
2727

2828
common with-library
29-
if impl(ghc >= 9)
29+
if impl(ghc >= 9.6)
3030
build-depends: plutus-scripts-bench
3131
cpp-options: -DWITH_LIBRARY
3232

@@ -98,9 +98,9 @@ library
9898
, attoparsec-aeson
9999
, base16-bytestring
100100
, bytestring
101-
, cardano-api ^>= 8.37.1.0
101+
, cardano-api ^>= 8.38
102102
, cardano-binary
103-
, cardano-cli ^>= 8.19.0.0
103+
, cardano-cli ^>= 8.20.0.0
104104
, cardano-crypto-class
105105
, cardano-crypto-wrapper
106106
, cardano-data

cabal.project

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ repository cardano-haskell-packages
1313
-- See CONTRIBUTING for information about these, including some Nix commands
1414
-- you need to run if you change them
1515
index-state:
16-
, hackage.haskell.org 2024-01-24T13:20:47Z
17-
, cardano-haskell-packages 2024-01-23T08:57:44Z
16+
, hackage.haskell.org 2024-02-06T15:14:59Z
17+
, cardano-haskell-packages 2024-02-07T07:51:35Z
1818

1919
packages:
2020
cardano-git-rev

cardano-node-chairman/cardano-node-chairman.cabal

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ executable cardano-node-chairman
4444
build-depends: cardano-api
4545
, cardano-crypto-class
4646
, cardano-git-rev
47-
, cardano-node ^>= 8.7
47+
, cardano-node ^>= 8.8
4848
, cardano-prelude
4949
, containers
5050
, contra-tracer
@@ -73,7 +73,7 @@ test-suite chairman-tests
7373
, cardano-crypto-class ^>= 2.1.2
7474
, filepath
7575
, hedgehog
76-
, hedgehog-extras ^>= 0.6.0.1
76+
, hedgehog-extras ^>= 0.6.0
7777
, network
7878
, process
7979
, random
@@ -89,5 +89,5 @@ test-suite chairman-tests
8989
ghc-options: -threaded -rtsopts -with-rtsopts=-N -with-rtsopts=-T
9090

9191
build-tool-depends: cardano-node:cardano-node
92-
, cardano-cli:cardano-cli ^>= 8.19.0.0
92+
, cardano-cli:cardano-cli ^>= 8.20
9393
, cardano-node-chairman:cardano-node-chairman

cardano-node/cardano-node.cabal

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cabal-version: 3.0
22

33
name: cardano-node
4-
version: 8.7.2
4+
version: 8.8.0
55
synopsis: The cardano full node
66
description: The cardano full node.
77
category: Cardano,
@@ -144,7 +144,7 @@ library
144144
, async
145145
, base16-bytestring
146146
, bytestring
147-
, cardano-api ^>= 8.37.1.0
147+
, cardano-api ^>= 8.38
148148
, cardano-crypto-class
149149
, cardano-crypto-wrapper
150150
, cardano-git-rev
@@ -183,14 +183,14 @@ library
183183
, network-mux >= 0.4
184184
, nothunks
185185
, optparse-applicative-fork >= 0.18.1
186-
, ouroboros-consensus ^>= 0.14
187-
, ouroboros-consensus-cardano ^>= 0.12
188-
, ouroboros-consensus-diffusion ^>= 0.9
186+
, ouroboros-consensus ^>= 0.15
187+
, ouroboros-consensus-cardano ^>= 0.13
188+
, ouroboros-consensus-diffusion ^>= 0.10
189189
, ouroboros-consensus-protocol
190190
, ouroboros-network-api
191-
, ouroboros-network ^>= 0.10
191+
, ouroboros-network ^>= 0.11
192192
, ouroboros-network-framework
193-
, ouroboros-network-protocols ^>= 0.6
193+
, ouroboros-network-protocols ^>= 0.7
194194
, prettyprinter
195195
, prettyprinter-ansi-terminal
196196
, psqueues
@@ -245,7 +245,7 @@ test-suite cardano-node-test
245245
, bytestring
246246
, cardano-crypto-class
247247
, cardano-crypto-wrapper
248-
, cardano-api
248+
, cardano-api:{cardano-api, internal}
249249
, cardano-ledger-core
250250
, cardano-node
251251
, cardano-slotting

cardano-node/src/Cardano/Node/Orphans.hs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{-# LANGUAGE FlexibleInstances #-}
22
{-# LANGUAGE NamedFieldPuns #-}
3-
{-# LANGUAGE StandaloneDeriving #-}
43

54
{-# OPTIONS_GHC -Wno-orphans #-}
65

@@ -9,27 +8,12 @@ module Cardano.Node.Orphans () where
98
import Cardano.Api ()
109

1110
import Data.Aeson.Types
12-
import qualified Data.Text as Text
1311

14-
import Cardano.BM.Data.Tracer (TracingVerbosity (..))
1512
import Ouroboros.Network.NodeToNode (AcceptedConnectionsLimit (..))
1613
import Ouroboros.Network.SizeInBytes (SizeInBytes (..))
1714

1815
import Text.Printf (PrintfArg (..))
1916

20-
21-
instance FromJSON TracingVerbosity where
22-
parseJSON (String str) = case str of
23-
"MinimalVerbosity" -> pure MinimalVerbosity
24-
"MaximalVerbosity" -> pure MaximalVerbosity
25-
"NormalVerbosity" -> pure NormalVerbosity
26-
err -> fail $ "Parsing of TracingVerbosity failed, "
27-
<> Text.unpack err <> " is not a valid TracingVerbosity"
28-
parseJSON invalid = fail $ "Parsing of TracingVerbosity failed due to type mismatch. "
29-
<> "Encountered: " <> show invalid
30-
31-
deriving instance Show TracingVerbosity
32-
3317
instance PrintfArg SizeInBytes where
3418
formatArg (SizeInBytes s) = formatArg s
3519

cardano-node/src/Cardano/Node/Tracing/Era/Shelley.hs

Lines changed: 44 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import qualified Cardano.Crypto.VRF.Class as Crypto
2525
import Cardano.Ledger.Allegra.Rules (AllegraUtxoPredFailure)
2626
import qualified Cardano.Ledger.Allegra.Rules as Allegra
2727
import qualified Cardano.Ledger.Allegra.Scripts as Allegra
28-
import qualified Cardano.Ledger.Alonzo.PlutusScriptApi as Alonzo
28+
import qualified Cardano.Ledger.Alonzo.Plutus.Evaluate as Alonzo
2929
import Cardano.Ledger.Alonzo.Rules (AlonzoBbodyPredFailure, AlonzoUtxoPredFailure,
3030
AlonzoUtxosPredFailure, AlonzoUtxowPredFailure (..))
3131
import qualified Cardano.Ledger.Alonzo.Rules as Alonzo
@@ -72,7 +72,7 @@ import Ouroboros.Network.Point (WithOrigin, withOriginToMaybe)
7272

7373
import Data.Aeson (ToJSON (..), Value (..), (.=))
7474
import qualified Data.ByteString.Base16 as B16
75-
import qualified Data.Map.Strict as Map
75+
import qualified Data.List.NonEmpty as NonEmpty
7676
import Data.Set (Set)
7777
import qualified Data.Set as Set
7878
import Data.Text (Text)
@@ -341,16 +341,18 @@ instance
341341
DelegsFailure f -> forMachine dtal f
342342

343343
instance
344-
( Consensus.ShelleyBasedEra era
345-
, Ledger.EraCrypto era ~ StandardCrypto
346-
, LogFormatting (PPUPPredFailure era)
347-
, LogFormatting (PredicateFailure (Ledger.EraRule "UTXO" era))
348-
) => LogFormatting (AlonzoUtxowPredFailure era) where
344+
( Api.ShelleyLedgerEra era ~ ledgerera
345+
, Api.IsShelleyBasedEra era
346+
, Consensus.ShelleyBasedEra ledgerera
347+
, Ledger.EraCrypto ledgerera ~ StandardCrypto
348+
, LogFormatting (PPUPPredFailure ledgerera)
349+
, LogFormatting (PredicateFailure (Ledger.EraRule "UTXO" ledgerera))
350+
) => LogFormatting (AlonzoUtxowPredFailure ledgerera) where
349351
forMachine dtal (ShelleyInAlonzoUtxowPredFailure utxoPredFail) =
350352
forMachine dtal utxoPredFail
351353
forMachine _ (MissingRedeemers scripts) =
352354
mconcat [ "kind" .= String "MissingRedeemers"
353-
, "scripts" .= renderMissingRedeemers scripts
355+
, "scripts" .= renderMissingRedeemers Api.shelleyBasedEra scripts
354356
]
355357
forMachine _ (MissingRequiredDatums required received) =
356358
mconcat [ "kind" .= String "MissingRequiredDatums"
@@ -378,10 +380,15 @@ instance
378380
, "acceptable" .= Set.toList acceptable
379381
]
380382
forMachine _ (ExtraRedeemers rdmrs) =
381-
mconcat
382-
[ "kind" .= String "ExtraRedeemers"
383-
, "rdmrs" .= map Api.fromAlonzoRdmrPtr rdmrs
384-
]
383+
Api.caseShelleyToMaryOrAlonzoEraOnwards
384+
(const mempty)
385+
(\alonzoOnwards ->
386+
mconcat
387+
[ "kind" .= String "ExtraRedeemers"
388+
, "rdmrs" .= map (Api.toScriptIndex alonzoOnwards) rdmrs
389+
]
390+
)
391+
(Api.shelleyBasedEra :: Api.ShelleyBasedEra era)
385392

386393
instance
387394
( Consensus.ShelleyBasedEra era
@@ -1054,13 +1061,15 @@ instance
10541061
]
10551062

10561063
instance
1057-
( Ledger.Era era
1058-
, Ledger.EraCrypto era ~ StandardCrypto
1059-
, ShelleyBasedEra era
1060-
, LogFormatting (PPUPPredFailure era)
1061-
, LogFormatting (ShelleyUtxowPredFailure era)
1062-
, LogFormatting (PredicateFailure (Ledger.EraRule "UTXO" era))
1063-
) => LogFormatting (BabbageUtxowPredFailure era) where
1064+
( Api.ShelleyLedgerEra era ~ ledgerera
1065+
, Api.IsShelleyBasedEra era
1066+
, Ledger.Era ledgerera
1067+
, Ledger.EraCrypto ledgerera ~ StandardCrypto
1068+
, ShelleyBasedEra ledgerera
1069+
, LogFormatting (PPUPPredFailure ledgerera)
1070+
, LogFormatting (ShelleyUtxowPredFailure ledgerera)
1071+
, LogFormatting (PredicateFailure (Ledger.EraRule "UTXO" ledgerera))
1072+
) => LogFormatting (BabbageUtxowPredFailure ledgerera) where
10641073
forMachine v err =
10651074
case err of
10661075
Babbage.AlonzoInBabbageUtxowPredFailure alonzoFail ->
@@ -1102,7 +1111,7 @@ instance
11021111
) => LogFormatting (Conway.ConwayGovPredFailure era) where
11031112
forMachine _ (Conway.GovActionsDoNotExist govActionIds) =
11041113
mconcat [ "kind" .= String "GovActionsDoNotExist"
1105-
, "govActionId" .= map govActionIdToText (Set.toList govActionIds)
1114+
, "govActionId" .= map govActionIdToText (NonEmpty.toList govActionIds)
11061115
]
11071116
forMachine _ (Conway.MalformedProposal govAction) =
11081117
mconcat [ "kind" .= String "MalformedProposal"
@@ -1125,7 +1134,7 @@ instance
11251134
]
11261135
forMachine _ (Conway.DisallowedVoters govActionIdToVoter) =
11271136
mconcat [ "kind" .= String "DisallowedVoters"
1128-
, "govActionIdToVoter" .= Map.toList govActionIdToVoter
1137+
, "govActionIdToVoter" .= NonEmpty.toList govActionIdToVoter
11291138
]
11301139
forMachine _ (Conway.ConflictingCommitteeUpdate creds) =
11311140
mconcat [ "kind" .= String "ConflictingCommitteeUpdate"
@@ -1135,14 +1144,25 @@ instance
11351144
mconcat [ "kind" .= String "ExpirationEpochTooSmall"
11361145
, "credentialsToEpoch" .= credsToEpoch
11371146
]
1138-
forMachine _ (Conway.InvalidPrevGovActionIdsInProposals proposals) =
1139-
mconcat [ "kind" .= String "InvalidPrevGovActionIdsInProposals"
1140-
, "proposals" .= proposals
1147+
forMachine _ (Conway.InvalidPrevGovActionId proposalProcedure) =
1148+
mconcat [ "kind" .= String "InvalidPrevGovActionId"
1149+
, "proposalProcedure" .= proposalProcedure
11411150
]
11421151
forMachine _ (Conway.VotingOnExpiredGovAction actions) =
11431152
mconcat [ "kind" .= String "VotingOnExpiredGovAction"
11441153
, "action" .= actions
11451154
]
1155+
forMachine _ (Conway.ProposalCantFollow prevGovActionId protVer prevProtVer) =
1156+
mconcat [ "kind" .= String "ProposalCantFollow"
1157+
, "prevGovActionId" .= prevGovActionId
1158+
, "protVer" .= protVer
1159+
, "prevProtVer" .= prevProtVer
1160+
]
1161+
forMachine _ (Conway.InvalidPolicyHash actualPolicyHash expectedPolicyHash) =
1162+
mconcat [ "kind" .= String "InvalidPolicyHash"
1163+
, "actualPolicyHash" .= actualPolicyHash
1164+
, "expectedPolicyHash" .= expectedPolicyHash
1165+
]
11461166

11471167
instance
11481168
( Consensus.ShelleyBasedEra era

0 commit comments

Comments
 (0)