diff --git a/bench/locli/locli.cabal b/bench/locli/locli.cabal index 372a22f46bf..eb5aac02216 100644 --- a/bench/locli/locli.cabal +++ b/bench/locli/locli.cabal @@ -1,7 +1,7 @@ cabal-version: 3.0 name: locli -version: 1.34 +version: 1.35 synopsis: Cardano log analysis CLI description: Cardano log analysis CLI. category: Cardano, @@ -121,7 +121,7 @@ library , optparse-generic , ouroboros-consensus -- for Data.SOP.Strict: - , ouroboros-network ^>= 0.14 + , ouroboros-network ^>= 0.16 , ouroboros-network-api , process , quiet diff --git a/bench/plutus-scripts-bench/plutus-scripts-bench.cabal b/bench/plutus-scripts-bench/plutus-scripts-bench.cabal index c95719cb2f7..aeeb80e0c1b 100644 --- a/bench/plutus-scripts-bench/plutus-scripts-bench.cabal +++ b/bench/plutus-scripts-bench/plutus-scripts-bench.cabal @@ -1,6 +1,6 @@ cabal-version: 3.0 name: plutus-scripts-bench -version: 1.0.2.0 +version: 1.0.2.1 synopsis: Plutus scripts used for benchmarking description: Plutus scripts used for benchmarking. category: Cardano, @@ -74,10 +74,10 @@ library -- IOG dependencies -------------------------- build-depends: - , cardano-api ^>= 8.44 + , cardano-api ^>= 8.46 , plutus-ledger-api >=1.0.0 , plutus-tx >=1.0.0 - , plutus-tx-plugin ^>=1.23 + , plutus-tx-plugin ^>=1.27 ------------------------ -- Non-IOG dependencies diff --git a/bench/tx-generator/src/Cardano/TxGenerator/Setup/Plutus.hs b/bench/tx-generator/src/Cardano/TxGenerator/Setup/Plutus.hs index 3f445fc4f16..b32e4688ee8 100644 --- a/bench/tx-generator/src/Cardano/TxGenerator/Setup/Plutus.hs +++ b/bench/tx-generator/src/Cardano/TxGenerator/Setup/Plutus.hs @@ -16,6 +16,7 @@ module Cardano.TxGenerator.Setup.Plutus import Data.Bifunctor import Data.ByteString.Short (ShortByteString) +import Data.Int (Int64) import Data.Map.Strict as Map (lookup) import Control.Monad.Trans.Except @@ -204,13 +205,13 @@ preExecutePlutusV2 (major, _minor) (PlutusScript _ (PlutusScriptSerialised scrip , PlutusV2.txInfoFee = mempty , PlutusV2.txInfoMint = mempty , PlutusV2.txInfoDCert = [] - , PlutusV2.txInfoWdrl = PlutusV2.fromList [] + , PlutusV2.txInfoWdrl = PlutusV2.unsafeFromList [] , PlutusV2.txInfoValidRange = PlutusV2.always , PlutusV2.txInfoSignatories = [] - , PlutusV2.txInfoData = PlutusV2.fromList [] + , PlutusV2.txInfoData = PlutusV2.unsafeFromList [] , PlutusV2.txInfoId = PlutusV2.TxId "" , PlutusV2.txInfoReferenceInputs = [] - , PlutusV2.txInfoRedeemers = PlutusV2.fromList [] + , PlutusV2.txInfoRedeemers = PlutusV2.unsafeFromList [] } preExecutePlutusV3 :: @@ -255,18 +256,18 @@ preExecutePlutusV3 (major, _minor) (PlutusScript _ (PlutusScriptSerialised (scri , PlutusV3.txInfoFee = 0 , PlutusV3.txInfoMint = mempty , PlutusV3.txInfoTxCerts = [] - , PlutusV3.txInfoWdrl = PlutusV3.fromList [] + , PlutusV3.txInfoWdrl = PlutusV3.unsafeFromList [] , PlutusV3.txInfoValidRange = PlutusV3.always , PlutusV3.txInfoSignatories = [] - , PlutusV3.txInfoData = PlutusV3.fromList [] + , PlutusV3.txInfoData = PlutusV3.unsafeFromList [] , PlutusV3.txInfoId = PlutusV3.TxId "" , PlutusV3.txInfoReferenceInputs = [] - , PlutusV3.txInfoRedeemers = PlutusV3.fromList [] + , PlutusV3.txInfoRedeemers = PlutusV3.unsafeFromList [] , PlutusV3.txInfoVotes = AssocMap.empty , PlutusV3.txInfoProposalProcedures = [] , PlutusV3.txInfoCurrentTreasuryAmount = Nothing , PlutusV3.txInfoTreasuryDonation = Nothing } -flattenCostModel :: CostModel -> [Integer] +flattenCostModel :: CostModel -> [Int64] flattenCostModel (CostModel cm) = cm diff --git a/bench/tx-generator/tx-generator.cabal b/bench/tx-generator/tx-generator.cabal index 1a0424aad5c..57c4ee91bc5 100644 --- a/bench/tx-generator/tx-generator.cabal +++ b/bench/tx-generator/tx-generator.cabal @@ -1,7 +1,7 @@ cabal-version: 3.0 name: tx-generator -version: 2.11 +version: 2.12 synopsis: A transaction workload generator for Cardano clusters description: A transaction workload generator for Cardano clusters. category: Cardano, @@ -100,9 +100,9 @@ library , attoparsec-aeson , base16-bytestring , bytestring - , cardano-api ^>= 8.44 + , cardano-api ^>= 8.46 , cardano-binary - , cardano-cli ^>= 8.22 + , cardano-cli ^>= 8.23 , cardano-crypto-class , cardano-crypto-wrapper , cardano-data diff --git a/cabal.project b/cabal.project index c61ce3ceefd..2a5232cf9a8 100644 --- a/cabal.project +++ b/cabal.project @@ -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-04-11T09:29:53Z + , cardano-haskell-packages 2024-05-14T16:00:00Z packages: cardano-node diff --git a/cardano-node-chairman/cardano-node-chairman.cabal b/cardano-node-chairman/cardano-node-chairman.cabal index ff73acd98e3..8591d65eb32 100644 --- a/cardano-node-chairman/cardano-node-chairman.cabal +++ b/cardano-node-chairman/cardano-node-chairman.cabal @@ -1,7 +1,7 @@ cabal-version: 3.0 name: cardano-node-chairman -version: 8.6.1 +version: 8.11.0 synopsis: The cardano full node description: The cardano full node. category: Cardano, @@ -44,7 +44,7 @@ executable cardano-node-chairman build-depends: cardano-api , cardano-crypto-class , cardano-git-rev ^>=0.2.2 - , cardano-node ^>= 8.10 + , cardano-node ^>= 8.11 , cardano-prelude , containers , contra-tracer @@ -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.22.0.0 + , cardano-cli:cardano-cli ^>= 8.23.0.0 , cardano-node-chairman:cardano-node-chairman diff --git a/cardano-node/cardano-node.cabal b/cardano-node/cardano-node.cabal index 33fb3b148ca..d3f54f39243 100644 --- a/cardano-node/cardano-node.cabal +++ b/cardano-node/cardano-node.cabal @@ -1,7 +1,7 @@ cabal-version: 3.0 name: cardano-node -version: 8.10.1 +version: 8.11.0 synopsis: The cardano full node description: The cardano full node. category: Cardano, @@ -144,7 +144,7 @@ library , async , base16-bytestring , bytestring - , cardano-api ^>= 8.44 + , cardano-api ^>= 8.46 , cardano-crypto-class , cardano-crypto-wrapper , cardano-git-rev ^>=0.2.2 @@ -183,12 +183,12 @@ library , network-mux >= 0.4 , nothunks , optparse-applicative-fork >= 0.18.1 - , ouroboros-consensus ^>= 0.17 - , ouroboros-consensus-cardano ^>= 0.15 - , ouroboros-consensus-diffusion ^>= 0.15 + , ouroboros-consensus ^>= 0.18 + , ouroboros-consensus-cardano ^>= 0.16 + , ouroboros-consensus-diffusion ^>= 0.16 , ouroboros-consensus-protocol , ouroboros-network-api ^>= 0.7.1 - , ouroboros-network ^>= 0.14 + , ouroboros-network ^>= 0.16 , ouroboros-network-framework , ouroboros-network-protocols ^>= 0.8 , prettyprinter diff --git a/cardano-node/src/Cardano/Node/Run.hs b/cardano-node/src/Cardano/Node/Run.hs index c881a697c35..2ae989006dd 100644 --- a/cardano-node/src/Cardano/Node/Run.hs +++ b/cardano-node/src/Cardano/Node/Run.hs @@ -90,12 +90,13 @@ import Cardano.Tracing.Config (TraceOptions (..), TraceSelection (..)) import qualified Ouroboros.Consensus.Config as Consensus import Ouroboros.Consensus.Config.SupportsNode (ConfigSupportsNode (..)) import Ouroboros.Consensus.Node (DiskPolicyArgs (..), NetworkP2PMode (..), - RunNodeArgs (..), StdRunNodeArgs (..), stdChainSyncTimeout) + RunNodeArgs (..), StdRunNodeArgs (..)) import qualified Ouroboros.Consensus.Node as Node (getChainDB, run) import Ouroboros.Consensus.Node.NetworkProtocolVersion import Ouroboros.Consensus.Node.ProtocolInfo import Ouroboros.Consensus.Util.Orphans () import qualified Ouroboros.Network.Diffusion as Diffusion +import qualified Ouroboros.Network.Diffusion.Configuration as Configuration import qualified Ouroboros.Network.Diffusion.NonP2P as NonP2P import qualified Ouroboros.Network.Diffusion.P2P as P2P import Ouroboros.Network.NodeToClient (LocalAddress (..), LocalSocket (..)) @@ -592,7 +593,7 @@ handleSimpleNode blockType runP p2pMode tracers nc onKernel = do customizeChainSyncTimeout = case ncChainSyncIdleTimeout nc of NoTimeoutOverride -> Nothing TimeoutOverride t -> Just $ do - cst <- stdChainSyncTimeout + cst <- Configuration.defaultChainSyncTimeout pure $ case t of 0 -> cst { idleTimeout = Nothing } diff --git a/cardano-node/src/Cardano/Node/Tracing/Consistency.hs b/cardano-node/src/Cardano/Node/Tracing/Consistency.hs index d80519bebd6..846f5807d43 100644 --- a/cardano-node/src/Cardano/Node/Tracing/Consistency.hs +++ b/cardano-node/src/Cardano/Node/Tracing/Consistency.hs @@ -62,7 +62,7 @@ import qualified Ouroboros.Network.NodeToClient as NtC import Ouroboros.Network.NodeToNode (ErrorPolicyTrace (..), RemoteAddress, WithAddr (..)) import qualified Ouroboros.Network.NodeToNode as NtN import Ouroboros.Network.PeerSelection.Governor (DebugPeerSelection (..), - PeerSelectionCounters (..), TracePeerSelection (..)) + PeerSelectionCounters, TracePeerSelection (..)) import Ouroboros.Network.PeerSelection.LedgerPeers (TraceLedgerPeers) import Ouroboros.Network.PeerSelection.PeerStateActions (PeerSelectionActionsTrace (..)) import Ouroboros.Network.PeerSelection.RootPeersDNS.LocalRootPeers diff --git a/cardano-node/src/Cardano/Node/Tracing/Documentation.hs b/cardano-node/src/Cardano/Node/Tracing/Documentation.hs index bef9d5cb87b..2fdc5f908e8 100644 --- a/cardano-node/src/Cardano/Node/Tracing/Documentation.hs +++ b/cardano-node/src/Cardano/Node/Tracing/Documentation.hs @@ -71,7 +71,7 @@ import qualified Ouroboros.Network.NodeToClient as NtC import Ouroboros.Network.NodeToNode (ErrorPolicyTrace (..), RemoteAddress, WithAddr (..)) import qualified Ouroboros.Network.NodeToNode as NtN import Ouroboros.Network.PeerSelection.Governor (DebugPeerSelection (..), - PeerSelectionCounters (..), TracePeerSelection (..)) + PeerSelectionCounters, TracePeerSelection (..)) import Ouroboros.Network.PeerSelection.LedgerPeers (TraceLedgerPeers) import Ouroboros.Network.PeerSelection.PeerStateActions (PeerSelectionActionsTrace (..)) import Ouroboros.Network.PeerSelection.RootPeersDNS.LocalRootPeers diff --git a/cardano-node/src/Cardano/Node/Tracing/Era/Shelley.hs b/cardano-node/src/Cardano/Node/Tracing/Era/Shelley.hs index 13e14fe457f..85fc40f8ce3 100644 --- a/cardano-node/src/Cardano/Node/Tracing/Era/Shelley.hs +++ b/cardano-node/src/Cardano/Node/Tracing/Era/Shelley.hs @@ -225,35 +225,10 @@ instance ( Consensus.ShelleyBasedEra era , ToJSON (Ledger.PParamsUpdate era) ) => LogFormatting (ShelleyLedgerUpdate era) where - forMachine dtal (ShelleyUpdatedProtocolUpdates updates) = + forMachine _dtal (ShelleyUpdatedPParams updates epochNo) = mconcat [ "kind" .= String "ShelleyUpdatedProtocolUpdates" - , "updates" .= map (forMachine dtal) updates - ] - -instance - ( Ledger.Era era - , ToJSON (Ledger.PParamsUpdate era) - ) => LogFormatting (ProtocolUpdate era) where - forMachine dtal ProtocolUpdate{protocolUpdateProposal, protocolUpdateState} = - mconcat [ "proposal" .= forMachine dtal protocolUpdateProposal - , "state" .= forMachine dtal protocolUpdateState - ] - -instance - ( ToJSON (Ledger.PParamsUpdate era) - ) => LogFormatting (UpdateProposal era) where - forMachine _dtal UpdateProposal{proposalParams, proposalVersion, proposalEpoch} = - mconcat [ "params" .= proposalParams - , "version" .= proposalVersion - , "epoch" .= proposalEpoch - ] - -instance - ( Ledger.Crypto crypto - ) => LogFormatting (UpdateState crypto) where - forMachine _dtal UpdateState{proposalVotes, proposalReachedQuorum} = - mconcat [ "proposal" .= proposalVotes - , "reachedQuorum" .= proposalReachedQuorum + , "updates" .= show updates + , "epochNo" .= show epochNo ] instance @@ -1175,6 +1150,15 @@ instance , "actualPolicyHash" .= actualPolicyHash , "expectedPolicyHash" .= expectedPolicyHash ] + forMachine _ (Conway.DisallowedProposalDuringBootstrap proposal) = + mconcat [ "kind" .= String "DisallowedProposalDuringBootstrap" + , "proposal" .= proposal + ] + forMachine _ (Conway.DisallowedVotesDuringBootstrap votes) = + mconcat [ "kind" .= String "DisallowedVotesDuringBootstrap" + , "votes" .= votes + ] + instance ( Consensus.ShelleyBasedEra era @@ -1321,6 +1305,210 @@ instance LogFormatting (Ledger.VoidEraRule rule era) where -- NOTE: There are no values of type 'Ledger.VoidEraRule rule era' forMachine _ = \case +instance + ( Api.ShelleyLedgerEra era ~ ledgerera + , Api.IsShelleyBasedEra era + , Consensus.ShelleyBasedEra ledgerera + , Ledger.EraCrypto ledgerera ~ StandardCrypto + , LogFormatting (PredicateFailure (Ledger.EraRule "UTXOS" ledgerera)) + ) => LogFormatting (Conway.ConwayUtxoPredFailure ledgerera) where + forMachine dtal = \case + Conway.UtxosFailure utxosPredFailure -> forMachine dtal utxosPredFailure + Conway.BadInputsUTxO badInputs -> + mconcat [ "kind" .= String "BadInputsUTxO" + , "badInputs" .= badInputs + , "error" .= renderBadInputsUTxOErr badInputs + ] + Conway.OutsideValidityIntervalUTxO validityInterval slot -> + mconcat [ "kind" .= String "ExpiredUTxO" + , "validityInterval" .= validityInterval + , "slot" .= slot + ] + Conway.MaxTxSizeUTxO txsize maxtxsize -> + mconcat [ "kind" .= String "MaxTxSizeUTxO" + , "size" .= txsize + , "maxSize" .= maxtxsize + ] + Conway.InputSetEmptyUTxO -> + mconcat [ "kind" .= String "InputSetEmptyUTxO" ] + Conway.FeeTooSmallUTxO minfee txfee -> + mconcat [ "kind" .= String "FeeTooSmallUTxO" + , "minimum" .= minfee + , "fee" .= txfee + ] + Conway.ValueNotConservedUTxO consumed produced -> + mconcat [ "kind" .= String "ValueNotConservedUTxO" + , "consumed" .= consumed + , "produced" .= produced + , "error" .= renderValueNotConservedErr consumed produced + ] + Conway.WrongNetwork network addrs -> + mconcat [ "kind" .= String "WrongNetwork" + , "network" .= network + , "addrs" .= addrs + ] + Conway.WrongNetworkWithdrawal network addrs -> + mconcat [ "kind" .= String "WrongNetworkWithdrawal" + , "network" .= network + , "addrs" .= addrs + ] + Conway.OutputTooSmallUTxO badOutputs -> + mconcat [ "kind" .= String "OutputTooSmallUTxO" + , "outputs" .= badOutputs + , "error" .= String + ( mconcat + [ "The output is smaller than the allow minimum " + , "UTxO value defined in the protocol parameters" + ] + ) + ] + Conway.OutputBootAddrAttrsTooBig badOutputs -> + mconcat [ "kind" .= String "OutputBootAddrAttrsTooBig" + , "outputs" .= badOutputs + , "error" .= String "The Byron address attributes are too big" + ] + Conway.OutputTooBigUTxO badOutputs -> + mconcat [ "kind" .= String "OutputTooBigUTxO" + , "outputs" .= badOutputs + , "error" .= String "Too many asset ids in the tx output" + ] + Conway.InsufficientCollateral computedBalance suppliedFee -> + mconcat [ "kind" .= String "InsufficientCollateral" + , "balance" .= computedBalance + , "txfee" .= suppliedFee + ] + Conway.ScriptsNotPaidUTxO utxos -> + mconcat [ "kind" .= String "ScriptsNotPaidUTxO" + , "utxos" .= utxos + ] + Conway.ExUnitsTooBigUTxO pParamsMaxExUnits suppliedExUnits -> + mconcat [ "kind" .= String "ExUnitsTooBigUTxO" + , "maxexunits" .= pParamsMaxExUnits + , "exunits" .= suppliedExUnits + ] + Conway.CollateralContainsNonADA inputs -> + mconcat [ "kind" .= String "CollateralContainsNonADA" + , "inputs" .= inputs + ] + Conway.WrongNetworkInTxBody actualNetworkId netIdInTxBody -> + mconcat [ "kind" .= String "WrongNetworkInTxBody" + , "networkid" .= actualNetworkId + , "txbodyNetworkId" .= netIdInTxBody + ] + Conway.OutsideForecast slotNum -> + mconcat [ "kind" .= String "OutsideForecast" + , "slot" .= slotNum + ] + Conway.TooManyCollateralInputs maxCollateralInputs numberCollateralInputs -> + mconcat [ "kind" .= String "TooManyCollateralInputs" + , "max" .= maxCollateralInputs + , "inputs" .= numberCollateralInputs + ] + Conway.NoCollateralInputs -> + mconcat [ "kind" .= String "NoCollateralInputs" ] + Conway.IncorrectTotalCollateralField provided declared -> + mconcat [ "kind" .= String "UnequalCollateralReturn" + , "collateralProvided" .= provided + , "collateralDeclared" .= declared + ] + Conway.BabbageOutputTooSmallUTxO outputs -> + mconcat [ "kind" .= String "BabbageOutputTooSmall" + , "outputs" .= outputs + ] + Conway.BabbageNonDisjointRefInputs nonDisjointInputs -> + mconcat [ "kind" .= String "BabbageNonDisjointRefInputs" + , "outputs" .= nonDisjointInputs + ] + +instance + ( Api.ShelleyLedgerEra era ~ ledgerera + , Api.IsShelleyBasedEra era + , Consensus.ShelleyBasedEra ledgerera + , Ledger.EraCrypto ledgerera ~ StandardCrypto + , LogFormatting (PredicateFailure (Ledger.EraRule "UTXO" ledgerera)) + ) => LogFormatting (Conway.ConwayUtxowPredFailure ledgerera) where + forMachine dtal = \case + Conway.UtxoFailure utxoPredFail -> forMachine dtal utxoPredFail + Conway.InvalidWitnessesUTXOW ws -> + mconcat [ "kind" .= String "InvalidWitnessesUTXOW" + , "invalidWitnesses" .= map textShow ws + ] + Conway.MissingVKeyWitnessesUTXOW ws -> + mconcat [ "kind" .= String "MissingVKeyWitnessesUTXOW" + , "missingWitnesses" .= ws + ] + Conway.MissingScriptWitnessesUTXOW scripts -> + mconcat [ "kind" .= String "MissingScriptWitnessesUTXOW" + , "missingScripts" .= scripts + ] + Conway.ScriptWitnessNotValidatingUTXOW failedScripts -> + mconcat [ "kind" .= String "ScriptWitnessNotValidatingUTXOW" + , "failedScripts" .= failedScripts + ] + Conway.MissingTxBodyMetadataHash hash -> + mconcat [ "kind" .= String "MissingTxMetadata" + , "txBodyMetadataHash" .= hash + ] + Conway.MissingTxMetadata hash -> + mconcat [ "kind" .= String "MissingTxMetadata" + , "txBodyMetadataHash" .= hash + ] + Conway.ConflictingMetadataHash txBodyMetadataHash fullMetadataHash -> + mconcat [ "kind" .= String "ConflictingMetadataHash" + , "txBodyMetadataHash" .= txBodyMetadataHash + , "fullMetadataHash" .= fullMetadataHash + ] + Conway.InvalidMetadata -> + mconcat [ "kind" .= String "InvalidMetadata" + ] + Conway.ExtraneousScriptWitnessesUTXOW scripts -> + mconcat [ "kind" .= String "InvalidWitnessesUTXOW" + , "extraneousScripts" .= Set.map renderScriptHash scripts + ] + Conway.MissingRedeemers scripts -> + mconcat [ "kind" .= String "MissingRedeemers" + , "scripts" .= renderMissingRedeemers Api.shelleyBasedEra scripts + ] + Conway.MissingRequiredDatums required received -> + mconcat [ "kind" .= String "MissingRequiredDatums" + , "required" .= map (Crypto.hashToTextAsHex . SafeHash.extractHash) + (Set.toList required) + , "received" .= map (Crypto.hashToTextAsHex . SafeHash.extractHash) + (Set.toList received) + ] + Conway.NotAllowedSupplementalDatums disallowed acceptable -> + mconcat [ "kind" .= String "NotAllowedSupplementalDatums" + , "disallowed" .= Set.toList disallowed + , "acceptable" .= Set.toList acceptable + ] + Conway.PPViewHashesDontMatch ppHashInTxBody ppHashFromPParams -> + mconcat [ "kind" .= String "PPViewHashesDontMatch" + , "fromTxBody" .= renderScriptIntegrityHash (strictMaybeToMaybe ppHashInTxBody) + , "fromPParams" .= renderScriptIntegrityHash (strictMaybeToMaybe ppHashFromPParams) + ] + Conway.UnspendableUTxONoDatumHash ins -> + mconcat [ "kind" .= String "MissingRequiredSigners" + , "txins" .= Set.toList ins + ] + Conway.ExtraRedeemers rs -> + Api.caseShelleyToMaryOrAlonzoEraOnwards + (const mempty) + (\alonzoOnwards -> + mconcat + [ "kind" .= String "ExtraRedeemers" + , "rdmrs" .= map (Api.toScriptIndex alonzoOnwards) rs + ] + ) + (Api.shelleyBasedEra :: Api.ShelleyBasedEra era) + Conway.MalformedScriptWitnesses scripts -> + mconcat [ "kind" .= String "MalformedScriptWitnesses" + , "scripts" .= scripts + ] + Conway.MalformedReferenceScripts scripts -> + mconcat [ "kind" .= String "MalformedReferenceScripts" + , "scripts" .= scripts + ] + -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- diff --git a/cardano-node/src/Cardano/Node/Tracing/StateRep.hs b/cardano-node/src/Cardano/Node/Tracing/StateRep.hs index 688edd8e6b2..bbd32fa6aa3 100644 --- a/cardano-node/src/Cardano/Node/Tracing/StateRep.hs +++ b/cardano-node/src/Cardano/Node/Tracing/StateRep.hs @@ -208,7 +208,7 @@ traceNodeStateChainDB _scp tr ev = traceWith tr $ NodeOpeningDbs $ OpenedImmutableDB (pointSlot p) chunk ChainDB.StartedOpeningVolatileDB -> traceWith tr $ NodeOpeningDbs StartedOpeningVolatileDB - ChainDB.OpenedVolatileDB -> + ChainDB.OpenedVolatileDB _maxSlotN -> traceWith tr $ NodeOpeningDbs OpenedVolatileDB ChainDB.StartedOpeningLgrDB -> traceWith tr $ NodeOpeningDbs StartedOpeningLgrDB diff --git a/cardano-node/src/Cardano/Node/Tracing/Tracers.hs b/cardano-node/src/Cardano/Node/Tracing/Tracers.hs index b62ed90e8ac..e031c08a4fc 100644 --- a/cardano-node/src/Cardano/Node/Tracing/Tracers.hs +++ b/cardano-node/src/Cardano/Node/Tracing/Tracers.hs @@ -539,6 +539,11 @@ mkDiffusionTracersExtra configReflection trBase trForward mbTrEKG _trDataPoint t ["Net", "PeerSelection"] configureTracers configReflection trConfig [peerSelectionCountersTr] + !churnCountersTr <- mkCardanoTracer + trBase trForward mbTrEKG + ["Net", "Churn"] + configureTracers configReflection trConfig [churnCountersTr] + !peerSelectionActionsTr <- mkCardanoTracer trBase trForward mbTrEKG ["Net", "PeerSelection", "Actions"] @@ -602,6 +607,8 @@ mkDiffusionTracersExtra configReflection trBase trForward mbTrEKG _trDataPoint t traceWith debugPeerSelectionResponderTr , P2P.dtTracePeerSelectionCounters = Tracer $ traceWith peerSelectionCountersTr + , P2P.dtTraceChurnCounters = Tracer $ + traceWith churnCountersTr , P2P.dtPeerSelectionActionsTracer = Tracer $ traceWith peerSelectionActionsTr , P2P.dtConnectionManagerTracer = Tracer $ diff --git a/cardano-node/src/Cardano/Node/Tracing/Tracers/ChainDB.hs b/cardano-node/src/Cardano/Node/Tracing/Tracers/ChainDB.hs index 8a7a701bc96..4a8490cc6d4 100644 --- a/cardano-node/src/Cardano/Node/Tracing/Tracers/ChainDB.hs +++ b/cardano-node/src/Cardano/Node/Tracing/Tracers/ChainDB.hs @@ -504,10 +504,17 @@ instance ( LogFormatting (Header blk) forMachine _dtal ChainDB.PoppedReprocessLoEBlocksFromQueue = mconcat [ "kind" .= String "PoppedReprocessLoEBlocksFromQueue" ] forMachine dtal (ChainDB.ChainSelectionLoEDebug curChain loeFrag) = - mconcat [ "kind" .= String "ChainSelectionLoEDebug" - , "curChain" .= headAndAnchor curChain - , "loeFrag" .= headAndAnchor loeFrag - ] + case loeFrag of + ChainDB.LoEEnabled loeF -> + mconcat [ "kind" .= String "ChainSelectionLoEDebug" + , "curChain" .= headAndAnchor curChain + , "loeFrag" .= headAndAnchor loeF + ] + ChainDB.LoEDisabled -> + mconcat [ "kind" .= String "ChainSelectionLoEDebug" + , "curChain" .= headAndAnchor curChain + , "loeFrag" .= String "LoE is disabled" + ] where headAndAnchor frag = object [ "anchor" .= forMachine dtal (AF.anchorPoint frag) @@ -1179,7 +1186,8 @@ instance ConvertRawHash blk forHuman (ChainDB.OpenedImmutableDB immTip chunk) = "Opened imm db with immutable tip at " <> renderPointAsPhrase immTip <> " and chunk " <> showT chunk - forHuman ChainDB.OpenedVolatileDB = "Opened vol db" + forHuman (ChainDB.OpenedVolatileDB maxSlotN) = + "Opened vol db with max slot number " <> showT maxSlotN forHuman ChainDB.OpenedLgrDB = "Opened lgr db" forHuman ChainDB.StartedOpeningDB = "Started opening Chain DB" forHuman ChainDB.StartedOpeningImmutableDB = "Started opening Immutable DB" @@ -1198,8 +1206,9 @@ instance ConvertRawHash blk mconcat [ "kind" .= String "OpenedImmutableDB" , "immtip" .= forMachine dtal immTip , "epoch" .= String ((Text.pack . show) epoch) ] - forMachine _dtal ChainDB.OpenedVolatileDB = - mconcat [ "kind" .= String "OpenedVolatileDB" ] + forMachine _dtal (ChainDB.OpenedVolatileDB maxSlotN) = + mconcat [ "kind" .= String "OpenedVolatileDB" + , "maxSlotNo" .= String (showT maxSlotN) ] forMachine _dtal ChainDB.OpenedLgrDB = mconcat [ "kind" .= String "OpenedLgrDB" ] forMachine _dtal ChainDB.StartedOpeningDB = @@ -1989,17 +1998,21 @@ instance StandardHash blk => LogFormatting (VolDB.TraceEvent blk) where mconcat [ "kind" .= String "InvalidFileNames" , "files" .= String (Text.pack . show $ map show fsPaths) ] + forMachine _dtal VolDB.DBClosed = + mconcat [ "kind" .= String "DBClosed" ] instance MetaTrace (VolDB.TraceEvent blk) where namespaceFor VolDB.DBAlreadyClosed {} = Namespace [] ["DBAlreadyClosed"] namespaceFor VolDB.BlockAlreadyHere {} = Namespace [] ["BlockAlreadyHere"] namespaceFor VolDB.Truncate {} = Namespace [] ["Truncate"] namespaceFor VolDB.InvalidFileNames {} = Namespace [] ["InvalidFileNames"] + namespaceFor VolDB.DBClosed {} = Namespace [] ["DBClosed"] severityFor (Namespace _ ["DBAlreadyClosed"]) _ = Just Debug severityFor (Namespace _ ["BlockAlreadyHere"]) _ = Just Debug severityFor (Namespace _ ["Truncate"]) _ = Just Debug severityFor (Namespace _ ["InvalidFileNames"]) _ = Just Debug + severityFor (Namespace _ ["DBClosed"]) _ = Just Debug severityFor _ _ = Nothing documentFor (Namespace _ ["DBAlreadyClosed"]) = Just @@ -2010,6 +2023,8 @@ instance MetaTrace (VolDB.TraceEvent blk) where "Truncates a file up to offset because of the error." documentFor (Namespace _ ["InvalidFileNames"]) = Just "Reports a list of invalid file paths." + documentFor (Namespace _ ["DBClosed"]) = Just + "Closing the volatile DB" documentFor _ = Nothing allNamespaces = @@ -2017,6 +2032,7 @@ instance MetaTrace (VolDB.TraceEvent blk) where , Namespace [] ["BlockAlreadyHere"] , Namespace [] ["Truncate"] , Namespace [] ["InvalidFileNames"] + , Namespace [] ["DBClosed"] ] diff --git a/cardano-node/src/Cardano/Node/Tracing/Tracers/P2P.hs b/cardano-node/src/Cardano/Node/Tracing/Tracers/P2P.hs index 424abcd716c..4b536288e3f 100644 --- a/cardano-node/src/Cardano/Node/Tracing/Tracers/P2P.hs +++ b/cardano-node/src/Cardano/Node/Tracing/Tracers/P2P.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GADTs #-} @@ -8,6 +9,12 @@ {-# LANGUAGE ScopedTypeVariables #-} {-# OPTIONS_GHC -Wno-orphans #-} +-- needs different instances on ghc8 and on ghc9 +#if __GLASGOW_HASKELL__ < 904 +-- Pattern synonym record fields with GHC-8.10 is issuing the `-Wname-shadowing` +-- warning. +{-# OPTIONS_GHC -Wno-name-shadowing #-} +#endif module Cardano.Node.Tracing.Tracers.P2P () where @@ -26,19 +33,18 @@ import Ouroboros.Network.InboundGovernor (InboundGovernorTrace (..)) import qualified Ouroboros.Network.InboundGovernor as InboundGovernor import Ouroboros.Network.InboundGovernor.State (InboundGovernorCounters (..)) import qualified Ouroboros.Network.NodeToNode as NtN -import Ouroboros.Network.PeerSelection.Governor (DebugPeerSelection (..), - DebugPeerSelectionState (..), PeerSelectionCounters (..), - PeerSelectionState (..), PeerSelectionTargets (..), TracePeerSelection (..)) +import Ouroboros.Network.PeerSelection.Governor (ChurnCounters (..), + DebugPeerSelection (..), DebugPeerSelectionState (..), + PeerSelectionCounters , PeerSelectionView (..), + PeerSelectionState (..), PeerSelectionTargets (..), + TracePeerSelection (..), peerSelectionStateToCounters) import Ouroboros.Network.PeerSelection.PeerStateActions (PeerSelectionActionsTrace (..)) import Ouroboros.Network.PeerSelection.RelayAccessPoint (RelayAccessPoint) import Ouroboros.Network.PeerSelection.RootPeersDNS.LocalRootPeers (TraceLocalRootPeers (..)) import Ouroboros.Network.PeerSelection.RootPeersDNS.PublicRootPeers (TracePublicRootPeers (..)) -import qualified Ouroboros.Network.PeerSelection.State.EstablishedPeers as EstablishedPeers import qualified Ouroboros.Network.PeerSelection.State.KnownPeers as KnownPeers -import Ouroboros.Network.PeerSelection.State.LocalRootPeers (HotValency (..), - WarmValency (..)) import Ouroboros.Network.PeerSelection.Types () import Ouroboros.Network.Protocol.PeerSharing.Type (PeerSharingAmount (..)) import Ouroboros.Network.RethrowPolicy (ErrorCommand (..)) @@ -492,10 +498,13 @@ instance LogFormatting (TracePeerSelection SockAddr) where forMachine _dtal (TraceChurnMode c) = mconcat [ "kind" .= String "ChurnMode" , "event" .= show c ] - forMachine _dtal (TraceKnownInboundConnection addr sharing) = - mconcat [ "kind" .= String "KnownInboundConnection" - , "peer" .= toJSON addr - , "peerSharing" .= String (pack . show $ sharing) ] + forMachine _dtal (TracePickInboundPeers targetNumberOfKnownPeers numberOfKnownPeers selected available) = + mconcat [ "kind" .= String "PickInboundPeers" + , "targetKnown" .= targetNumberOfKnownPeers + , "actualKnown" .= numberOfKnownPeers + , "selected" .= selected + , "available" .= available + ] forMachine _dtal (TraceLedgerStateJudgementChanged new) = mconcat [ "kind" .= String "LedgerStateJudgementChanged" , "new" .= show new ] @@ -511,6 +520,18 @@ instance LogFormatting (TracePeerSelection SockAddr) where mconcat [ "kind" .= String "OutboundGovernorCriticalFailure" , "reason" .= show err ] + forMachine _dtal (TraceChurnAction duration action counter) = + mconcat [ "kind" .= String "ChurnAction" + , "action" .= show action + , "counter" .= counter + , "duration" .= duration + ] + forMachine _dtal (TraceChurnTimeout duration action counter) = + mconcat [ "kind" .= String "ChurnTimeout" + , "action" .= show action + , "counter" .= counter + , "duration" .= duration + ] forMachine _dtal (TraceDebugState mtime ds) = mconcat [ "kind" .= String "DebugState" , "monotonicTime" .= show mtime @@ -537,6 +558,12 @@ instance LogFormatting (TracePeerSelection SockAddr) where forHuman = pack . show + asMetrics (TraceChurnAction duration action _) = + [ DoubleM ("Net.PeerSelection.Churn." <> pack (show action) <> ".duration") + (realToFrac duration) + ] + asMetrics _ = [] + instance MetaTrace (TracePeerSelection SockAddr) where namespaceFor TraceLocalRootPeersChanged {} = Namespace [] ["LocalRootPeersChanged"] @@ -634,8 +661,8 @@ instance MetaTrace (TracePeerSelection SockAddr) where Namespace [] ["ChurnWait"] namespaceFor TraceChurnMode {} = Namespace [] ["ChurnMode"] - namespaceFor TraceKnownInboundConnection {} = - Namespace [] ["KnownInboundConnection"] + namespaceFor TracePickInboundPeers {} = + Namespace [] ["PickInboundPeers"] namespaceFor TraceLedgerStateJudgementChanged {} = Namespace [] ["LedgerStateJudgementChanged"] namespaceFor TraceOnlyBootstrapPeers {} = @@ -646,6 +673,10 @@ instance MetaTrace (TracePeerSelection SockAddr) where Namespace [] ["BootstrapPeersFlagChangedWhilstInSensitiveState"] namespaceFor TraceOutboundGovernorCriticalFailure {} = Namespace [] ["OutboundGovernorCriticalFailure"] + namespaceFor TraceChurnAction {} = + Namespace [] ["ChurnAction"] + namespaceFor TraceChurnTimeout {} = + Namespace [] ["ChurnTimeout"] namespaceFor TraceDebugState {} = Namespace [] ["DebugState"] @@ -678,8 +709,10 @@ instance MetaTrace (TracePeerSelection SockAddr) where severityFor (Namespace [] ["GovernorWakeup"]) _ = Just Info severityFor (Namespace [] ["ChurnWait"]) _ = Just Info severityFor (Namespace [] ["ChurnMode"]) _ = Just Info - severityFor (Namespace [] ["KnownInboundConnection"]) _ = Just Info + severityFor (Namespace [] ["PickInboundPeers"]) _ = Just Info severityFor (Namespace [] ["OutboundGovernorCriticalFailure"]) _ = Just Error + severityFor (Namespace [] ["ChurnAction"]) _ = Just Info + severityFor (Namespace [] ["ChurnTimeout"]) _ = Just Notice severityFor (Namespace [] ["DebugState"]) _ = Just Info severityFor _ _ = Nothing @@ -733,7 +766,7 @@ instance MetaTrace (TracePeerSelection SockAddr) where documentFor (Namespace [] ["GovernorWakeup"]) = Just "" documentFor (Namespace [] ["ChurnWait"]) = Just "" documentFor (Namespace [] ["ChurnMode"]) = Just "" - documentFor (Namespace [] ["KnownInboundConnection"]) = Just + documentFor (Namespace [] ["PickInboundPeers"]) = Just "An inbound connection was added to known set of outbound governor" documentFor (Namespace [] ["OutboundGovernorCriticalFailure"]) = Just "Outbound Governor was killed unexpectedly" @@ -771,7 +804,7 @@ instance MetaTrace (TracePeerSelection SockAddr) where , Namespace [] ["GovernorWakeup"] , Namespace [] ["ChurnWait"] , Namespace [] ["ChurnMode"] - , Namespace [] ["KnownInboundConnection"] + , Namespace [] ["PickInboundPeers"] , Namespace [] ["OutboundGovernorCriticalFailure"] , Namespace [] ["DebugState"] ] @@ -781,17 +814,13 @@ instance MetaTrace (TracePeerSelection SockAddr) where -------------------------------------------------------------------------------- instance LogFormatting (DebugPeerSelection SockAddr) where - forMachine DNormal (TraceGovernorState blockedAt wakeupAfter - PeerSelectionState { targets, knownPeers, establishedPeers, activePeers }) = + forMachine dtal@DNormal (TraceGovernorState blockedAt wakeupAfter + st@PeerSelectionState { targets }) = mconcat [ "kind" .= String "DebugPeerSelection" , "blockedAt" .= String (pack $ show blockedAt) , "wakeupAfter" .= String (pack $ show wakeupAfter) , "targets" .= peerSelectionTargetsToObject targets - , "numberOfPeers" .= - Object (mconcat [ "known" .= KnownPeers.size knownPeers - , "established" .= EstablishedPeers.size establishedPeers - , "active" .= Set.size activePeers - ]) + , "counters" .= forMachine dtal (peerSelectionStateToCounters st) ] forMachine _ (TraceGovernorState blockedAt wakeupAfter ev) = mconcat [ "kind" .= String "DebugPeerSelection" @@ -840,43 +869,123 @@ instance MetaTrace (DebugPeerSelection SockAddr) where -------------------------------------------------------------------------------- instance LogFormatting PeerSelectionCounters where - forMachine _dtal ev = + forMachine _dtal PeerSelectionCounters {..} = mconcat [ "kind" .= String "PeerSelectionCounters" - , "coldPeers" .= coldPeers ev - , "warmPeers" .= warmPeers ev - , "hotPeers" .= hotPeers ev - , "coldBigLedgerPeers" .= coldBigLedgerPeers ev - , "warmBigLedgerPeers" .= warmBigLedgerPeers ev - , "hotBigLedgerPeers" .= hotBigLedgerPeers ev - , "localRoots" .= toJSON (localRoots ev) + + , "knownPeers" .= numberOfKnownPeers + , "rootPeers" .= numberOfRootPeers + , "coldPeersPromotions" .= numberOfColdPeersPromotions + , "establishedPeers" .= numberOfEstablishedPeers + , "warmPeersDemotions" .= numberOfWarmPeersDemotions + , "warmPeersPromotions" .= numberOfWarmPeersPromotions + , "activePeers" .= numberOfActivePeers + , "activePeersDemotions" .= numberOfActivePeersDemotions + + , "knownBigLedgerPeers" .= numberOfKnownBigLedgerPeers + , "coldBigLedgerPeersPromotions" .= numberOfColdBigLedgerPeersPromotions + , "establishedBigLedgerPeers" .= numberOfEstablishedBigLedgerPeers + , "warmBigLedgerPeersDemotions" .= numberOfWarmBigLedgerPeersDemotions + , "warmBigLedgerPeersPromotions" .= numberOfWarmBigLedgerPeersPromotions + , "activeBigLedgerPeers" .= numberOfActiveBigLedgerPeers + , "activeBigLedgerPeersDemotions" .= numberOfActiveBigLedgerPeersDemotions + + , "knownLocalRootPeers" .= numberOfKnownLocalRootPeers + , "establishedLocalRootPeers" .= numberOfEstablishedLocalRootPeers + , "warmLocalRootPeersPromotions" .= numberOfWarmLocalRootPeersPromotions + , "activeLocalRootPeers" .= numberOfActiveLocalRootPeers + , "activeLocalRootPeersDemotions" .= numberOfActiveLocalRootPeersDemotions + + , "knownNonRootPeers" .= numberOfKnownNonRootPeers + , "coldNonRootPeersPromotions" .= numberOfColdNonRootPeersPromotions + , "establishedNonRootPeers" .= numberOfEstablishedNonRootPeers + , "warmNonRootPeersDemotions" .= numberOfWarmNonRootPeersDemotions + , "warmNonRootPeersPromotions" .= numberOfWarmNonRootPeersPromotions + , "activeNonRootPeers" .= numberOfActiveNonRootPeers + , "activeNonRootPeersDemotions" .= numberOfActiveNonRootPeersDemotions + + , "knownBootstrapPeers" .= numberOfKnownBootstrapPeers + , "coldBootstrapPeersPromotions" .= numberOfColdBootstrapPeersPromotions + , "establishedBootstrapPeers" .= numberOfEstablishedBootstrapPeers + , "warmBootstrapPeersDemotions" .= numberOfWarmBootstrapPeersDemotions + , "warmBootstrapPeersPromotions" .= numberOfWarmBootstrapPeersPromotions + , "activeBootstrapPeers" .= numberOfActiveBootstrapPeers + , "ActiveBootstrapPeersDemotions" .= numberOfActiveBootstrapPeersDemotions ] forHuman = pack . show - asMetrics PeerSelectionCounters {..} = - [ IntM - "Net.PeerSelection.Cold" - (fromIntegral coldPeers) - , IntM - "Net.PeerSelection.Warm" - (fromIntegral warmPeers) - , IntM - "Net.PeerSelection.Hot" - (fromIntegral hotPeers) - , IntM - "Net.PeerSelection.ColdBigLedgerPeers" - (fromIntegral coldBigLedgerPeers) - , IntM - "Net.PeerSelection.WarmBigLedgerPeers" - (fromIntegral warmBigLedgerPeers) - , IntM - "Net.PeerSelection.HotBigLedgerPeers" - (fromIntegral hotBigLedgerPeers) - , IntM - "Net.PeerSelection.WarmLocalRoots" - (fromIntegral $ getWarmValency $ foldl' (\a (_, b) -> a + b) 0 localRoots) - , IntM - "Net.PeerSelection.HotLocalRoots" - (fromIntegral $ getHotValency $ foldl' (\a (b, _) -> a + b) 0 localRoots) - ] + asMetrics psc = + case psc of + PeerSelectionCountersHWC {..} -> + -- Deprecated metrics; they will be removed in a future version. + [ IntM + "Net.PeerSelection.Cold" + (fromIntegral numberOfColdPeers) + , IntM + "Net.PeerSelection.Warm" + (fromIntegral numberOfWarmPeers) + , IntM + "Net.PeerSelection.Hot" + (fromIntegral numberOfHotPeers) + , IntM + "Net.PeerSelection.ColdBigLedgerPeers" + (fromIntegral numberOfColdBigLedgerPeers) + , IntM + "Net.PeerSelection.WarmBigLedgerPeers" + (fromIntegral numberOfWarmBigLedgerPeers) + , IntM + "Net.PeerSelection.HotBigLedgerPeers" + (fromIntegral numberOfHotBigLedgerPeers) + + , IntM + "Net.PeerSelection.WarmLocalRoots" + (fromIntegral $ numberOfActiveLocalRootPeers psc) + , IntM + "Net.PeerSelection.HotLocalRoots" + (fromIntegral $ numberOfEstablishedLocalRootPeers psc + - numberOfActiveLocalRootPeers psc) + ] + ++ + case psc of + PeerSelectionCounters {..} -> + [ IntM "Net.PeerSelection.RootPeers" (fromIntegral numberOfRootPeers) + + , IntM "Net.PeerSelection.KnownPeers" (fromIntegral numberOfKnownPeers) + , IntM "Net.PeerSelection.ColdPeersPromotions" (fromIntegral numberOfColdPeersPromotions) + , IntM "Net.PeerSelection.EstablishedPeers" (fromIntegral numberOfEstablishedPeers) + , IntM "Net.PeerSelection.WarmPeersDemotions" (fromIntegral numberOfWarmPeersDemotions) + , IntM "Net.PeerSelection.WarmPeersPromotions" (fromIntegral numberOfWarmPeersPromotions) + , IntM "Net.PeerSelection.ActivePeers" (fromIntegral numberOfActivePeers) + , IntM "Net.PeerSelection.ActivePeersDemotions" (fromIntegral numberOfActivePeersDemotions) + + , IntM "Net.PeerSelection.KnownBigLedgerPeers" (fromIntegral numberOfKnownBigLedgerPeers) + , IntM "Net.PeerSelection.ColdBigLedgerPeersPromotions" (fromIntegral numberOfColdBigLedgerPeersPromotions) + , IntM "Net.PeerSelection.EstablishedBigLedgerPeers" (fromIntegral numberOfEstablishedBigLedgerPeers) + , IntM "Net.PeerSelection.WarmBigLedgerPeersDemotions" (fromIntegral numberOfWarmBigLedgerPeersDemotions) + , IntM "Net.PeerSelection.WarmBigLedgerPeersPromotions" (fromIntegral numberOfWarmBigLedgerPeersPromotions) + , IntM "Net.PeerSelection.ActiveBigLedgerPeers" (fromIntegral numberOfActiveBigLedgerPeers) + , IntM "Net.PeerSelection.ActiveBigLedgerPeersDemotions" (fromIntegral numberOfActiveBigLedgerPeersDemotions) + + , IntM "Net.PeerSelection.KnownLocalRootPeers" (fromIntegral numberOfKnownLocalRootPeers) + , IntM "Net.PeerSelection.EstablishedLocalRootPeers" (fromIntegral numberOfEstablishedLocalRootPeers) + , IntM "Net.PeerSelection.WarmLocalRootPeersPromotions" (fromIntegral numberOfWarmLocalRootPeersPromotions) + , IntM "Net.PeerSelection.ActiveLocalRootPeers" (fromIntegral numberOfActiveLocalRootPeers) + , IntM "Net.PeerSelection.ActiveLocalRootPeersDemotions" (fromIntegral numberOfActiveLocalRootPeersDemotions) + + , IntM "Net.PeerSelection.KnownNonRootPeers" (fromIntegral numberOfKnownNonRootPeers) + , IntM "Net.PeerSelection.ColdNonRootPeersPromotions" (fromIntegral numberOfColdNonRootPeersPromotions) + , IntM "Net.PeerSelection.EstablishedNonRootPeers" (fromIntegral numberOfEstablishedNonRootPeers) + , IntM "Net.PeerSelection.WarmNonRootPeersDemotions" (fromIntegral numberOfWarmNonRootPeersDemotions) + , IntM "Net.PeerSelection.WarmNonRootPeersPromotions" (fromIntegral numberOfWarmNonRootPeersPromotions) + , IntM "Net.PeerSelection.ActiveNonRootPeers" (fromIntegral numberOfActiveNonRootPeers) + , IntM "Net.PeerSelection.ActiveNonRootPeersDemotions" (fromIntegral numberOfActiveNonRootPeersDemotions) + + , IntM "Net.PeerSelection.KnownBootstrapPeers" (fromIntegral numberOfKnownBootstrapPeers) + , IntM "Net.PeerSelection.ColdBootstrapPeersPromotions" (fromIntegral numberOfColdBootstrapPeersPromotions) + , IntM "Net.PeerSelection.EstablishedBootstrapPeers" (fromIntegral numberOfEstablishedBootstrapPeers) + , IntM "Net.PeerSelection.WarmBootstrapPeersDemotions" (fromIntegral numberOfWarmBootstrapPeersDemotions) + , IntM "Net.PeerSelection.WarmBootstrapPeersPromotions" (fromIntegral numberOfWarmBootstrapPeersPromotions) + , IntM "Net.PeerSelection.ActiveBootstrapPeers" (fromIntegral numberOfActiveBootstrapPeers) + , IntM "Net.PeerSelection.ActiveBootstrapPeersDemotions" (fromIntegral numberOfActiveBootstrapPeersDemotions) + ] instance MetaTrace PeerSelectionCounters where namespaceFor PeerSelectionCounters {} = Namespace [] ["Counters"] @@ -885,7 +994,7 @@ instance MetaTrace PeerSelectionCounters where severityFor _ _ = Nothing documentFor (Namespace _ ["Counters"]) = Just - "Counters for cold, warm and hot peers" + "Counters of selected peers" documentFor _ = Nothing metricsDocFor (Namespace _ ["Counters"]) = @@ -904,6 +1013,54 @@ instance MetaTrace PeerSelectionCounters where ] +-------------------------------------------------------------------------------- +-- ChurnCounters Tracer +-------------------------------------------------------------------------------- + + +instance LogFormatting ChurnCounters where + forMachine _dtal (ChurnCounter action c) = + mconcat [ "kind" .= String "ChurnCounter" + , "action" .= String (pack $ show action) + , "counter" .= c + ] + asMetrics (ChurnCounter action c) = + [ IntM + ("Net.Churn." <> pack (show action)) + (fromIntegral c) + ] + +instance MetaTrace ChurnCounters where + namespaceFor ChurnCounter {} = Namespace [] ["ChurnCounters"] + + severityFor (Namespace _ ["ChurnCounters"]) _ = Just Info + severityFor _ _ = Nothing + + documentFor (Namespace _ ["ChurnCounters"]) = Just + "churn counters" + documentFor _ = Nothing + + metricsDocFor (Namespace _ ["Counters"]) = + [ ("Net.Churn.DecreasedActivePeers", "number of decreased active peers") + , ("Net.Churn.IncreasedActivePeers", "number of increased active peers") + , ("Net.Churn.DecreasedActiveBigLedgerPeers", "number of decreased active big ledger peers") + , ("Net.Churn.IncreasedActiveBigLedgerPeers", "number of increased active big ledger peers") + , ("Net.Churn.DecreasedEstablishedPeers", "number of decreased established peers") + , ("Net.Churn.IncreasedEstablishedPeers", "number of increased established peers") + , ("Net.Churn.IncreasedEstablishedBigLedgerPeers", "number of increased established big ledger peers") + , ("Net.Churn.DecreasedEstablishedBigLedgerPeers", "number of decreased established big ledger peers") + , ("Net.Churn.DecreasedKnownPeers", "number of decreased known peers") + , ("Net.Churn.IncreasedKnownPeers", "number of increased known peers") + , ("Net.Churn.DecreasedKnownBigLedgerPeers", "number of decreased known big ledger peers") + , ("Net.Churn.IncreasedKnownBigLedgerPeers", "number of increased known big ledger peers") + ] + metricsDocFor _ = [] + + allNamespaces =[ + Namespace [] ["ChurnCounters"] + ] + + -------------------------------------------------------------------------------- -- PeerSelectionActions Tracer -------------------------------------------------------------------------------- @@ -1480,6 +1637,15 @@ forMachineGov _dtal (InboundGovernor.TrInboundGovernorError err) = mconcat [ "kind" .= String "InboundGovernorError" , "remoteSt" .= String (pack . show $ err) ] +forMachineGov _dtal (InboundGovernor.TrMaturedConnections matured fresh) = + mconcat [ "kind" .= String "MaturedConnections" + , "matured" .= toJSON matured + , "fresh" .= toJSON fresh + ] +forMachineGov _dtal (InboundGovernor.TrInactive fresh) = + mconcat [ "kind" .= String "Inactive" + , "fresh" .= toJSON fresh + ] instance MetaTrace (InboundGovernorTrace addr) where namespaceFor TrNewConnection {} = Namespace [] ["NewConnection"] @@ -1501,6 +1667,10 @@ instance MetaTrace (InboundGovernorTrace addr) where Namespace [] ["UnexpectedlyFalseAssertion"] namespaceFor InboundGovernor.TrInboundGovernorError {} = Namespace [] ["InboundGovernorError"] + namespaceFor InboundGovernor.TrMaturedConnections {} = + Namespace [] ["MaturedConnections"] + namespaceFor InboundGovernor.TrInactive {} = + Namespace [] ["Inactive"] severityFor (Namespace _ ["NewConnection"]) _ = Just Debug severityFor (Namespace _ ["ResponderRestarted"]) _ = Just Debug @@ -1519,6 +1689,8 @@ instance MetaTrace (InboundGovernorTrace addr) where severityFor (Namespace _ ["RemoteState"]) _ = Just Debug severityFor (Namespace _ ["UnexpectedlyFalseAssertion"]) _ = Just Error severityFor (Namespace _ ["InboundGovernorError"]) _ = Just Error + severityFor (Namespace _ ["MaturedConnections"]) _ = Just Info + severityFor (Namespace _ ["Inactive"]) _ = Just Debug severityFor _ _ = Nothing documentFor (Namespace _ ["NewConnection"]) = Just "" @@ -1544,6 +1716,8 @@ instance MetaTrace (InboundGovernorTrace addr) where documentFor (Namespace _ ["RemoteState"]) = Just "" documentFor (Namespace _ ["UnexpectedlyFalseAssertion"]) = Just "" documentFor (Namespace _ ["InboundGovernorError"]) = Just "" + documentFor (Namespace _ ["MaturedConnections"]) = Just "" + documentFor (Namespace _ ["Inactive"]) = Just "" documentFor _ = Nothing metricsDocFor (Namespace [] ["InboundGovernorCounters"]) = @@ -1586,6 +1760,8 @@ instance MetaTrace (InboundGovernorTrace addr) where , Namespace [] ["RemoteState"] , Namespace [] ["UnexpectedlyFalseAssertion"] , Namespace [] ["InboundGovernorError"] + , Namespace [] ["MaturedConnections"] + , Namespace [] ["Inactive"] ] -------------------------------------------------------------------------------- diff --git a/cardano-node/src/Cardano/Node/Tracing/Tracers/Peer.hs b/cardano-node/src/Cardano/Node/Tracing/Tracers/Peer.hs index 46db0abab62..f105e58c51b 100644 --- a/cardano-node/src/Cardano/Node/Tracing/Tracers/Peer.hs +++ b/cardano-node/src/Cardano/Node/Tracing/Tracers/Peer.hs @@ -14,7 +14,9 @@ import Cardano.Logging hiding (traceWith) import Cardano.Node.Orphans () import Cardano.Node.Queries import Ouroboros.Consensus.Block (Header) -import Ouroboros.Consensus.Util.NormalForm.StrictTVar (StrictTVar, readTVar) +import Ouroboros.Consensus.MiniProtocol.ChainSync.Client (ChainSyncClientHandle, + csCandidate, viewChainSyncState) +import Ouroboros.Consensus.Util.NormalForm.StrictTVar (StrictTVar) import Ouroboros.Consensus.Util.Orphans () import qualified Ouroboros.Network.AnchoredFragment as Net import Ouroboros.Network.Block (unSlotNo) @@ -102,9 +104,9 @@ getCurrentPeers nkd = mapNodeKernelDataIO extractPeers nkd tuple3pop (a, b, _) = (a, b) getCandidates - :: StrictTVar IO (Map peer (StrictTVar IO (Net.AnchoredFragment (Header blk)))) + :: StrictTVar IO (Map peer (ChainSyncClientHandle IO blk)) -> STM.STM IO (Map peer (Net.AnchoredFragment (Header blk))) - getCandidates var = readTVar var >>= traverse readTVar + getCandidates handle = viewChainSyncState handle csCandidate extractPeers :: NodeKernel IO RemoteAddress LocalConnectionId blk -> IO [PeerT blk] @@ -114,7 +116,7 @@ getCurrentPeers nkd = mapNodeKernelDataIO extractPeers nkd . Net.readFetchClientsStateVars . getFetchClientRegistry $ kernel ) - candidates <- STM.atomically . getCandidates . getNodeCandidates $ kernel + candidates <- STM.atomically . getCandidates . getChainSyncHandles $ kernel let peers = flip Map.mapMaybeWithKey candidates $ \cid af -> maybe Nothing diff --git a/cardano-node/src/Cardano/Tracing/OrphanInstances/Consensus.hs b/cardano-node/src/Cardano/Tracing/OrphanInstances/Consensus.hs index d20a0065f2c..d1b7e43dd45 100644 --- a/cardano-node/src/Cardano/Tracing/OrphanInstances/Consensus.hs +++ b/cardano-node/src/Cardano/Tracing/OrphanInstances/Consensus.hs @@ -167,7 +167,7 @@ instance HasSeverityAnnotation (ChainDB.TraceEvent blk) where ChainDB.OpenedDB {} -> Info ChainDB.ClosedDB {} -> Info ChainDB.OpenedImmutableDB {} -> Info - ChainDB.OpenedVolatileDB -> Info + ChainDB.OpenedVolatileDB {} -> Info ChainDB.OpenedLgrDB -> Info ChainDB.StartedOpeningDB -> Info ChainDB.StartedOpeningImmutableDB -> Info @@ -217,6 +217,7 @@ instance HasSeverityAnnotation (ChainDB.TraceEvent blk) where VolDb.BlockAlreadyHere{} -> Debug VolDb.Truncate{} -> Error VolDb.InvalidFileNames{} -> Warning + VolDb.DBClosed{} -> Info instance HasSeverityAnnotation (LedgerEvent blk) where getSeverityAnnotation (LedgerUpdate _) = Notice @@ -610,7 +611,8 @@ instance ( ConvertRawHash blk ChainDB.OpenedImmutableDB immTip chunk -> "Opened imm db with immutable tip at " <> renderPointAsPhrase immTip <> " and chunk " <> showT chunk - ChainDB.OpenedVolatileDB -> "Opened vol db" + ChainDB.OpenedVolatileDB maxSlotN -> + "Opened vol db with max slot number " <> showT maxSlotN ChainDB.OpenedLgrDB -> "Opened lgr db" ChainDB.TraceFollowerEvent ev -> case ev of ChainDB.NewFollower -> "New follower was created" @@ -723,6 +725,7 @@ instance ( ConvertRawHash blk VolDb.BlockAlreadyHere bh -> "Block " <> showT bh <> " was already in the Volatile DB." VolDb.Truncate e pth offs -> "Truncating the file at " <> showT pth <> " at offset " <> showT offs <> ": " <> showT e VolDb.InvalidFileNames fs -> "Invalid Volatile DB files: " <> showT fs + VolDb.DBClosed -> "Closed Volatile DB." where showProgressT :: Int -> Int -> Text showProgressT chunkNo outOf = pack (showFFloat (Just 2) (100 * fromIntegral chunkNo / fromIntegral outOf :: Float) mempty) @@ -1000,10 +1003,17 @@ instance ( ConvertRawHash blk ChainDB.PoppedReprocessLoEBlocksFromQueue -> mconcat [ "kind" .= String "PoppedReprocessLoEBlocksFromQueue" ] ChainDB.ChainSelectionLoEDebug curChain loeFrag -> - mconcat [ "kind" .= String "ChainSelectionLoEDebug" - , "curChain" .= headAndAnchor curChain - , "loeFrag" .= headAndAnchor loeFrag - ] + case loeFrag of + ChainDB.LoEEnabled loeF -> + mconcat [ "kind" .= String "ChainSelectionLoEDebug" + , "curChain" .= headAndAnchor curChain + , "loeFrag" .= headAndAnchor loeF + ] + ChainDB.LoEDisabled -> + mconcat [ "kind" .= String "ChainSelectionLoEDebug" + , "curChain" .= headAndAnchor curChain + , "loeFrag" .= String "LoE is disabled" + ] where headAndAnchor frag = Aeson.object [ "anchor" .= renderPointForVerbosity verb (AF.anchorPoint frag) @@ -1087,8 +1097,9 @@ instance ( ConvertRawHash blk mconcat [ "kind" .= String "TraceOpenEvent.OpenedImmutableDB" , "immtip" .= toObject verb immTip , "epoch" .= String ((pack . show) epoch) ] - ChainDB.OpenedVolatileDB -> - mconcat [ "kind" .= String "TraceOpenEvent.OpenedVolatileDB" ] + ChainDB.OpenedVolatileDB maxSlotN -> + mconcat [ "kind" .= String "TraceOpenEvent.OpenedVolatileDB" + , "maxSlotNo" .= String (showT maxSlotN) ] ChainDB.OpenedLgrDB -> mconcat [ "kind" .= String "TraceOpenEvent.OpenedLgrDB" ] @@ -1236,6 +1247,7 @@ instance ( ConvertRawHash blk mconcat [ "kind" .= String "TraceVolatileDBEvent.InvalidFileNames" , "files" .= String (Text.pack . show $ map show fsPaths) ] + VolDb.DBClosed -> mconcat [ "kind" .= String "TraceVolatileDbEvent.DBClosed"] instance ConvertRawHash blk => ToObject (ImmDB.TraceChunkValidation blk ChunkNo) where toObject verb ev = case ev of diff --git a/cardano-node/src/Cardano/Tracing/OrphanInstances/HardFork.hs b/cardano-node/src/Cardano/Tracing/OrphanInstances/HardFork.hs index 9a8b58502e2..2853c64b941 100644 --- a/cardano-node/src/Cardano/Tracing/OrphanInstances/HardFork.hs +++ b/cardano-node/src/Cardano/Tracing/OrphanInstances/HardFork.hs @@ -396,6 +396,7 @@ instance ( ToJSON (BlockNodeToClientVersion x) instance ToJSON HardForkSpecificNodeToClientVersion where toJSON HardForkSpecificNodeToClientVersion1 = String "HardForkSpecificNodeToClientVersion1" toJSON HardForkSpecificNodeToClientVersion2 = String "HardForkSpecificNodeToClientVersion2" + toJSON HardForkSpecificNodeToClientVersion3 = String "HardForkSpecificNodeToClientVersion3" instance (ToJSON (BlockNodeToClientVersion blk)) => ToJSON (EraNodeToClientVersion blk) where toJSON EraNodeToClientDisabled = String "EraNodeToClientDisabled" diff --git a/cardano-node/src/Cardano/Tracing/OrphanInstances/Network.hs b/cardano-node/src/Cardano/Tracing/OrphanInstances/Network.hs index e692cc5e8b2..1b89661c375 100644 --- a/cardano-node/src/Cardano/Tracing/OrphanInstances/Network.hs +++ b/cardano-node/src/Cardano/Tracing/OrphanInstances/Network.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} @@ -6,6 +7,7 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE QuantifiedConstraints #-} +{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} @@ -13,6 +15,11 @@ {-# LANGUAGE UndecidableInstances #-} {-# OPTIONS_GHC -Wno-orphans #-} +#if __GLASGOW_HASKELL__ < 904 +-- Pattern synonym record fields with GHC-8.10 is issuing the `-Wname-shadowing` +-- warning. +{-# OPTIONS_GHC -Wno-name-shadowing #-} +#endif module Cardano.Tracing.OrphanInstances.Network () where @@ -54,8 +61,10 @@ import Ouroboros.Network.NodeToNode (ErrorPolicyTrace (..), NodeToNode import qualified Ouroboros.Network.NodeToNode as NtN import Ouroboros.Network.PeerSelection.Bootstrap import Ouroboros.Network.PeerSelection.Governor (DebugPeerSelection (..), - DebugPeerSelectionState (..), PeerSelectionCounters (..), - PeerSelectionState (..), PeerSelectionTargets (..), TracePeerSelection (..)) + DebugPeerSelectionState (..), PeerSelectionCounters, + PeerSelectionView (..), PeerSelectionState (..), + PeerSelectionTargets (..), TracePeerSelection (..), + peerSelectionStateToCounters) import Ouroboros.Network.PeerSelection.LedgerPeers import Ouroboros.Network.PeerSelection.PeerSharing (PeerSharing (..)) import Ouroboros.Network.PeerSelection.PeerStateActions (PeerSelectionActionsTrace (..)) @@ -66,7 +75,6 @@ import Ouroboros.Network.PeerSelection.RootPeersDNS.LocalRootPeers (TraceLocalRootPeers (..)) import Ouroboros.Network.PeerSelection.RootPeersDNS.PublicRootPeers (TracePublicRootPeers (..)) -import qualified Ouroboros.Network.PeerSelection.State.EstablishedPeers as EstablishedPeers import Ouroboros.Network.PeerSelection.State.KnownPeers (KnownPeerInfo (..)) import qualified Ouroboros.Network.PeerSelection.State.KnownPeers as KnownPeers import Ouroboros.Network.PeerSelection.State.LocalRootPeers (HotValency (..), @@ -415,6 +423,7 @@ instance HasSeverityAnnotation (TracePeerSelection addr) where TracePeerShareRequests {} -> Info TracePeerShareResults {} -> Info TracePeerShareResultsFiltered {} -> Debug + TracePickInboundPeers {} -> Info TraceForgetColdPeers {} -> Info TracePromoteColdPeers {} -> Info TracePromoteColdLocalPeers {} -> Info @@ -437,7 +446,6 @@ instance HasSeverityAnnotation (TracePeerSelection addr) where TraceGovernorWakeup {} -> Info TraceChurnWait {} -> Info TraceChurnMode {} -> Info - TraceKnownInboundConnection {} -> Info TraceForgetBigLedgerPeers {} -> Info @@ -472,6 +480,9 @@ instance HasSeverityAnnotation (TracePeerSelection addr) where TraceOutboundGovernorCriticalFailure {} -> Error + TraceChurnAction {} -> Info + TraceChurnTimeout {} -> Notice + TraceDebugState {} -> Info instance HasPrivacyAnnotation (DebugPeerSelection addr) @@ -562,6 +573,8 @@ instance HasSeverityAnnotation (InboundGovernorTrace addr) where InboundGovernor.TrUnexpectedlyFalseAssertion {} -> Error InboundGovernor.TrInboundGovernorError {} -> Error + InboundGovernor.TrMaturedConnections {} -> Info + InboundGovernor.TrInactive {} -> Debug instance HasPrivacyAnnotation (Server.RemoteTransitionTrace addr) instance HasSeverityAnnotation (Server.RemoteTransitionTrace addr) where @@ -1869,10 +1882,13 @@ instance ToObject (TracePeerSelection SockAddr) where toObject _verb (TraceChurnMode c) = mconcat [ "kind" .= String "ChurnMode" , "event" .= show c ] - toObject _verb (TraceKnownInboundConnection addr sharing) = - mconcat [ "kind" .= String "KnownInboundConnection" - , "peer" .= show addr - , "peerSharing" .= show sharing ] + toObject _verb (TracePickInboundPeers targetNumberOfKnownPeers numberOfKnownPeers selected available) = + mconcat [ "kind" .= String "PickInboundPeers" + , "targetKnown" .= targetNumberOfKnownPeers + , "actualKnown" .= numberOfKnownPeers + , "selected" .= selected + , "available" .= available + ] toObject _verb (TraceLedgerStateJudgementChanged new) = mconcat [ "kind" .= String "LedgerStateJudgementChanged" , "new" .= show new ] @@ -1888,6 +1904,18 @@ instance ToObject (TracePeerSelection SockAddr) where mconcat [ "kind" .= String "OutboundGovernorCriticalFailure" , "reason" .= show err ] + toObject _verb (TraceChurnAction duration action counter) = + mconcat [ "kind" .= String "ChurnAction" + , "action" .= show action + , "counter" .= counter + , "duration" .= duration + ] + toObject _verb (TraceChurnTimeout duration action counter) = + mconcat [ "kind" .= String "ChurnTimeout" + , "action" .= show action + , "counter" .= counter + , "duration" .= duration + ] toObject _verb (TraceDebugState mtime ds) = mconcat [ "kind" .= String "DebugState" , "monotonicTime" .= mtime @@ -1973,26 +2001,15 @@ peerSelectionTargetsToObject instance ToObject (DebugPeerSelection SockAddr) where toObject verb (TraceGovernorState blockedAt wakeupAfter - PeerSelectionState { targets, knownPeers, establishedPeers, activePeers, publicRootPeers }) + st@PeerSelectionState { targets }) | verb <= NormalVerbosity = mconcat [ "kind" .= String "DebugPeerSelection" , "blockedAt" .= String (pack $ show blockedAt) , "wakeupAfter" .= String (pack $ show wakeupAfter) , "targets" .= peerSelectionTargetsToObject targets - , "numberOfPeers" .= - Object (mconcat [ "known" .= KnownPeers.size knownPeers - , "established" .= EstablishedPeers.size establishedPeers - , "active" .= Set.size activePeers - ]) - , "numberOfBigLedgerPeers" .= - Object (mconcat [ "known" .= Set.size (KnownPeers.toSet knownPeers `Set.intersection` bigLedgerPeers) - , "established" .= Set.size (EstablishedPeers.toSet establishedPeers `Set.intersection` bigLedgerPeers) - , "active" .= Set.size (activePeers `Set.intersection` bigLedgerPeers) - ]) + , "counters" .= toObject verb (peerSelectionStateToCounters st) ] - where - bigLedgerPeers = PublicRootPeers.getBigLedgerPeers publicRootPeers toObject _ (TraceGovernorState blockedAt wakeupAfter ev) = mconcat [ "kind" .= String "DebugPeerSelection" , "blockedAt" .= String (pack $ show blockedAt) @@ -2024,15 +2041,48 @@ instance Show lAddr => ToObject (PeerSelectionActionsTrace SockAddr lAddr) where ] instance ToObject PeerSelectionCounters where - toObject _verb ev = + toObject _verb PeerSelectionCounters {..} = mconcat [ "kind" .= String "PeerSelectionCounters" - , "coldPeers" .= coldPeers ev - , "warmPeers" .= warmPeers ev - , "hotPeers" .= hotPeers ev - , "coldBigLedgerPeers" .= coldBigLedgerPeers ev - , "warmBigLedgerPeers" .= warmBigLedgerPeers ev - , "hotBigLedgerPeers" .= hotBigLedgerPeers ev - ] + + , "knownPeers" .= numberOfKnownPeers + , "rootPeers" .= numberOfRootPeers + , "coldPeersPromotions" .= numberOfColdPeersPromotions + , "establishedPeers" .= numberOfEstablishedPeers + , "warmPeersDemotions" .= numberOfWarmPeersDemotions + , "warmPeersPromotions" .= numberOfWarmPeersPromotions + , "activePeers" .= numberOfActivePeers + , "activePeersDemotions" .= numberOfActivePeersDemotions + + , "knownBigLedgerPeers" .= numberOfKnownBigLedgerPeers + , "coldBigLedgerPeersPromotions" .= numberOfColdBigLedgerPeersPromotions + , "establishedBigLedgerPeers" .= numberOfEstablishedBigLedgerPeers + , "warmBigLedgerPeersDemotions" .= numberOfWarmBigLedgerPeersDemotions + , "warmBigLedgerPeersPromotions" .= numberOfWarmBigLedgerPeersPromotions + , "activeBigLedgerPeers" .= numberOfActiveBigLedgerPeers + , "activeBigLedgerPeersDemotions" .= numberOfActiveBigLedgerPeersDemotions + + , "knownLocalRootPeers" .= numberOfKnownLocalRootPeers + , "establishedLocalRootPeers" .= numberOfEstablishedLocalRootPeers + , "warmLocalRootPeersPromotions" .= numberOfWarmLocalRootPeersPromotions + , "activeLocalRootPeers" .= numberOfActiveLocalRootPeers + , "activeLocalRootPeersDemotions" .= numberOfActiveLocalRootPeersDemotions + + , "knownNonRootPeers" .= numberOfKnownNonRootPeers + , "coldNonRootPeersPromotions" .= numberOfColdNonRootPeersPromotions + , "establishedNonRootPeers" .= numberOfEstablishedNonRootPeers + , "warmNonRootPeersDemotions" .= numberOfWarmNonRootPeersDemotions + , "warmNonRootPeersPromotions" .= numberOfWarmNonRootPeersPromotions + , "activeNonRootPeers" .= numberOfActiveNonRootPeers + , "activeNonRootPeersDemotions" .= numberOfActiveNonRootPeersDemotions + + , "knownBootstrapPeers" .= numberOfKnownBootstrapPeers + , "coldBootstrapPeersPromotions" .= numberOfColdBootstrapPeersPromotions + , "establishedBootstrapPeers" .= numberOfEstablishedBootstrapPeers + , "warmBootstrapPeersDemotions" .= numberOfWarmBootstrapPeersDemotions + , "warmBootstrapPeersPromotions" .= numberOfWarmBootstrapPeersPromotions + , "activeBootstrapPeers" .= numberOfActiveBootstrapPeers + , "activeBootstrapPeersDemotions" .= numberOfActiveBootstrapPeersDemotions + ] instance (Show (ClientHasAgency st), Show (ServerHasAgency st)) => ToJSON (PeerHasAgency pr st) where @@ -2515,6 +2565,15 @@ instance (ToJSON addr, Show addr) mconcat [ "kind" .= String "InboundGovernorError" , "remoteSt" .= String (pack . show $ err) ] + toObject _verb (InboundGovernor.TrMaturedConnections matured fresh) = + mconcat [ "kind" .= String "MaturedConnections" + , "matured" .= toJSON matured + , "fresh" .= toJSON fresh + ] + toObject _verb (InboundGovernor.TrInactive fresh) = + mconcat [ "kind" .= String "Inactive" + , "fresh" .= toJSON fresh + ] instance ToJSON addr => ToObject (Server.RemoteTransitionTrace addr) where diff --git a/cardano-node/src/Cardano/Tracing/OrphanInstances/Shelley.hs b/cardano-node/src/Cardano/Tracing/OrphanInstances/Shelley.hs index 4c91ab5695f..0347cbd385f 100644 --- a/cardano-node/src/Cardano/Tracing/OrphanInstances/Shelley.hs +++ b/cardano-node/src/Cardano/Tracing/OrphanInstances/Shelley.hs @@ -5,14 +5,12 @@ {-# LANGUAGE EmptyCase #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-} -{-# LANGUAGE GeneralisedNewtypeDeriving #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE QuantifiedConstraints #-} {-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE StandaloneDeriving #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE UndecidableInstances #-} @@ -28,12 +26,10 @@ import qualified Cardano.Crypto.Hash.Class as Crypto import qualified Cardano.Crypto.VRF.Class as Crypto import Cardano.Ledger.Allegra.Rules (AllegraUtxoPredFailure) import qualified Cardano.Ledger.Allegra.Rules as Allegra -import qualified Cardano.Ledger.Allegra.Scripts as Allegra import qualified Cardano.Ledger.Alonzo.Plutus.Evaluate as Alonzo import Cardano.Ledger.Alonzo.Rules (AlonzoBbodyPredFailure (..), AlonzoUtxoPredFailure, AlonzoUtxosPredFailure, AlonzoUtxowPredFailure (..)) import qualified Cardano.Ledger.Alonzo.Rules as Alonzo -import qualified Cardano.Ledger.Alonzo.Tx as Alonzo import qualified Cardano.Ledger.Api as Ledger import Cardano.Ledger.Babbage.Rules (BabbageUtxoPredFailure, BabbageUtxowPredFailure) import qualified Cardano.Ledger.Babbage.Rules as Babbage @@ -78,7 +74,7 @@ import Ouroboros.Consensus.Util.Condense (condense) import Ouroboros.Network.Block (SlotNo (..), blockHash, blockNo, blockSlot) import Ouroboros.Network.Point (WithOrigin, withOriginToMaybe) -import Data.Aeson (Value (..), object) +import Data.Aeson (Value (..)) import qualified Data.Aeson as Aeson import qualified Data.ByteString.Base16 as B16 import qualified Data.List.NonEmpty as NonEmpty @@ -142,11 +138,12 @@ instance instance ( Ledger.Era ledgerera - , ToJSON (Ledger.PParamsUpdate ledgerera) + , Show (Ledger.PParamsHKD Identity ledgerera) ) => ToObject (ShelleyLedgerUpdate ledgerera) where - toObject verb (ShelleyUpdatedProtocolUpdates updates) = - mconcat [ "kind" .= String "ShelleyUpdatedProtocolUpdates" - , "updates" .= map (toObject verb) updates + toObject _verb (ShelleyUpdatedPParams updates epochNo) = + mconcat [ "kind" .= String "ShelleyUpdatedPParams" + , "updates" .= show updates + , "epochNo" .= show epochNo ] instance ( ToObject (PredicateFailure (Ledger.EraRule "DELEG" era)) @@ -226,29 +223,6 @@ instance ToObject (Set (Credential 'Staking StandardCrypto)) where , "stakeCreds" .= map toJSON (Set.toList creds) ] -instance - ( Ledger.Era ledgerera - , ToJSON (Ledger.PParamsUpdate ledgerera) - ) => ToObject (ProtocolUpdate ledgerera) where - toObject verb ProtocolUpdate{protocolUpdateProposal, protocolUpdateState} = - mconcat [ "proposal" .= toObject verb protocolUpdateProposal - , "state" .= toObject verb protocolUpdateState - ] - -instance ToJSON (Ledger.PParamsUpdate era) - => ToObject (UpdateProposal era) where - toObject _verb UpdateProposal{proposalParams, proposalVersion, proposalEpoch} = - mconcat [ "params" .= proposalParams - , "version" .= proposalVersion - , "epoch" .= proposalEpoch - ] - -instance Core.Crypto crypto => ToObject (UpdateState crypto) where - toObject _verb UpdateState{proposalVotes, proposalReachedQuorum} = - mconcat [ "proposal" .= proposalVotes - , "reachedQuorum" .= proposalReachedQuorum - ] - instance Core.Crypto crypto => ToObject (ChainTransitionError crypto) where toObject verb (ChainTransitionError fs) = mconcat [ "kind" .= String "ChainTransitionError" @@ -398,6 +372,15 @@ instance Ledger.EraPParams era => ToObject (Conway.ConwayGovPredFailure era) whe , "actualPolicyHash" .= actualPolicyHash , "expectedPolicyHash" .= expectedPolicyHash ] + toObject _ (Conway.DisallowedProposalDuringBootstrap proposal) = + mconcat [ "kind" .= String "DisallowedProposalDuringBootstrap" + , "proposal" .= proposal + ] + + toObject _ (Conway.DisallowedVotesDuringBootstrap votes) = + mconcat [ "kind" .= String "DisallowedVotesDuringBootstrap" + , "votes" .= votes + ] instance ( Core.Crypto (Consensus.EraCrypto era) @@ -469,7 +452,7 @@ instance , Core.Crypto (Ledger.EraCrypto ledgerera) ) => ToObject (ShelleyUtxowPredFailure ledgerera) where toObject _verb (ExtraneousScriptWitnessesUTXOW extraneousScripts) = - mconcat [ "kind" .= String "InvalidWitnessesUTXOW" + mconcat [ "kind" .= String "ExtraneousScriptWitnessesUTXOW" , "extraneousScripts" .= Set.map renderScriptHash extraneousScripts ] toObject _verb (InvalidWitnessesUTXOW wits') = @@ -571,16 +554,6 @@ instance , "addrs" .= addrs ] - -instance ToJSON Allegra.ValidityInterval where - toJSON vi = - Aeson.object $ - [ "invalidBefore" .= x | x <- mbfield (Allegra.invalidBefore vi) ] - ++ [ "invalidHereafter" .= x | x <- mbfield (Allegra.invalidHereafter vi) ] - where - mbfield SNothing = [] - mbfield (SJust x) = [x] - instance ( ToObject (Ledger.EraRuleFailure "PPUP" ledgerera) , ToJSON (Ledger.TxOut ledgerera) @@ -1150,32 +1123,6 @@ instance toObject verb (Alonzo.UpdateFailure pFailure) = toObject verb pFailure -deriving newtype instance ToJSON Alonzo.IsValid - -instance ToJSON Alonzo.TagMismatchDescription where - toJSON tmd = case tmd of - Alonzo.PassedUnexpectedly -> - object - [ "kind" .= String "TagMismatchDescription" - , "error" .= String "PassedUnexpectedly" - ] - Alonzo.FailedUnexpectedly forReasons -> - object - [ "kind" .= String "TagMismatchDescription" - , "error" .= String "FailedUnexpectedly" - , "reconstruction" .= forReasons - ] - -instance ToJSON Alonzo.FailureDescription where - toJSON f = case f of - Alonzo.PlutusFailure t _bs -> - object - [ "kind" .= String "FailureDescription" - , "error" .= String "PlutusFailure" - , "description" .= t - -- , "reconstructionDetail" .= bs - ] - instance ( Ledger.Era ledgerera , Show (PredicateFailure (Ledger.EraRule "LEDGERS" ledgerera)) @@ -1388,6 +1335,214 @@ instance ToObject (Ledger.VoidEraRule rule era) where -- NOTE: There are no values of type 'Ledger.VoidEraRule rule era' toObject _ = \case +instance + ( Ledger.Era ledgerera + , ToObject (PredicateFailure (Ledger.EraRule "UTXOS" ledgerera)) + , Show (Ledger.Value ledgerera) + , ToJSON (Ledger.Value ledgerera) + , ToJSON (Ledger.TxOut ledgerera) + , Core.Crypto (Ledger.EraCrypto ledgerera) + ) => ToObject (Conway.ConwayUtxoPredFailure ledgerera) where + toObject v = \case + Conway.UtxosFailure utxosPredFailure -> toObject v utxosPredFailure + Conway.BadInputsUTxO badInputs -> + mconcat [ "kind" .= String "BadInputsUTxO" + , "badInputs" .= badInputs + , "error" .= renderBadInputsUTxOErr badInputs + ] + Conway.OutsideValidityIntervalUTxO validityInterval slot -> + mconcat [ "kind" .= String "ExpiredUTxO" + , "validityInterval" .= validityInterval + , "slot" .= slot + ] + Conway.MaxTxSizeUTxO txsize maxtxsize -> + mconcat [ "kind" .= String "MaxTxSizeUTxO" + , "size" .= txsize + , "maxSize" .= maxtxsize + ] + Conway.InputSetEmptyUTxO -> + mconcat [ "kind" .= String "InputSetEmptyUTxO" ] + Conway.FeeTooSmallUTxO minfee txfee -> + mconcat [ "kind" .= String "FeeTooSmallUTxO" + , "minimum" .= minfee + , "fee" .= txfee + ] + Conway.ValueNotConservedUTxO consumed produced -> + mconcat [ "kind" .= String "ValueNotConservedUTxO" + , "consumed" .= consumed + , "produced" .= produced + , "error" .= renderValueNotConservedErr consumed produced + ] + Conway.WrongNetwork network addrs -> + mconcat [ "kind" .= String "WrongNetwork" + , "network" .= network + , "addrs" .= addrs + ] + Conway.WrongNetworkWithdrawal network addrs -> + mconcat [ "kind" .= String "WrongNetworkWithdrawal" + , "network" .= network + , "addrs" .= addrs + ] + Conway.OutputTooSmallUTxO badOutputs -> + mconcat [ "kind" .= String "OutputTooSmallUTxO" + , "outputs" .= badOutputs + , "error" .= String + ( mconcat + [ "The output is smaller than the allow minimum " + , "UTxO value defined in the protocol parameters" + ] + ) + ] + Conway.OutputBootAddrAttrsTooBig badOutputs -> + mconcat [ "kind" .= String "OutputBootAddrAttrsTooBig" + , "outputs" .= badOutputs + , "error" .= String "The Byron address attributes are too big" + ] + Conway.OutputTooBigUTxO badOutputs -> + mconcat [ "kind" .= String "OutputTooBigUTxO" + , "outputs" .= badOutputs + , "error" .= String "Too many asset ids in the tx output" + ] + Conway.InsufficientCollateral computedBalance suppliedFee -> + mconcat [ "kind" .= String "InsufficientCollateral" + , "balance" .= computedBalance + , "txfee" .= suppliedFee + ] + Conway.ScriptsNotPaidUTxO utxos -> + mconcat [ "kind" .= String "ScriptsNotPaidUTxO" + , "utxos" .= utxos + ] + Conway.ExUnitsTooBigUTxO pParamsMaxExUnits suppliedExUnits -> + mconcat [ "kind" .= String "ExUnitsTooBigUTxO" + , "maxexunits" .= pParamsMaxExUnits + , "exunits" .= suppliedExUnits + ] + Conway.CollateralContainsNonADA inputs -> + mconcat [ "kind" .= String "CollateralContainsNonADA" + , "inputs" .= inputs + ] + Conway.WrongNetworkInTxBody actualNetworkId netIdInTxBody -> + mconcat [ "kind" .= String "WrongNetworkInTxBody" + , "networkid" .= actualNetworkId + , "txbodyNetworkId" .= netIdInTxBody + ] + Conway.OutsideForecast slotNum -> + mconcat [ "kind" .= String "OutsideForecast" + , "slot" .= slotNum + ] + Conway.TooManyCollateralInputs maxCollateralInputs numberCollateralInputs -> + mconcat [ "kind" .= String "TooManyCollateralInputs" + , "max" .= maxCollateralInputs + , "inputs" .= numberCollateralInputs + ] + Conway.NoCollateralInputs -> + mconcat [ "kind" .= String "NoCollateralInputs" ] + Conway.IncorrectTotalCollateralField provided declared -> + mconcat [ "kind" .= String "UnequalCollateralReturn" + , "collateralProvided" .= provided + , "collateralDeclared" .= declared + ] + Conway.BabbageOutputTooSmallUTxO outputs -> + mconcat [ "kind" .= String "BabbageOutputTooSmall" + , "outputs" .= outputs + ] + Conway.BabbageNonDisjointRefInputs nonDisjointInputs -> + mconcat [ "kind" .= String "BabbageNonDisjointRefInputs" + , "outputs" .= nonDisjointInputs + ] + +instance + ( Api.ShelleyLedgerEra era ~ ledgerera + , Api.IsShelleyBasedEra era + , Ledger.Era ledgerera + , Ledger.EraCrypto ledgerera ~ StandardCrypto + , Show (Ledger.Value ledgerera) + , ToObject (PredicateFailure (Ledger.EraRule "UTXO" ledgerera)) + , ToJSON (Ledger.Value ledgerera) + , ToJSON (Ledger.TxOut ledgerera) + ) => ToObject (Conway.ConwayUtxowPredFailure ledgerera) where + toObject v = \case + Conway.UtxoFailure utxoPredFail -> toObject v utxoPredFail + Conway.InvalidWitnessesUTXOW ws -> + mconcat [ "kind" .= String "InvalidWitnessesUTXOW" + , "invalidWitnesses" .= map textShow ws + ] + Conway.MissingVKeyWitnessesUTXOW ws -> + mconcat [ "kind" .= String "MissingVKeyWitnessesUTXOW" + , "missingWitnesses" .= ws + ] + Conway.MissingScriptWitnessesUTXOW scripts -> + mconcat [ "kind" .= String "MissingScriptWitnessesUTXOW" + , "missingScripts" .= scripts + ] + Conway.ScriptWitnessNotValidatingUTXOW failedScripts -> + mconcat [ "kind" .= String "ScriptWitnessNotValidatingUTXOW" + , "failedScripts" .= failedScripts + ] + Conway.MissingTxBodyMetadataHash hash -> + mconcat [ "kind" .= String "MissingTxMetadata" + , "txBodyMetadataHash" .= hash + ] + Conway.MissingTxMetadata hash -> + mconcat [ "kind" .= String "MissingTxMetadata" + , "txBodyMetadataHash" .= hash + ] + Conway.ConflictingMetadataHash txBodyMetadataHash fullMetadataHash -> + mconcat [ "kind" .= String "ConflictingMetadataHash" + , "txBodyMetadataHash" .= txBodyMetadataHash + , "fullMetadataHash" .= fullMetadataHash + ] + Conway.InvalidMetadata -> + mconcat [ "kind" .= String "InvalidMetadata" + ] + Conway.ExtraneousScriptWitnessesUTXOW scripts -> + mconcat [ "kind" .= String "InvalidWitnessesUTXOW" + , "extraneousScripts" .= Set.map renderScriptHash scripts + ] + Conway.MissingRedeemers scripts -> + mconcat [ "kind" .= String "MissingRedeemers" + , "scripts" .= renderMissingRedeemers Api.shelleyBasedEra scripts + ] + Conway.MissingRequiredDatums required received -> + mconcat [ "kind" .= String "MissingRequiredDatums" + , "required" .= map (Crypto.hashToTextAsHex . SafeHash.extractHash) + (Set.toList required) + , "received" .= map (Crypto.hashToTextAsHex . SafeHash.extractHash) + (Set.toList received) + ] + Conway.NotAllowedSupplementalDatums disallowed acceptable -> + mconcat [ "kind" .= String "NotAllowedSupplementalDatums" + , "disallowed" .= Set.toList disallowed + , "acceptable" .= Set.toList acceptable + ] + Conway.PPViewHashesDontMatch ppHashInTxBody ppHashFromPParams -> + mconcat [ "kind" .= String "PPViewHashesDontMatch" + , "fromTxBody" .= renderScriptIntegrityHash (strictMaybeToMaybe ppHashInTxBody) + , "fromPParams" .= renderScriptIntegrityHash (strictMaybeToMaybe ppHashFromPParams) + ] + Conway.UnspendableUTxONoDatumHash ins -> + mconcat [ "kind" .= String "MissingRequiredSigners" + , "txins" .= Set.toList ins + ] + Conway.ExtraRedeemers rs -> + Api.caseShelleyToMaryOrAlonzoEraOnwards + (const mempty) + (\alonzoOnwards -> + mconcat + [ "kind" .= String "ExtraRedeemers" + , "rdmrs" .= map (Api.toScriptIndex alonzoOnwards) rs + ] + ) + (Api.shelleyBasedEra :: Api.ShelleyBasedEra era) + Conway.MalformedScriptWitnesses scripts -> + mconcat [ "kind" .= String "MalformedScriptWitnesses" + , "scripts" .= scripts + ] + Conway.MalformedReferenceScripts scripts -> + mconcat [ "kind" .= String "MalformedReferenceScripts" + , "scripts" .= scripts + ] + -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- diff --git a/cardano-node/src/Cardano/Tracing/Peer.hs b/cardano-node/src/Cardano/Tracing/Peer.hs index d0b6918c550..6366a0d8be7 100644 --- a/cardano-node/src/Cardano/Tracing/Peer.hs +++ b/cardano-node/src/Cardano/Tracing/Peer.hs @@ -17,7 +17,9 @@ import Cardano.BM.Tracing import Cardano.Node.Orphans () import Cardano.Node.Queries import Ouroboros.Consensus.Block (Header) -import Ouroboros.Consensus.Util.NormalForm.StrictTVar (StrictTVar, readTVar) +import Ouroboros.Consensus.MiniProtocol.ChainSync.Client (ChainSyncClientHandle, + csCandidate, viewChainSyncState) +import Ouroboros.Consensus.Util.NormalForm.StrictTVar (StrictTVar) import Ouroboros.Consensus.Util.Orphans () import qualified Ouroboros.Network.AnchoredFragment as Net import Ouroboros.Network.Block (unSlotNo) @@ -95,9 +97,9 @@ getCurrentPeers nkd = mapNodeKernelDataIO extractPeers nkd tuple3pop (a, b, _) = (a, b) getCandidates - :: StrictTVar IO (Map peer (StrictTVar IO (Net.AnchoredFragment (Header blk)))) + :: StrictTVar IO (Map peer (ChainSyncClientHandle IO blk)) -> STM.STM IO (Map peer (Net.AnchoredFragment (Header blk))) - getCandidates var = readTVar var >>= traverse readTVar + getCandidates handle = viewChainSyncState handle csCandidate extractPeers :: NodeKernel IO RemoteAddress LocalConnectionId blk -> IO [Peer blk] @@ -107,7 +109,7 @@ getCurrentPeers nkd = mapNodeKernelDataIO extractPeers nkd . Net.readFetchClientsStateVars . getFetchClientRegistry $ kernel ) - candidates <- STM.atomically . getCandidates . getNodeCandidates $ kernel + candidates <- STM.atomically . getCandidates . getChainSyncHandles $ kernel let peers = flip Map.mapMaybeWithKey candidates $ \cid af -> maybe Nothing diff --git a/cardano-node/src/Cardano/Tracing/Tracers.hs b/cardano-node/src/Cardano/Tracing/Tracers.hs index 0838829b859..3d92ba2c727 100644 --- a/cardano-node/src/Cardano/Tracing/Tracers.hs +++ b/cardano-node/src/Cardano/Tracing/Tracers.hs @@ -1,3 +1,4 @@ +{-# LANGUAGE CPP #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} @@ -11,6 +12,7 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PackageImports #-} {-# LANGUAGE QuantifiedConstraints #-} +{-# LANGUAGE RecordWildCards #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TupleSections #-} {-# LANGUAGE TypeApplications #-} @@ -19,6 +21,11 @@ {-# OPTIONS_GHC -Wno-orphans #-} {-# OPTIONS_GHC -fno-warn-redundant-constraints #-} -- needs different instances on ghc8 and on ghc9 +#if __GLASGOW_HASKELL__ < 904 +-- Pattern synonym record fields with GHC-8.10 is issuing the `-Wname-shadowing` +-- warning. +{-# OPTIONS_GHC -Wno-name-shadowing #-} +#endif module Cardano.Tracing.Tracers @@ -95,7 +102,9 @@ import Ouroboros.Network.InboundGovernor (InboundGovernorTrace (..)) import Ouroboros.Network.InboundGovernor.State (InboundGovernorCounters (..)) import Ouroboros.Network.NodeToClient (LocalAddress) import Ouroboros.Network.NodeToNode (RemoteAddress) -import Ouroboros.Network.PeerSelection.Governor (PeerSelectionCounters (..)) +import Ouroboros.Network.PeerSelection.Governor (ChurnCounters (..), + PeerSelectionCounters, PeerSelectionView (..)) +import qualified Ouroboros.Network.PeerSelection.Governor as Governor import Ouroboros.Network.Point (fromWithOrigin) import Ouroboros.Network.Protocol.LocalStateQuery.Type (ShowQuery) import Ouroboros.Network.TxSubmission.Inbound @@ -380,8 +389,14 @@ mkTracers blockConfig tOpts@(TracingOnLegacy trSel) tr nodeKern ekgDirect enable tracerOnOff (tracePublicRootPeers trSel) verb "PublicRootPeers" tr , P2P.dtTracePeerSelectionTracer = - tracerOnOff (tracePeerSelection trSel) - verb "PeerSelection" tr + tracerOnOff (tracePeerSelection trSel) + verb "PeerSelection" tr + <> tracePeerSelectionTracerMetrics + (tracePeerSelection trSel) + ekgDirect + , P2P.dtTraceChurnCounters = + traceChurnCountersMetrics + ekgDirect , P2P.dtDebugPeerSelectionInitiatorTracer = tracerOnOff (traceDebugPeerSelectionInitiatorTracer trSel) verb "DebugPeerSelection" tr @@ -1464,6 +1479,26 @@ traceConnectionManagerTraceMetrics (OnOff True) (Just ekgDirect) = cmtTracer _ -> return () +tracePeerSelectionTracerMetrics + :: forall peeraddr. + OnOff TracePeerSelection + -> Maybe EKGDirect + -> Tracer IO (Governor.TracePeerSelection peeraddr) +tracePeerSelectionTracerMetrics _ Nothing = nullTracer +tracePeerSelectionTracerMetrics (OnOff False) _ = nullTracer +tracePeerSelectionTracerMetrics (OnOff True) (Just ekgDirect) = pstTracer + where + pstTracer :: Tracer IO (Governor.TracePeerSelection peeraddr) + pstTracer = Tracer $ \a -> do + case a of + Governor.TraceChurnAction duration action _ -> + sendEKGDirectDouble + ekgDirect + ("cardano.node.metrics.peerSelection.churn." <> Text.pack (show action) <> ".duration") + (realToFrac duration) + _ -> pure () + + tracePeerSelectionCountersMetrics :: OnOff TracePeerSelectionCounters -> Maybe EKGDirect @@ -1473,13 +1508,68 @@ tracePeerSelectionCountersMetrics (OnOff False) _ = nullTracer tracePeerSelectionCountersMetrics (OnOff True) (Just ekgDirect) = pscTracer where pscTracer :: Tracer IO PeerSelectionCounters - pscTracer = Tracer $ \(PeerSelectionCounters cold warm hot coldBigLedgerPeers warmBigLedgerPeers hotBigLedgerPeers _) -> do - sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.cold" cold - sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.warm" warm - sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.hot" hot - sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.coldBigLedgerPeers" coldBigLedgerPeers - sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.warmBigLedgerPeers" warmBigLedgerPeers - sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.hotBigLedgerPeers" hotBigLedgerPeers + pscTracer = Tracer $ \psc -> do + let PeerSelectionCountersHWC {..} = psc + -- Deprecated counters; they will be removed in a future version + sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.cold" numberOfColdPeers + sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.warm" numberOfWarmPeers + sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.hot" numberOfHotPeers + sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.coldBigLedgerPeers" numberOfColdBigLedgerPeers + sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.warmBigLedgerPeers" numberOfWarmBigLedgerPeers + sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.hotBigLedgerPeers" numberOfHotBigLedgerPeers + + let PeerSelectionCounters {..} = psc + sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.RootPeers" numberOfRootPeers + + sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.KnownPeers" numberOfKnownPeers + sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.ColdPeersPromotions" numberOfColdPeersPromotions + sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.EstablishedPeers" numberOfEstablishedPeers + sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.WarmPeersDemotions" numberOfWarmPeersDemotions + sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.WarmPeersPromotions" numberOfWarmPeersPromotions + sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.ActivePeers" numberOfActivePeers + sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.ActivePeersDemotions" numberOfActivePeersDemotions + + + sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.KnownBigLedgerPeers" numberOfKnownBigLedgerPeers + sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.ColdBigLedgerPeersPromotions" numberOfColdBigLedgerPeersPromotions + sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.EstablishedBigLedgerPeers" numberOfEstablishedBigLedgerPeers + sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.WarmBigLedgerPeersDemotions" numberOfWarmBigLedgerPeersDemotions + sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.WarmBigLedgerPeersPromotions" numberOfWarmBigLedgerPeersPromotions + sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.ActiveBigLedgerPeers" numberOfActiveBigLedgerPeers + sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.ActiveBigLedgerPeersDemotions" numberOfActiveBigLedgerPeersDemotions + + sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.KnownLocalRootPeers" numberOfKnownLocalRootPeers + sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.EstablishedLocalRootPeers" numberOfEstablishedLocalRootPeers + sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.WarmLocalRootPeersPromotions" numberOfWarmLocalRootPeersPromotions + sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.ActiveLocalRootPeers" numberOfActiveLocalRootPeers + sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.ActiveLocalRootPeersDemotions" numberOfActiveLocalRootPeersDemotions + + sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.KnownNonRootPeers" numberOfKnownNonRootPeers + sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.ColdNonRootPeersPromotions" numberOfColdNonRootPeersPromotions + sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.EstablishedNonRootPeers" numberOfEstablishedNonRootPeers + sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.WarmNonRootPeersDemotions" numberOfWarmNonRootPeersDemotions + sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.WarmNonRootPeersPromotions" numberOfWarmNonRootPeersPromotions + sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.ActiveNonRootPeers" numberOfActiveNonRootPeers + sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.ActiveNonRootPeersDemotions" numberOfActiveNonRootPeersDemotions + + sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.KnownBootstrapPeers" numberOfKnownBootstrapPeers + sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.ColdBootstrapPeersPromotions" numberOfColdBootstrapPeersPromotions + sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.EstablishedBootstrapPeers" numberOfEstablishedBootstrapPeers + sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.WarmBootstrapPeersDemotions" numberOfWarmBootstrapPeersDemotions + sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.WarmBootstrapPeersPromotions" numberOfWarmBootstrapPeersPromotions + sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.ActiveBootstrapPeers" numberOfActiveBootstrapPeers + sendEKGDirectInt ekgDirect "cardano.node.metrics.peerSelection.ActiveBootstrapPeersDemotions" numberOfActiveBootstrapPeersDemotions + + +traceChurnCountersMetrics + :: Maybe EKGDirect + -> Tracer IO ChurnCounters +traceChurnCountersMetrics Nothing = nullTracer +traceChurnCountersMetrics (Just ekgDirect) = churnTracer + where + churnTracer :: Tracer IO ChurnCounters + churnTracer = Tracer $ \(ChurnCounter action c) -> + sendEKGDirectInt ekgDirect ("cardano.node.metrics.peerSelection.churn." <> Text.pack (show action)) c traceInboundGovernorCountersMetrics diff --git a/cardano-submit-api/cardano-submit-api.cabal b/cardano-submit-api/cardano-submit-api.cabal index 18f4e3d8354..18fc9c6be7d 100644 --- a/cardano-submit-api/cardano-submit-api.cabal +++ b/cardano-submit-api/cardano-submit-api.cabal @@ -1,7 +1,7 @@ cabal-version: 3.0 name: cardano-submit-api -version: 8.10.1 +version: 8.11.0 synopsis: A web server that allows transactions to be POSTed to the cardano chain description: A web server that allows transactions to be POSTed to the cardano chain. homepage: https://github.com/intersectmbo/cardano-node @@ -39,9 +39,9 @@ library , aeson , async , bytestring - , cardano-api ^>= 8.44 + , cardano-api ^>= 8.46 , cardano-binary - , cardano-cli ^>= 8.22 + , cardano-cli ^>= 8.23 , cardano-crypto-class ^>= 2.1.2 , http-media , iohk-monitoring @@ -49,7 +49,7 @@ library , network , optparse-applicative-fork , ouroboros-consensus-cardano - , ouroboros-network ^>= 0.14 + , ouroboros-network ^>= 0.16 , ouroboros-network-protocols , prometheus >= 2.2.4 , servant diff --git a/cardano-testnet/cardano-testnet.cabal b/cardano-testnet/cardano-testnet.cabal index 2f9010c4d26..d34ff4a71e1 100644 --- a/cardano-testnet/cardano-testnet.cabal +++ b/cardano-testnet/cardano-testnet.cabal @@ -1,7 +1,7 @@ cabal-version: 3.0 name: cardano-testnet -version: 8.8.0 +version: 8.11.0 synopsis: The cardano full node description: The cardano full node. copyright: 2021-2023 Input Output Global Inc (IOG), 2023-2024 Intersect. @@ -35,8 +35,8 @@ library , aeson-pretty , ansi-terminal , bytestring - , cardano-api ^>= 8.44 - , cardano-cli ^>= 8.22 + , cardano-api ^>= 8.46 + , cardano-cli ^>= 8.23 , cardano-crypto-class , cardano-crypto-wrapper , cardano-git-rev ^>= 0.2.2 @@ -68,7 +68,7 @@ library , network , network-mux , optparse-applicative-fork - , ouroboros-network ^>= 0.14 + , ouroboros-network ^>= 0.16 , ouroboros-network-api , prettyprinter , process diff --git a/cardano-testnet/files/data/conway/genesis.conway.spec.json b/cardano-testnet/files/data/conway/genesis.conway.spec.json index 59c636fec60..f27ec351592 100644 --- a/cardano-testnet/files/data/conway/genesis.conway.spec.json +++ b/cardano-testnet/files/data/conway/genesis.conway.spec.json @@ -25,6 +25,7 @@ "dRepDeposit": 2000000, "dRepActivity": 20, "minFeeRefScriptCostPerByte": 0, + "plutusV3CostModel": [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], "constitution": { "anchor": { "url": "", diff --git a/cardano-testnet/src/Testnet/Defaults.hs b/cardano-testnet/src/Testnet/Defaults.hs index 3a763d46bec..e8d15f911a8 100644 --- a/cardano-testnet/src/Testnet/Defaults.hs +++ b/cardano-testnet/src/Testnet/Defaults.hs @@ -48,15 +48,12 @@ import Cardano.Tracing.Config import Prelude -import Control.Monad import Control.Monad.Identity (Identity) import Data.Aeson (ToJSON (..), Value, (.=)) import qualified Data.Aeson as Aeson import qualified Data.Aeson.Key as Key import qualified Data.Aeson.KeyMap as KeyMapAeson import qualified Data.Default.Class as DefaultClass -import Data.Map.Strict (Map) -import qualified Data.Map.Strict as Map import Data.Maybe import Data.Proxy import Data.Ratio @@ -72,32 +69,25 @@ import Numeric.Natural import System.FilePath (()) import Test.Cardano.Ledger.Core.Rational +import Test.Cardano.Ledger.Plutus (testingCostModelV3) import Testnet.Start.Types import Testnet.Types {- HLINT ignore "Use underscore" -} instance Api.Error AlonzoGenesisError where - prettyError (AlonzoGenErrCostModels e) = - "Error in Alonzo genesis cost models: " <> pshow e prettyError (AlonzoGenErrTooMuchPrecision r) = "Too much precision for bounded rational in Alonzo genesis: " <> pshow r -data AlonzoGenesisError +newtype AlonzoGenesisError = AlonzoGenErrTooMuchPrecision Rational - | AlonzoGenErrCostModels (Map Ledger.Language Ledger.CostModelError) deriving Show defaultAlonzoGenesis :: Either AlonzoGenesisError AlonzoGenesis defaultAlonzoGenesis = do let genesis = Api.alonzoGenesisDefaults - costModelsErrors = Ledger.costModelsErrors $ Ledger.agCostModels genesis prices = Ledger.agPrices genesis - -- fail on cost models errors - unless (Map.null costModelsErrors) - . Left $ AlonzoGenErrCostModels costModelsErrors - -- double check that prices have correct values - they're set using unsafeBoundedRational in cardano-api _priceExecSteps <- checkBoundedRational $ Ledger.prSteps prices _priceMemSteps <- checkBoundedRational $ Ledger.prMem prices @@ -124,6 +114,7 @@ defaultConwayGenesis = , ucppDRepDeposit = Coin 1_000_000 , ucppDRepActivity = EpochInterval 100 , ucppMinFeeRefScriptCostPerByte = 0 %! 1 -- FIXME GARBAGE VALUE + , ucppPlutusV3CostModel = testingCostModelV3 } drepVotingThresholds = DRepVotingThresholds { dvtMotionNoConfidence = 0 %! 1 @@ -473,7 +464,8 @@ eraToProtocolVersion (AnyCardanoEra era) = AlonzoEra -> mkProtVer (6, 0) -- Babbage had an intra-era hardfork BabbageEra -> mkProtVer (8, 0) - ConwayEra -> mkProtVer (9, 0) + -- By default start after bootstrap (which is PV9) + ConwayEra -> mkProtVer (10, 0) -- TODO: Expose from cardano-api mkProtVer :: (Natural, Natural) -> ProtVer diff --git a/cardano-testnet/src/Testnet/Property/Util.hs b/cardano-testnet/src/Testnet/Property/Util.hs index 4a64d79ffbd..103199cd63a 100644 --- a/cardano-testnet/src/Testnet/Property/Util.hs +++ b/cardano-testnet/src/Testnet/Property/Util.hs @@ -75,4 +75,3 @@ runInBackground act = void . H.evalM $ allocate (H.async act) cleanUp decodeEraUTxO :: (IsShelleyBasedEra era, MonadTest m) => ShelleyBasedEra era -> Aeson.Value -> m (UTxO era) decodeEraUTxO _ = H.jsonErrorFail . Aeson.fromJSON - diff --git a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/DRepActivity.hs b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/DRepActivity.hs index 382f314c4a3..63181e1a470 100644 --- a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/DRepActivity.hs +++ b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/DRepActivity.hs @@ -27,7 +27,7 @@ import qualified Data.Map as Map import Data.String import qualified Data.Text as Text import Data.Word (Word32, Word64) -import GHC.Stack (HasCallStack, callStack) +import GHC.Stack import Lens.Micro ((^.)) import System.FilePath (()) @@ -199,9 +199,8 @@ activityChangeProposalTest execConfig epochStateView configurationFile socketPat H.note_ $ "Epoch after \"" <> prefix <> "\" prop: " <> show epochAfterProp void $ waitForEpochs epochStateView minWait - case mExpected of - Nothing -> return () - Just expected -> H.nothingFailM $ watchEpochStateView epochStateView (isDRepActivityUpdated expected) maxWait + forM_ mExpected $ \expected -> + H.nothingFailM $ watchEpochStateView epochStateView (isDRepActivityUpdated expected) maxWait return thisProposal @@ -327,7 +326,7 @@ voteChangeProposal -- (i.e: "yes", "no", "abstain"). -> PaymentKeyInfo -- ^ Wallet that will pay for the transaction. -> m () -voteChangeProposal execConfig epochStateView sbe work prefix governanceActionTxId governanceActionIndex votes wallet = do +voteChangeProposal execConfig epochStateView sbe work prefix governanceActionTxId governanceActionIndex votes wallet = withFrozenCallStack $ do baseDir <- H.createDirectoryIfMissing $ work prefix let era = toCardanoEra sbe diff --git a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/ProposeNewConstitution.hs b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/ProposeNewConstitution.hs index 57b00e946e6..a3bb6650a54 100644 --- a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/ProposeNewConstitution.hs +++ b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/ProposeNewConstitution.hs @@ -177,7 +177,7 @@ hprop_ledger_events_propose_new_constitution = integrationWorkspace "propose-new governanceActionIndex <- case propSubmittedResult of Left e -> H.failMessage callStack - $ "findCondition failed with: " <> displayError e + $ "findCondition failed with: " <> displayError e Right Nothing -> H.failMessage callStack "Couldn't find proposal." Right (Just a) -> return a @@ -249,4 +249,3 @@ filterRatificationState c guardRailScriptHash (AnyNewEpochState sbe newEpochStat ) sbe - diff --git a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/ProposeNewConstitutionSPO.hs b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/ProposeNewConstitutionSPO.hs index 0d90f721489..5eaafe938d7 100644 --- a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/ProposeNewConstitutionSPO.hs +++ b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/ProposeNewConstitutionSPO.hs @@ -151,7 +151,7 @@ hprop_ledger_events_propose_new_constitution_spo = integrationWorkspace "propose let L.GovActionIx governanceActionIndex = L.gaidGovActionIx govActionId votes <- SPO.generateVoteFiles ceo execConfig work "vote-files" txIdString governanceActionIndex - [(defaultSpoKeys n, "yes") | n <- [1..3]] + [(defaultSpoKeys n, "yes") | n <- [1..3]] -- Submit votes votesTxBody <- createVotingTxBody execConfig epochStateView sbe work "vote-tx-body" votes wallet0 diff --git a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/TreasuryWithdrawal.hs b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/TreasuryWithdrawal.hs index a6b3e69f1cb..b36f0110b81 100644 --- a/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/TreasuryWithdrawal.hs +++ b/cardano-testnet/test/cardano-testnet-test/Cardano/Testnet/Test/Gov/TreasuryWithdrawal.hs @@ -189,7 +189,7 @@ hprop_ledger_events_treasury_withdrawal = integrationRetryWorkspace 1 "treasury [ eraName, "transaction", "submit" , "--tx-file", txbodySignedFp ] - -- }}} +-- }}} txidString <- mconcat . lines <$> execCli' execConfig [ "transaction", "txid" @@ -309,4 +309,3 @@ getTreasuryWithdrawalProposal nodeConfigFile socketPath maxEpoch = withFrozenCal _ -> pure ConditionNotMet ) actualEra - diff --git a/cardano-testnet/test/cardano-testnet-test/cardano-testnet-test.hs b/cardano-testnet/test/cardano-testnet-test/cardano-testnet-test.hs index c7314f26ed0..5a568843d9d 100644 --- a/cardano-testnet/test/cardano-testnet-test/cardano-testnet-test.hs +++ b/cardano-testnet/test/cardano-testnet-test/cardano-testnet-test.hs @@ -14,7 +14,6 @@ import qualified Cardano.Testnet.Test.Cli.Query import qualified Cardano.Testnet.Test.Cli.QuerySlotNumber import qualified Cardano.Testnet.Test.FoldEpochState import qualified Cardano.Testnet.Test.Gov.CommitteeAddNew as Gov -import qualified Cardano.Testnet.Test.Gov.DRepActivity as Gov import qualified Cardano.Testnet.Test.Gov.DRepDeposit as Gov import qualified Cardano.Testnet.Test.Gov.DRepRetirement as Gov import qualified Cardano.Testnet.Test.Gov.ProposeNewConstitution as Gov @@ -50,7 +49,8 @@ tests = do -- TODO: Replace foldBlocks with checkLedgerStateCondition , T.testGroup "Governance" [ ignoreOnMacAndWindows "Committee Add New" Gov.hprop_constitutional_committee_add_new - , ignoreOnWindows "DRep Activity" Gov.hprop_check_drep_activity + -- FIXME: This test is broken - drepActivity is not updated within the expeted period + -- , ignoreOnWindows "DRep Activity" Gov.hprop_check_drep_activity , ignoreOnWindows "DRep Deposits" Gov.hprop_ledger_events_drep_deposits -- FIXME Those tests are flaky -- , ignoreOnWindows "InfoAction" LedgerEvents.hprop_ledger_events_info_action diff --git a/cardano-testnet/test/cardano-testnet-test/files/golden/queries/govStateOut.json b/cardano-testnet/test/cardano-testnet-test/files/golden/queries/govStateOut.json index eb222aca449..caabb1919ec 100644 --- a/cardano-testnet/test/cardano-testnet-test/files/golden/queries/govStateOut.json +++ b/cardano-testnet/test/cardano-testnet-test/files/golden/queries/govStateOut.json @@ -377,51 +377,6 @@ 117366, 10475, 4, - 117366, - 10475, - 4, - 832808, - 18, - 3209094, - 6, - 331451, - 1, - 65990684, - 23097, - 18, - 114242, - 18, - 94393407, - 87060, - 18, - 16420089, - 18, - 2145798, - 36, - 3795345, - 12, - 889023, - 1, - 204237282, - 23271, - 36, - 129165, - 36, - 189977790, - 85902, - 36, - 33012864, - 36, - 388443360, - 1, - 401885761, - 72, - 2331379, - 72, - 23000, - 100, - 23000, - 100, 23000, 100, 23000, @@ -481,16 +436,13 @@ 80436, 32, 43249, - 1000, 32, + 1000, 32, 80556, 1, 57667, 4, - 1927926, - 82523, - 4, 1000, 10, 197145, @@ -583,6 +535,54 @@ 39121781, 32260, 10, + 23000, + 100, + 23000, + 100, + 832808, + 18, + 3209094, + 6, + 331451, + 1, + 65990684, + 23097, + 18, + 114242, + 18, + 94393407, + 87060, + 18, + 16420089, + 18, + 2145798, + 36, + 3795345, + 12, + 889023, + 1, + 204237282, + 23271, + 36, + 129165, + 36, + 189977790, + 85902, + 36, + 33012864, + 36, + 388443360, + 1, + 401885761, + 72, + 2331379, + 72, + 1927926, + 82523, + 4, + 117366, + 10475, + 4, 1292075, 24469, 74, @@ -641,7 +641,7 @@ "ppSecurityGroup": 0.5 }, "protocolVersion": { - "major": 9, + "major": 10, "minor": 0 }, "stakeAddressDeposit": 0, @@ -652,6 +652,9 @@ "txFeePerByte": 1, "utxoCostPerByte": 4310 }, + "futurePParams": { + "tag": "NoPParamsUpdate" + }, "nextRatifyState": { "enactedGovActions": [], "expiredGovActions": [], @@ -1034,51 +1037,6 @@ 117366, 10475, 4, - 117366, - 10475, - 4, - 832808, - 18, - 3209094, - 6, - 331451, - 1, - 65990684, - 23097, - 18, - 114242, - 18, - 94393407, - 87060, - 18, - 16420089, - 18, - 2145798, - 36, - 3795345, - 12, - 889023, - 1, - 204237282, - 23271, - 36, - 129165, - 36, - 189977790, - 85902, - 36, - 33012864, - 36, - 388443360, - 1, - 401885761, - 72, - 2331379, - 72, - 23000, - 100, - 23000, - 100, 23000, 100, 23000, @@ -1138,16 +1096,13 @@ 80436, 32, 43249, - 1000, 32, + 1000, 32, 80556, 1, 57667, 4, - 1927926, - 82523, - 4, 1000, 10, 197145, @@ -1240,6 +1195,54 @@ 39121781, 32260, 10, + 23000, + 100, + 23000, + 100, + 832808, + 18, + 3209094, + 6, + 331451, + 1, + 65990684, + 23097, + 18, + 114242, + 18, + 94393407, + 87060, + 18, + 16420089, + 18, + 2145798, + 36, + 3795345, + 12, + 889023, + 1, + 204237282, + 23271, + 36, + 129165, + 36, + 189977790, + 85902, + 36, + 33012864, + 36, + 388443360, + 1, + 401885761, + 72, + 2331379, + 72, + 1927926, + 82523, + 4, + 117366, + 10475, + 4, 1292075, 24469, 74, @@ -1298,7 +1301,7 @@ "ppSecurityGroup": 0.5 }, "protocolVersion": { - "major": 9, + "major": 10, "minor": 0 }, "stakeAddressDeposit": 0, @@ -1683,51 +1686,6 @@ 117366, 10475, 4, - 117366, - 10475, - 4, - 832808, - 18, - 3209094, - 6, - 331451, - 1, - 65990684, - 23097, - 18, - 114242, - 18, - 94393407, - 87060, - 18, - 16420089, - 18, - 2145798, - 36, - 3795345, - 12, - 889023, - 1, - 204237282, - 23271, - 36, - 129165, - 36, - 189977790, - 85902, - 36, - 33012864, - 36, - 388443360, - 1, - 401885761, - 72, - 2331379, - 72, - 23000, - 100, - 23000, - 100, 23000, 100, 23000, @@ -1787,16 +1745,13 @@ 80436, 32, 43249, - 1000, 32, + 1000, 32, 80556, 1, 57667, 4, - 1927926, - 82523, - 4, 1000, 10, 197145, @@ -1889,6 +1844,54 @@ 39121781, 32260, 10, + 23000, + 100, + 23000, + 100, + 832808, + 18, + 3209094, + 6, + 331451, + 1, + 65990684, + 23097, + 18, + 114242, + 18, + 94393407, + 87060, + 18, + 16420089, + 18, + 2145798, + 36, + 3795345, + 12, + 889023, + 1, + 204237282, + 23271, + 36, + 129165, + 36, + 189977790, + 85902, + 36, + 33012864, + 36, + 388443360, + 1, + 401885761, + 72, + 2331379, + 72, + 1927926, + 82523, + 4, + 117366, + 10475, + 4, 1292075, 24469, 74, @@ -1947,7 +1950,7 @@ "ppSecurityGroup": 0.5 }, "protocolVersion": { - "major": 9, + "major": 10, "minor": 0 }, "stakeAddressDeposit": 0, @@ -2329,51 +2332,6 @@ 117366, 10475, 4, - 117366, - 10475, - 4, - 832808, - 18, - 3209094, - 6, - 331451, - 1, - 65990684, - 23097, - 18, - 114242, - 18, - 94393407, - 87060, - 18, - 16420089, - 18, - 2145798, - 36, - 3795345, - 12, - 889023, - 1, - 204237282, - 23271, - 36, - 129165, - 36, - 189977790, - 85902, - 36, - 33012864, - 36, - 388443360, - 1, - 401885761, - 72, - 2331379, - 72, - 23000, - 100, - 23000, - 100, 23000, 100, 23000, @@ -2433,16 +2391,13 @@ 80436, 32, 43249, - 1000, 32, + 1000, 32, 80556, 1, 57667, 4, - 1927926, - 82523, - 4, 1000, 10, 197145, @@ -2535,6 +2490,54 @@ 39121781, 32260, 10, + 23000, + 100, + 23000, + 100, + 832808, + 18, + 3209094, + 6, + 331451, + 1, + 65990684, + 23097, + 18, + 114242, + 18, + 94393407, + 87060, + 18, + 16420089, + 18, + 2145798, + 36, + 3795345, + 12, + 889023, + 1, + 204237282, + 23271, + 36, + 129165, + 36, + 189977790, + 85902, + 36, + 33012864, + 36, + 388443360, + 1, + 401885761, + 72, + 2331379, + 72, + 1927926, + 82523, + 4, + 117366, + 10475, + 4, 1292075, 24469, 74, @@ -2593,7 +2596,7 @@ "ppSecurityGroup": 0.5 }, "protocolVersion": { - "major": 9, + "major": 10, "minor": 0 }, "stakeAddressDeposit": 0, diff --git a/cardano-testnet/test/cardano-testnet-test/files/golden/queries/protocolParametersFileOut.json b/cardano-testnet/test/cardano-testnet-test/files/golden/queries/protocolParametersFileOut.json index 8b55f872892..96ac06d38a0 100644 --- a/cardano-testnet/test/cardano-testnet-test/files/golden/queries/protocolParametersFileOut.json +++ b/cardano-testnet/test/cardano-testnet-test/files/golden/queries/protocolParametersFileOut.json @@ -364,51 +364,6 @@ 117366, 10475, 4, - 117366, - 10475, - 4, - 832808, - 18, - 3209094, - 6, - 331451, - 1, - 65990684, - 23097, - 18, - 114242, - 18, - 94393407, - 87060, - 18, - 16420089, - 18, - 2145798, - 36, - 3795345, - 12, - 889023, - 1, - 204237282, - 23271, - 36, - 129165, - 36, - 189977790, - 85902, - 36, - 33012864, - 36, - 388443360, - 1, - 401885761, - 72, - 2331379, - 72, - 23000, - 100, - 23000, - 100, 23000, 100, 23000, @@ -468,16 +423,13 @@ 80436, 32, 43249, - 1000, 32, + 1000, 32, 80556, 1, 57667, 4, - 1927926, - 82523, - 4, 1000, 10, 197145, @@ -570,6 +522,54 @@ 39121781, 32260, 10, + 23000, + 100, + 23000, + 100, + 832808, + 18, + 3209094, + 6, + 331451, + 1, + 65990684, + 23097, + 18, + 114242, + 18, + 94393407, + 87060, + 18, + 16420089, + 18, + 2145798, + 36, + 3795345, + 12, + 889023, + 1, + 204237282, + 23271, + 36, + 129165, + 36, + 189977790, + 85902, + 36, + 33012864, + 36, + 388443360, + 1, + 401885761, + 72, + 2331379, + 72, + 1927926, + 82523, + 4, + 117366, + 10475, + 4, 1292075, 24469, 74, @@ -607,7 +607,7 @@ "poolPledgeInfluence": 0, "poolRetireMaxEpoch": 18, "protocolVersion": { - "major": 9, + "major": 10, "minor": 0 }, "stakeAddressDeposit": 0, diff --git a/cardano-testnet/test/cardano-testnet-test/files/golden/queries/protocolParametersOut.txt b/cardano-testnet/test/cardano-testnet-test/files/golden/queries/protocolParametersOut.txt index 8b55f872892..96ac06d38a0 100644 --- a/cardano-testnet/test/cardano-testnet-test/files/golden/queries/protocolParametersOut.txt +++ b/cardano-testnet/test/cardano-testnet-test/files/golden/queries/protocolParametersOut.txt @@ -364,51 +364,6 @@ 117366, 10475, 4, - 117366, - 10475, - 4, - 832808, - 18, - 3209094, - 6, - 331451, - 1, - 65990684, - 23097, - 18, - 114242, - 18, - 94393407, - 87060, - 18, - 16420089, - 18, - 2145798, - 36, - 3795345, - 12, - 889023, - 1, - 204237282, - 23271, - 36, - 129165, - 36, - 189977790, - 85902, - 36, - 33012864, - 36, - 388443360, - 1, - 401885761, - 72, - 2331379, - 72, - 23000, - 100, - 23000, - 100, 23000, 100, 23000, @@ -468,16 +423,13 @@ 80436, 32, 43249, - 1000, 32, + 1000, 32, 80556, 1, 57667, 4, - 1927926, - 82523, - 4, 1000, 10, 197145, @@ -570,6 +522,54 @@ 39121781, 32260, 10, + 23000, + 100, + 23000, + 100, + 832808, + 18, + 3209094, + 6, + 331451, + 1, + 65990684, + 23097, + 18, + 114242, + 18, + 94393407, + 87060, + 18, + 16420089, + 18, + 2145798, + 36, + 3795345, + 12, + 889023, + 1, + 204237282, + 23271, + 36, + 129165, + 36, + 189977790, + 85902, + 36, + 33012864, + 36, + 388443360, + 1, + 401885761, + 72, + 2331379, + 72, + 1927926, + 82523, + 4, + 117366, + 10475, + 4, 1292075, 24469, 74, @@ -607,7 +607,7 @@ "poolPledgeInfluence": 0, "poolRetireMaxEpoch": 18, "protocolVersion": { - "major": 9, + "major": 10, "minor": 0 }, "stakeAddressDeposit": 0, diff --git a/cardano-tracer/cardano-tracer.cabal b/cardano-tracer/cardano-tracer.cabal index 4e63ecea263..27dc15f9077 100644 --- a/cardano-tracer/cardano-tracer.cabal +++ b/cardano-tracer/cardano-tracer.cabal @@ -155,7 +155,7 @@ library , filepath , mime-mail , optparse-applicative - , ouroboros-network ^>= 0.14 + , ouroboros-network ^>= 0.16 , ouroboros-network-api , ouroboros-network-framework , signal diff --git a/configuration/cardano/mainnet-config-new-tracing.json b/configuration/cardano/mainnet-config-new-tracing.json index da3f5775723..4a44bacb2c7 100644 --- a/configuration/cardano/mainnet-config-new-tracing.json +++ b/configuration/cardano/mainnet-config-new-tracing.json @@ -4,7 +4,7 @@ "ByronGenesisFile": "mainnet-byron-genesis.json", "ByronGenesisHash": "5f20df933584822601f9e3f8c024eb5eb252fe8cefb24d1317dc3d432e940ebb", "ConwayGenesisFile": "mainnet-conway-genesis.json", - "ConwayGenesisHash": "49ef010ff0d13b090893a919bbc22022038a8b782faa0b1561a256b781672174", + "ConwayGenesisHash": "40bca1ded6a9cf924f4a228123c102a14ea4b9d211822aabca0b7c22cdb7431b", "LastKnownBlockVersion-Alt": 0, "LastKnownBlockVersion-Major": 3, "LastKnownBlockVersion-Minor": 0, diff --git a/configuration/cardano/mainnet-config.json b/configuration/cardano/mainnet-config.json index 63aef413944..189f335a128 100644 --- a/configuration/cardano/mainnet-config.json +++ b/configuration/cardano/mainnet-config.json @@ -4,7 +4,7 @@ "ByronGenesisFile": "mainnet-byron-genesis.json", "ByronGenesisHash": "5f20df933584822601f9e3f8c024eb5eb252fe8cefb24d1317dc3d432e940ebb", "ConwayGenesisFile": "mainnet-conway-genesis.json", - "ConwayGenesisHash": "49ef010ff0d13b090893a919bbc22022038a8b782faa0b1561a256b781672174", + "ConwayGenesisHash": "91bedad42212c07f6abdafedb7e7c8577fbd07152c695ffae1ab2a528741c6e4", "EnableP2P": true, "LastKnownBlockVersion-Alt": 0, "LastKnownBlockVersion-Major": 3, diff --git a/configuration/cardano/mainnet-config.yaml b/configuration/cardano/mainnet-config.yaml index 9fd49120d2c..7b426c26096 100644 --- a/configuration/cardano/mainnet-config.yaml +++ b/configuration/cardano/mainnet-config.yaml @@ -8,7 +8,7 @@ AlonzoGenesisHash: 7e94a15f55d1e82d10f09203fa1d40f8eede58fd8066542cf6566008068ed ByronGenesisFile: mainnet-byron-genesis.json ByronGenesisHash: 5f20df933584822601f9e3f8c024eb5eb252fe8cefb24d1317dc3d432e940ebb ConwayGenesisFile: mainnet-conway-genesis.json -ConwayGenesisHash: 49ef010ff0d13b090893a919bbc22022038a8b782faa0b1561a256b781672174 +ConwayGenesisHash: 91bedad42212c07f6abdafedb7e7c8577fbd07152c695ffae1ab2a528741c6e4 ShelleyGenesisFile: mainnet-shelley-genesis.json ShelleyGenesisHash: 1a3be38bcbb7911969283716ad7aa550250226b76a61fc51cc9a9a35d9276d81 diff --git a/configuration/cardano/mainnet-conway-genesis.json b/configuration/cardano/mainnet-conway-genesis.json index 87c9bb30f57..07caef68754 100644 --- a/configuration/cardano/mainnet-conway-genesis.json +++ b/configuration/cardano/mainnet-conway-genesis.json @@ -35,5 +35,240 @@ "members": { }, "threshold": 0.67 - } + }, + "plutusV3CostModel": [ + 100788, + 420, + 1, + 1, + 1000, + 173, + 0, + 1, + 1000, + 59957, + 4, + 1, + 11183, + 32, + 207616, + 8310, + 4, + 201305, + 8356, + 4, + 962335, + 18, + 2780678, + 6, + 442008, + 1, + 52538055, + 3756, + 18, + 267929, + 18, + 76433006, + 8868, + 18, + 52948122, + 18, + 1995836, + 36, + 3227919, + 12, + 901022, + 1, + 166917843, + 4307, + 36, + 284546, + 36, + 158221314, + 26549, + 36, + 74698472, + 36, + 333849714, + 1, + 254006273, + 72, + 2174038, + 72, + 1006041, + 43623, + 251, + 0, + 1, + 16000, + 100, + 16000, + 100, + 16000, + 100, + 16000, + 100, + 16000, + 100, + 16000, + 100, + 16000, + 100, + 16000, + 100, + 100, + 100, + 16000, + 100, + 94375, + 32, + 132994, + 32, + 61462, + 4, + 72010, + 178, + 0, + 1, + 22151, + 32, + 91189, + 769, + 4, + 2, + 85848, + 228465, + 122, + 0, + 1, + 1, + 1000, + 42921, + 4, + 2, + 24548, + 29498, + 38, + 1, + 898148, + 27279, + 1, + 51775, + 558, + 1, + 39184, + 1000, + 60594, + 1, + 141895, + 32, + 83150, + 32, + 15299, + 32, + 76049, + 1, + 13169, + 4, + 1293828, + 28716, + 63, + 0, + 1, + 2261318, + 64571, + 4, + 22100, + 10, + 28999, + 74, + 1, + 28999, + 74, + 1, + 43285, + 552, + 1, + 44749, + 541, + 1, + 33852, + 32, + 68246, + 32, + 72362, + 32, + 7243, + 32, + 7391, + 32, + 11546, + 32, + 85848, + 228465, + 122, + 0, + 1, + 1, + 90434, + 519, + 0, + 1, + 74433, + 32, + 85848, + 228465, + 122, + 0, + 1, + 1, + 85848, + 228465, + 122, + 0, + 1, + 1, + 955506, + 213312, + 0, + 2, + 270652, + 22588, + 4, + 1457325, + 64566, + 4, + 20467, + 1, + 4, + 0, + 141992, + 32, + 100788, + 420, + 1, + 1, + 81663, + 32, + 59498, + 32, + 20142, + 32, + 24588, + 32, + 20744, + 32, + 25933, + 32, + 24623, + 32, + 43053543, + 10, + 53384111, + 14333, + 10, + 43574283, + 26308, + 10 + ] } diff --git a/configuration/cardano/mainnet-topology.json b/configuration/cardano/mainnet-topology.json index 5290fbeb035..0a91fd2274a 100644 --- a/configuration/cardano/mainnet-topology.json +++ b/configuration/cardano/mainnet-topology.json @@ -7,6 +7,10 @@ { "address": "backbone.mainnet.emurgornd.com", "port": 3001 + }, + { + "address": "backbone.mainnet.cardanofoundation.org", + "port": 3001 } ], "localRoots": [ diff --git a/configuration/cardano/shelley_qa-config.json b/configuration/cardano/shelley_qa-config.json index 68323e29b2b..db55440802c 100644 --- a/configuration/cardano/shelley_qa-config.json +++ b/configuration/cardano/shelley_qa-config.json @@ -4,7 +4,7 @@ "ByronGenesisFile": "shelley_qa-byron-genesis.json", "ByronGenesisHash": "273cd12237b98d02f108c9c50063d29a8d1d7f32e9a75ade7cd48e08b3070258", "ConwayGenesisFile": "shelley_qa-conway-genesis.json", - "ConwayGenesisHash": "49ef010ff0d13b090893a919bbc22022038a8b782faa0b1561a256b781672174", + "ConwayGenesisHash": "91bedad42212c07f6abdafedb7e7c8577fbd07152c695ffae1ab2a528741c6e4", "EnableP2P": true, "ExperimentalHardForksEnabled": true, "ExperimentalProtocolsEnabled": true, diff --git a/configuration/cardano/shelley_qa-conway-genesis.json b/configuration/cardano/shelley_qa-conway-genesis.json index 87c9bb30f57..07caef68754 100644 --- a/configuration/cardano/shelley_qa-conway-genesis.json +++ b/configuration/cardano/shelley_qa-conway-genesis.json @@ -35,5 +35,240 @@ "members": { }, "threshold": 0.67 - } + }, + "plutusV3CostModel": [ + 100788, + 420, + 1, + 1, + 1000, + 173, + 0, + 1, + 1000, + 59957, + 4, + 1, + 11183, + 32, + 207616, + 8310, + 4, + 201305, + 8356, + 4, + 962335, + 18, + 2780678, + 6, + 442008, + 1, + 52538055, + 3756, + 18, + 267929, + 18, + 76433006, + 8868, + 18, + 52948122, + 18, + 1995836, + 36, + 3227919, + 12, + 901022, + 1, + 166917843, + 4307, + 36, + 284546, + 36, + 158221314, + 26549, + 36, + 74698472, + 36, + 333849714, + 1, + 254006273, + 72, + 2174038, + 72, + 1006041, + 43623, + 251, + 0, + 1, + 16000, + 100, + 16000, + 100, + 16000, + 100, + 16000, + 100, + 16000, + 100, + 16000, + 100, + 16000, + 100, + 16000, + 100, + 100, + 100, + 16000, + 100, + 94375, + 32, + 132994, + 32, + 61462, + 4, + 72010, + 178, + 0, + 1, + 22151, + 32, + 91189, + 769, + 4, + 2, + 85848, + 228465, + 122, + 0, + 1, + 1, + 1000, + 42921, + 4, + 2, + 24548, + 29498, + 38, + 1, + 898148, + 27279, + 1, + 51775, + 558, + 1, + 39184, + 1000, + 60594, + 1, + 141895, + 32, + 83150, + 32, + 15299, + 32, + 76049, + 1, + 13169, + 4, + 1293828, + 28716, + 63, + 0, + 1, + 2261318, + 64571, + 4, + 22100, + 10, + 28999, + 74, + 1, + 28999, + 74, + 1, + 43285, + 552, + 1, + 44749, + 541, + 1, + 33852, + 32, + 68246, + 32, + 72362, + 32, + 7243, + 32, + 7391, + 32, + 11546, + 32, + 85848, + 228465, + 122, + 0, + 1, + 1, + 90434, + 519, + 0, + 1, + 74433, + 32, + 85848, + 228465, + 122, + 0, + 1, + 1, + 85848, + 228465, + 122, + 0, + 1, + 1, + 955506, + 213312, + 0, + 2, + 270652, + 22588, + 4, + 1457325, + 64566, + 4, + 20467, + 1, + 4, + 0, + 141992, + 32, + 100788, + 420, + 1, + 1, + 81663, + 32, + 59498, + 32, + 20142, + 32, + 24588, + 32, + 20744, + 32, + 25933, + 32, + 24623, + 32, + 43053543, + 10, + 53384111, + 14333, + 10, + 43574283, + 26308, + 10 + ] } diff --git a/flake.lock b/flake.lock index 8e816a141e5..92216d82fd1 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "CHaP": { "flake": false, "locked": { - "lastModified": 1713175844, - "narHash": "sha256-8Xz0kMPvgHp1rsv9FHwEl2N40DzPQv22qk+aUW361mM=", + "lastModified": 1715690409, + "narHash": "sha256-+PWaq7ngq5d601d+GBNggNuzT+jXSV7Dl2IrMNCY1KQ=", "owner": "intersectmbo", "repo": "cardano-haskell-packages", - "rev": "e00be463a34798f98c5d18e1d7cc0b8137547005", + "rev": "0ce6797192cbbab051cd8fe5b7516b55273229f1", "type": "github" }, "original": { @@ -921,15 +921,16 @@ "sodium": "sodium" }, "locked": { - "lastModified": 1713468256, - "narHash": "sha256-WfnAu7xX8gJzmTqM/8omdK4jyW+A/Ell+3C5zUN5ha8=", + "lastModified": 1715311504, + "narHash": "sha256-Jxma8/3WMb++2V1sp/iMF+6azv8cBR+ZbkLr61p2R24=", "owner": "input-output-hk", "repo": "iohk-nix", - "rev": "5bfea9faf05d5c36ec1a049eb870cf02d37aab60", + "rev": "47727032a26ed92438afef6bdd45c95cd7399694", "type": "github" }, "original": { "owner": "input-output-hk", + "ref": "node-8.11", "repo": "iohk-nix", "type": "github" } diff --git a/flake.nix b/flake.nix index 5f9bac94f86..9b272ae3a4f 100644 --- a/flake.nix +++ b/flake.nix @@ -25,7 +25,7 @@ }; utils.url = "github:numtide/flake-utils"; iohkNix = { - url = "github:input-output-hk/iohk-nix"; + url = "github:input-output-hk/iohk-nix/node-8.11"; inputs.nixpkgs.follows = "nixpkgs"; }; ops-lib = { diff --git a/nix/haskell.nix b/nix/haskell.nix index 541f31efc4d..cdc1ed2b97f 100644 --- a/nix/haskell.nix +++ b/nix/haskell.nix @@ -120,6 +120,7 @@ let packages.cardano-ledger-conway.components.library.doHaddock = false; packages.cardano-ledger-shelley.components.library.doHaddock = false; packages.cardano-protocol-tpraos.components.library.doHaddock = false; + packages.ouroboros-consensus-cardano.components.library.doHaddock = false; }) ({ lib, pkgs, ...}: lib.mkIf (pkgs.stdenv.hostPlatform.isWindows) { # Remvoe this once mingwx is mapped to null in haskell.nix (haskell.nix#2032), and we bumped _past_ that. diff --git a/nix/workbench/profile/presets/mainnet/genesis/genesis.conway.json b/nix/workbench/profile/presets/mainnet/genesis/genesis.conway.json index 59c636fec60..f27ec351592 100644 --- a/nix/workbench/profile/presets/mainnet/genesis/genesis.conway.json +++ b/nix/workbench/profile/presets/mainnet/genesis/genesis.conway.json @@ -25,6 +25,7 @@ "dRepDeposit": 2000000, "dRepActivity": 20, "minFeeRefScriptCostPerByte": 0, + "plutusV3CostModel": [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], "constitution": { "anchor": { "url": "", diff --git a/scripts/babbage/conway-babbage-test-genesis.json b/scripts/babbage/conway-babbage-test-genesis.json index 59c636fec60..f27ec351592 100644 --- a/scripts/babbage/conway-babbage-test-genesis.json +++ b/scripts/babbage/conway-babbage-test-genesis.json @@ -25,6 +25,7 @@ "dRepDeposit": 2000000, "dRepActivity": 20, "minFeeRefScriptCostPerByte": 0, + "plutusV3CostModel": [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], "constitution": { "anchor": { "url": "", diff --git a/trace-dispatcher/trace-dispatcher.cabal b/trace-dispatcher/trace-dispatcher.cabal index 716366cd95a..2bfcfac29cf 100644 --- a/trace-dispatcher/trace-dispatcher.cabal +++ b/trace-dispatcher/trace-dispatcher.cabal @@ -1,7 +1,7 @@ cabal-version: 3.0 name: trace-dispatcher -version: 2.5.5 +version: 2.5.6 synopsis: Tracers for Cardano description: Package for development of simple and efficient tracers based on the arrow based contra-tracer package @@ -60,7 +60,7 @@ library , hostname , network , optparse-applicative-fork - , ouroboros-network ^>= 0.14 + , ouroboros-network ^>= 0.16 , ouroboros-network-api , ouroboros-network-framework , serialise