Skip to content

Commit 7b8a9e2

Browse files
authored
Merge pull request #6624 from IntersectMBO/nfrisby/dont-error-on-announcements
Integrate Consensus PR 2141 (LeiosNotify: accept but ignore proper MsgLeiosBlockAnnouncement messages)
2 parents 8d41054 + 652c583 commit 7b8a9e2

4 files changed

Lines changed: 9 additions & 6 deletions

File tree

cabal.project

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ allow-newer:
8888
source-repository-package
8989
type: git
9090
location: https://github.com/IntersectMBO/ouroboros-consensus
91-
tag: a7fa6b6f6888272e76e32a7aeb1f82776e1142ec
92-
--sha256: sha256-MiECfkFw7tjHuQsCQuWTXeLqodIrStjt3TY9rE/rHf8=
91+
tag: b71bd2c89d576d8112a0748adf3b890475f9d170
92+
--sha256: sha256-tIjrQkEkS79FdYarjV5Dy+U/Q7kIkOXjdFcddkwA3Us=
9393

9494
-- Points to ouroboros-ledger/leios-prototype
9595
source-repository-package

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ type TraceConstraints blk =
4747
, HasIssuer blk
4848

4949
, ToJSON (HeaderHash blk)
50+
, Show (Header blk)
5051

5152
, LogFormatting (ApplyTxErr blk)
5253
, LogFormatting (GenTx blk)

cardano-node/src/Cardano/Node/Tracing/Consistency.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ getAllNamespaces =
275275
leiosNotifyNS = map (nsGetTuple . nsReplacePrefix
276276
["LeiosNotify", "Remote"])
277277
(allNamespaces :: [Namespace
278-
(AnyMessage (LN.LeiosNotify LeiosPoint () LeiosVote))])
278+
(AnyMessage (LN.LeiosNotify LeiosPoint (Header blk) LeiosVote))])
279279
leiosFetchNS = map (nsGetTuple . nsReplacePrefix
280280
["LeiosFetch", "Remote"])
281281
(allNamespaces :: [Namespace

cardano-node/src/Cardano/Node/Tracing/Tracers/NodeToNode.hs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ import qualified LeiosDemoOnlyTestFetch as LF
1919
import qualified LeiosDemoOnlyTestNotify as LN
2020
import LeiosDemoTypes (LeiosEb, LeiosPoint, LeiosTx, LeiosVote,
2121
messageLeiosFetchToObject, messageLeiosNotifyToObject)
22-
import Ouroboros.Consensus.Block (ConvertRawHash, GetHeader, StandardHash, getHeader)
22+
import Ouroboros.Consensus.Block (ConvertRawHash, GetHeader, Header, StandardHash,
23+
getHeader)
2324
import Ouroboros.Consensus.Ledger.SupportsMempool (GenTx, HasTxId, HasTxs,
2425
LedgerSupportsMempool, extractTxs, txId)
2526
import Ouroboros.Consensus.Node.Run (SerialiseNodeToNodeConstraints, estimateBlockSize)
@@ -476,7 +477,8 @@ instance MetaTrace (TraceKeepAliveClient remotePeer) where
476477
-- CBOR payload that the derived 'Show' would dump.
477478
--------------------------------------------------------------------------------
478479

479-
instance LogFormatting (AnyMessage (LN.LeiosNotify LeiosPoint () LeiosVote)) where
480+
instance ( Show (Header blk)
481+
) => LogFormatting (AnyMessage (LN.LeiosNotify LeiosPoint (Header blk) LeiosVote)) where
480482
forHuman = showT
481483

482484
forMachine _dtal (AnyMessageAndAgency _stok msg) =
@@ -488,7 +490,7 @@ instance LogFormatting (AnyMessage (LF.LeiosFetch LeiosPoint LeiosEb LeiosTx)) w
488490
forMachine _dtal (AnyMessageAndAgency _stok msg) =
489491
messageLeiosFetchToObject msg
490492

491-
instance MetaTrace (AnyMessage (LN.LeiosNotify LeiosPoint () LeiosVote)) where
493+
instance MetaTrace (AnyMessage (LN.LeiosNotify LeiosPoint (Header blk) LeiosVote)) where
492494
namespaceFor (AnyMessageAndAgency _stok msg) = case msg of
493495
LN.MsgLeiosNotificationRequestNext{} -> Namespace [] ["RequestNext"]
494496
LN.MsgLeiosBlockAnnouncement{} -> Namespace [] ["BlockAnnouncement"]

0 commit comments

Comments
 (0)