diff --git a/cabal.project b/cabal.project index 1a927bf6eaf..089c7e82eb1 100644 --- a/cabal.project +++ b/cabal.project @@ -68,3 +68,16 @@ allow-newer: -- IMPORTANT -- Do NOT add more source-repository-package stanzas here unless they are strictly -- temporary! Please read the section in CONTRIBUTING about updating dependencies. +source-repository-package + type: git + location: https://github.com/IntersectMBO/ouroboros-consensus + -- use branch geo2a/issue-892-checksum-snaphot-file-release-ouroboros-consensus-0.21.0.0-backport + tag: 0ff4c0445 + --sha256: xWBEq9kq2eUTlOnMBkSftH8NUUGbpwpamu1G1TgGETU= + subdir: + ouroboros-consensus + ouroboros-consensus-cardano + ouroboros-consensus-diffusion + ouroboros-consensus-protocol + sop-extras + strict-sop-core diff --git a/cardano-node/src/Cardano/Node/Tracing/Tracers/ChainDB.hs b/cardano-node/src/Cardano/Node/Tracing/Tracers/ChainDB.hs index a0ecf536704..c6920498fdb 100644 --- a/cardano-node/src/Cardano/Node/Tracing/Tracers/ChainDB.hs +++ b/cardano-node/src/Cardano/Node/Tracing/Tracers/ChainDB.hs @@ -1522,6 +1522,8 @@ instance ( StandardHash blk " This is most likely an expected change in the serialization format," <> " which currently requires a chain replay" _ -> "" + forHuman (LedgerDB.SnapshotMissingChecksum snap) = + "Checksum file is missing for snapshot " <> showT snap forMachine dtals (LedgerDB.TookSnapshot snap pt enclosedTiming) = mconcat [ "kind" .= String "TookSnapshot" @@ -1535,15 +1537,21 @@ instance ( StandardHash blk mconcat [ "kind" .= String "InvalidSnapshot" , "snapshot" .= forMachine dtals snap , "failure" .= show failure ] + forMachine dtals (LedgerDB.SnapshotMissingChecksum snap) = + mconcat [ "kind" .= String "SnapshotMissingChecksum" + , "snapshot" .= forMachine dtals snap + ] instance MetaTrace (LedgerDB.TraceSnapshotEvent blk) where namespaceFor LedgerDB.TookSnapshot {} = Namespace [] ["TookSnapshot"] namespaceFor LedgerDB.DeletedSnapshot {} = Namespace [] ["DeletedSnapshot"] namespaceFor LedgerDB.InvalidSnapshot {} = Namespace [] ["InvalidSnapshot"] + namespaceFor LedgerDB.SnapshotMissingChecksum {} = Namespace [] ["SnapshotMissingChecksum"] severityFor (Namespace _ ["TookSnapshot"]) _ = Just Info severityFor (Namespace _ ["DeletedSnapshot"]) _ = Just Debug severityFor (Namespace _ ["InvalidSnapshot"]) _ = Just Error + severityFor (Namespace _ ["SnapshotMissingChecksum"]) _ = Just Warning severityFor _ _ = Nothing documentFor (Namespace _ ["TookSnapshot"]) = Just $ mconcat @@ -1555,12 +1563,15 @@ instance MetaTrace (LedgerDB.TraceSnapshotEvent blk) where "A snapshot was deleted from the disk." documentFor (Namespace _ ["InvalidSnapshot"]) = Just "An on disk snapshot was invalid. Unless it was suffixed, it will be deleted" + documentFor (Namespace _ ["SnapshotMissingChecksum"]) = Just + "Checksum file was missing for snapshot." documentFor _ = Nothing allNamespaces = [ Namespace [] ["TookSnapshot"] , Namespace [] ["DeletedSnapshot"] , Namespace [] ["InvalidSnapshot"] + , Namespace [] ["SnapshotMissingChecksum"] ] diff --git a/cardano-node/src/Cardano/Tracing/OrphanInstances/Consensus.hs b/cardano-node/src/Cardano/Tracing/OrphanInstances/Consensus.hs index 2a3c60f141b..f9ccdfeeab9 100644 --- a/cardano-node/src/Cardano/Tracing/OrphanInstances/Consensus.hs +++ b/cardano-node/src/Cardano/Tracing/OrphanInstances/Consensus.hs @@ -175,6 +175,7 @@ instance HasSeverityAnnotation (ChainDB.TraceEvent blk) where LedgerDB.TookSnapshot {} -> Info LedgerDB.DeletedSnapshot {} -> Debug LedgerDB.InvalidSnapshot {} -> Error + LedgerDB.SnapshotMissingChecksum {} -> Warning getSeverityAnnotation (ChainDB.TraceCopyToImmutableDBEvent ev) = case ev of ChainDB.CopiedBlockToImmutableDB {} -> Debug @@ -615,6 +616,8 @@ instance ( ConvertRawHash blk " This is most likely an expected change in the serialization format," <> " which currently requires a chain replay" _ -> "" + LedgerDB.SnapshotMissingChecksum snap -> + "Checksum file is missing for snapshot " <> showT snap LedgerDB.TookSnapshot snap pt RisingEdge -> "Taking ledger snapshot " <> showT snap <> @@ -1101,6 +1104,10 @@ instance ( ConvertRawHash blk mconcat [ "kind" .= String "TraceSnapshotEvent.InvalidSnapshot" , "snapshot" .= toObject verb snap , "failure" .= show failure ] + LedgerDB.SnapshotMissingChecksum snap -> + mconcat [ "kind" .= String "TraceSnapshotEvent.SnapshotMissingChecksum" + , "snapshot" .= toObject verb snap + ] toObject verb (ChainDB.TraceCopyToImmutableDBEvent ev) = case ev of ChainDB.CopiedBlockToImmutableDB pt ->