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

Node release 8.10 #5734

Merged
merged 1 commit into from
Apr 6, 2024
Merged
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
4 changes: 2 additions & 2 deletions bench/locli/src/Cardano/Analysis/API/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,8 @@ testSlotStats :: Genesis -> SlotStats a -> SlotCond -> Bool
testSlotStats g SlotStats{..} = \case
SlotGEq s -> slSlot >= s
SlotLEq s -> slSlot <= s
EpochGEq s -> fromIntegral (unEpochNo slEpoch) >= s
EpochLEq s -> fromIntegral (unEpochNo slEpoch) <= s
EpochGEq s -> slEpoch >= s
EpochLEq s -> slEpoch <= s
SlotHasLeaders -> slCountLeads > 0
EpochSafeIntGEq i -> slEpochSafeInt >= i
EpochSafeIntLEq i -> slEpochSafeInt <= i
Expand Down
2 changes: 1 addition & 1 deletion bench/locli/src/Cardano/Analysis/MachPerf.hs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ timelineFromLogObjects run@Run{genesis} (f, xs') =
zeroSlotStats =
SlotStats
{ slSlot = impliedSlot genesis firstRelevantLogObjectTime
, slEpoch = 0
, slEpoch = EpochNo 0
, slEpochSlot = 0
, slEpochSafeInt = 0
, slStart = SlotStart firstRelevantLogObjectTime
Expand Down
4 changes: 2 additions & 2 deletions bench/plutus-scripts-bench/plutus-scripts-bench.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ library
-- IOG dependencies
--------------------------
build-depends:
, cardano-api ^>= 8.42.0.0
, cardano-api ^>= 8.44
, plutus-ledger-api >=1.0.0
, plutus-tx >=1.0.0
, plutus-tx-plugin ^>=1.21
, plutus-tx-plugin ^>=1.23

------------------------
-- Non-IOG dependencies
Expand Down
7 changes: 3 additions & 4 deletions bench/tx-generator/src/Cardano/TxGenerator/Fund.hs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module Cardano.TxGenerator.Fund
-- $Accessors
, getFundTxIn
, getFundKey
, getFundLovelace
, getFundCoin
, getFundWitness
)
where
Expand Down Expand Up @@ -68,9 +68,8 @@ getFundTxIn (Fund (InAnyCardanoEra _ a)) = _fundTxIn a
getFundKey :: Fund -> Maybe (SigningKey PaymentKey)
getFundKey (Fund (InAnyCardanoEra _ a)) = _fundSigningKey a

-- | Converting a `TxOutValue` to `Lovelace` requires case analysis.
getFundLovelace :: Fund -> L.Coin
getFundLovelace (Fund (InAnyCardanoEra _ a)) = case _fundVal a of
getFundCoin :: Fund -> L.Coin
getFundCoin (Fund (InAnyCardanoEra _ a)) = case _fundVal a of
TxOutValueByron l -> l
TxOutValueShelleyBased era v -> selectLovelace $ Api.fromLedgerValue era v

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ generateTxPure TxEnvironment{..} inQueue
collateralFunds :: (TxInsCollateral BabbageEra, [Fund])
collateralFunds = (TxInsCollateralNone, [])

outValues = computeOutputValues $ map getFundLovelace inputs
outValues = computeOutputValues $ map getFundCoin inputs
(outputs, toFunds) = makeToUTxOList (repeat computeUTxO) outValues

computeOutputValues :: [L.Coin] -> [L.Coin]
Expand Down
8 changes: 4 additions & 4 deletions bench/tx-generator/src/Cardano/TxGenerator/Tx.hs
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ sourceToStoreTransaction txGenerator fundSource inToOut mkTxOut fundToStore =
where
go inputFunds = do
let
-- 'getFundLovelace' unwraps the 'TxOutValue' in a fund field
-- 'getFundCoin' unwraps the 'TxOutValue' in a fund field
-- so it's all just 'Lovelace' instead of a coproduct
-- maintaining distinctions.
outValues = inToOut $ map getFundLovelace inputFunds
outValues = inToOut $ map getFundCoin inputFunds
(outputs, toFunds) = mkTxOut outValues
case txGenerator inputFunds outputs of
Left err -> return $ Left err
Expand Down Expand Up @@ -102,7 +102,7 @@ sourceToStoreTransactionNew txGenerator fundSource valueSplitter toStore =
where
go inputFunds = do
let
split = valueSplitter $ map getFundLovelace inputFunds
split = valueSplitter $ map getFundCoin inputFunds
(outputs, storeAction) = toStore split
case txGenerator inputFunds outputs of
Left err -> return $ Left err
Expand Down Expand Up @@ -144,7 +144,7 @@ sourceTransactionPreview txGenerator inputFunds valueSplitter toStore =
second fst $
txGenerator inputFunds outputs
where
split = valueSplitter $ map getFundLovelace inputFunds
split = valueSplitter $ map getFundCoin inputFunds
(outputs, _) = toStore split

-- | 'genTx' seems to mostly be a wrapper for
Expand Down
4 changes: 2 additions & 2 deletions bench/tx-generator/tx-generator.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ library
, attoparsec-aeson
, base16-bytestring
, bytestring
, cardano-api ^>= 8.42.0.0
, cardano-api ^>= 8.44
, cardano-binary
, cardano-cli ^>= 8.21.0.0
, cardano-cli ^>= 8.22
, cardano-crypto-class
, cardano-crypto-wrapper
, cardano-data
Expand Down
2 changes: 1 addition & 1 deletion cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repository cardano-haskell-packages
-- you need to run if you change them
index-state:
, hackage.haskell.org 2024-03-26T06:28:59Z
, cardano-haskell-packages 2024-03-25T11:11:00Z
, cardano-haskell-packages 2024-04-05T07:51:28Z

packages:
cardano-node
Expand Down
4 changes: 2 additions & 2 deletions cardano-node-chairman/cardano-node-chairman.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ executable cardano-node-chairman
build-depends: cardano-api
, cardano-crypto-class
, cardano-git-rev ^>=0.2.2
, cardano-node ^>= 8.9
, cardano-node ^>= 8.10
, cardano-prelude
, containers
, contra-tracer
Expand Down Expand Up @@ -88,5 +88,5 @@ test-suite chairman-tests
ghc-options: -threaded -rtsopts "-with-rtsopts=-N -T"

build-tool-depends: cardano-node:cardano-node
, cardano-cli:cardano-cli ^>= 8.21.0.0
, cardano-cli:cardano-cli ^>= 8.22.0.0
, cardano-node-chairman:cardano-node-chairman
12 changes: 6 additions & 6 deletions cardano-node/cardano-node.cabal
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cabal-version: 3.0

name: cardano-node
version: 8.9.0
version: 8.10.0
synopsis: The cardano full node
description: The cardano full node.
category: Cardano,
Expand Down Expand Up @@ -144,7 +144,7 @@ library
, async
, base16-bytestring
, bytestring
, cardano-api ^>= 8.42.0.0
, cardano-api ^>= 8.44
, cardano-crypto-class
, cardano-crypto-wrapper
, cardano-git-rev ^>=0.2.2
Expand All @@ -158,7 +158,7 @@ library
, cardano-ledger-shelley
, cardano-prelude
, cardano-protocol-tpraos >= 1.0.2
, cardano-slotting >= 0.1.1
, cardano-slotting >= 0.2
, cborg ^>= 0.2.4
, containers
, contra-tracer
Expand All @@ -183,9 +183,9 @@ library
, network-mux >= 0.4
, nothunks
, optparse-applicative-fork >= 0.18.1
, ouroboros-consensus ^>= 0.16
, ouroboros-consensus-cardano ^>= 0.14
, ouroboros-consensus-diffusion ^>= 0.12
, ouroboros-consensus ^>= 0.17
, ouroboros-consensus-cardano ^>= 0.15
, ouroboros-consensus-diffusion ^>= 0.13
, ouroboros-consensus-protocol
, ouroboros-network-api ^>= 0.7.1
, ouroboros-network ^>= 0.13
Expand Down
3 changes: 3 additions & 0 deletions cardano-node/src/Cardano/Node/Protocol/Cardano.hs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import Ouroboros.Consensus.Cardano
import qualified Ouroboros.Consensus.Cardano as Consensus
import qualified Ouroboros.Consensus.Cardano.CanHardFork as Consensus
import Ouroboros.Consensus.Cardano.Condense ()
import Ouroboros.Consensus.Config (emptyCheckpointsMap)
import Ouroboros.Consensus.HardFork.Combinator.Condense ()
import qualified Ouroboros.Consensus.Mempool.Capacity as TxLimits
import qualified Ouroboros.Consensus.Shelley.Node.Praos as Praos
Expand Down Expand Up @@ -305,6 +306,8 @@ mkSomeConsensusProtocolCardano NodeByronProtocolConfiguration {
(maybe 9 fromIntegral npcTestConwayHardForkAtVersion)
Just epochNo -> Consensus.TriggerHardForkAtEpoch epochNo
}
-- TODO: once https://github.com/IntersectMBO/cardano-node/issues/5730 is implemented 'emptyCheckpointsMap' needs to be replaced with the checkpoints map read from a configuration file.
, checkpoints = emptyCheckpointsMap
amesgen marked this conversation as resolved.
Show resolved Hide resolved
}

----------------------------------------------------------------------
Expand Down
47 changes: 39 additions & 8 deletions cardano-node/src/Cardano/Node/Tracing/Era/Shelley.hs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,13 @@ instance LogFormatting (Conway.ConwayGovCertPredFailure era) where
, "credential" .= String (textShow kHash)
, "error" .= String "Committee has resigned"
]
Conway.ConwayDRepIncorrectRefund givenRefund expectedRefund ->
[ "kind" .= String "ConwayDRepIncorrectRefund"
, "givenRefund" .= givenRefund
, "expectedRefund" .= expectedRefund
, "error" .= String "Refunds mismatch"
]



instance LogFormatting (Conway.ConwayDelegPredFailure era) where
Expand Down Expand Up @@ -184,7 +191,7 @@ instance
, LogFormatting (PredicateFailure (Ledger.EraRule "LEDGER" era))
) => LogFormatting (ApplyTxError era) where
forMachine dtal (ApplyTxError predicateFailures) =
mconcat $ map (forMachine dtal) predicateFailures
mconcat $ NonEmpty.toList $ fmap (forMachine dtal) predicateFailures

instance
( Ledger.Crypto era
Expand All @@ -211,7 +218,7 @@ instance
) => LogFormatting (ShelleyLedgerError era) where
forMachine dtal (BBodyError (BlockTransitionError fs)) =
mconcat [ "kind" .= String "BBodyError"
, "failures" .= map (forMachine dtal) fs
, "failures" .= fmap (forMachine dtal) fs
]

instance
Expand Down Expand Up @@ -254,7 +261,7 @@ instance
) => LogFormatting (ChainTransitionError crypto) where
forMachine dtal (ChainTransitionError fs) =
mconcat [ "kind" .= String "ChainTransitionError"
, "failures" .= map (forMachine dtal) fs
, "failures" .= fmap (forMachine dtal) fs
]

instance LogFormatting ChainPredicateFailure where
Expand Down Expand Up @@ -345,7 +352,7 @@ instance
, Api.IsShelleyBasedEra era
, Consensus.ShelleyBasedEra ledgerera
, Ledger.EraCrypto ledgerera ~ StandardCrypto
, LogFormatting (PPUPPredFailure ledgerera)
, LogFormatting (Ledger.EraRuleFailure "PPUP" ledgerera)
, LogFormatting (PredicateFailure (Ledger.EraRule "UTXO" ledgerera))
) => LogFormatting (AlonzoUtxowPredFailure ledgerera) where
forMachine dtal (ShelleyInAlonzoUtxowPredFailure utxoPredFail) =
Expand Down Expand Up @@ -441,7 +448,7 @@ instance

instance
( Consensus.ShelleyBasedEra era
, LogFormatting (PPUPPredFailure era)
, LogFormatting (Ledger.EraRuleFailure "PPUP" era)
) => LogFormatting (ShelleyUtxoPredFailure era) where
forMachine _dtal (BadInputsUTxO badInputs) =
mconcat [ "kind" .= String "BadInputsUTxO"
Expand Down Expand Up @@ -500,7 +507,7 @@ instance
instance
( Consensus.ShelleyBasedEra era
, ToJSON Allegra.ValidityInterval
, LogFormatting (PPUPPredFailure era)
, LogFormatting (Ledger.EraRuleFailure "PPUP" era)
) => LogFormatting (AllegraUtxoPredFailure era) where
forMachine _dtal (Allegra.BadInputsUTxO badInputs) =
mconcat [ "kind" .= String "BadInputsUTxO"
Expand Down Expand Up @@ -1013,7 +1020,7 @@ instance

instance
( ToJSON (Alonzo.CollectError ledgerera)
, LogFormatting (PPUPPredFailure ledgerera)
, LogFormatting (Ledger.EraRuleFailure "PPUP" ledgerera)
) => LogFormatting (AlonzoUtxosPredFailure ledgerera) where
forMachine _ (Alonzo.ValidationTagMismatch isValidating reason) =
mconcat [ "kind" .= String "ValidationTagMismatch"
Expand Down Expand Up @@ -1060,13 +1067,18 @@ instance
, "outputs" .= outputs
]

Babbage.BabbageNonDisjointRefInputs nonDisjointInputs ->
mconcat [ "kind" .= String "BabbageNonDisjointRefInputs"
, "outputs" .= nonDisjointInputs
]

instance
( Api.ShelleyLedgerEra era ~ ledgerera
, Api.IsShelleyBasedEra era
, Ledger.Era ledgerera
, Ledger.EraCrypto ledgerera ~ StandardCrypto
, ShelleyBasedEra ledgerera
, LogFormatting (PPUPPredFailure ledgerera)
, LogFormatting (Ledger.EraRuleFailure "PPUP" ledgerera)
, LogFormatting (ShelleyUtxowPredFailure ledgerera)
, LogFormatting (PredicateFailure (Ledger.EraRule "UTXO" ledgerera))
) => LogFormatting (BabbageUtxowPredFailure ledgerera) where
Expand Down Expand Up @@ -1290,6 +1302,25 @@ instance Ledger.Crypto c => LogFormatting (PraosChainSelectView c) where
where
renderVRF = Text.decodeUtf8 . B16.encode . Crypto.getOutputVRFBytes

instance
( ToJSON (Alonzo.CollectError ledgerera)
) => LogFormatting (Conway.ConwayUtxosPredFailure ledgerera) where
forMachine _ (Conway.ValidationTagMismatch isValidating reason) =
mconcat [ "kind" .= String "ValidationTagMismatch"
, "isvalidating" .= isValidating
, "reason" .= reason
]
forMachine _ (Conway.CollectErrors errors) =
mconcat [ "kind" .= String "CollectErrors"
, "errors" .= errors
]

-- We define this bogus instance as it is required by some of the
-- 'LogFormatting' instances in this module
instance LogFormatting (Ledger.VoidEraRule rule era) where
-- NOTE: There are no values of type 'Ledger.VoidEraRule rule era'
forMachine _ = \case

--------------------------------------------------------------------------------
-- Helper functions
--------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion cardano-node/src/Cardano/Node/Tracing/StateRep.hs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ traceNodeStateChainDB _scp tr ev =
case ev' of
ChainDB.StartedInitChainSelection ->
traceWith tr $ NodeInitChainSelection InitChainStartedSelection
ChainDB.InitalChainSelected ->
ChainDB.InitialChainSelected ->
traceWith tr $ NodeInitChainSelection InitChainSelected
_ -> return ()
ChainDB.TraceAddBlockEvent ev' ->
Expand Down
Loading
Loading