Skip to content

Commit

Permalink
Bump ouroboros-network dependency
Browse files Browse the repository at this point in the history
The main change this brings in is
IntersectMBO/ouroboros-network#2540, which makes
ouroboros-network fully compatible with GHC 8.10.2.

Other noticeable changes:
* `nodeBlockFetchSize` was renamed to `estimateBlockSize` (and is part of a
  different type class).
* New `ClientTerminating` constructor of `TraceFetchClientState`.
* New `TraceControlMessage` constructor of `TraceTxSubmissionOutbound`.
* Added missing `COMPLETE` pragma for `CardanoLedgerState`.
  • Loading branch information
mrBliss committed Oct 19, 2020
1 parent e87328d commit f17aba0
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
4 changes: 2 additions & 2 deletions cabal.project
Expand Up @@ -155,8 +155,8 @@ source-repository-package
source-repository-package
type: git
location: https://github.com/input-output-hk/ouroboros-network
tag: 6a2b8922856460cccdc7015d33a14ebd28696d14
--sha256: 01sxmgm65i8lspzh600vvyn5pfwhny4bx215ksxh9lpz8kjp1lc5
tag: 4827c387a84c5cbd279d9a348368747051607cc0
--sha256: 1gfc5kvpndal9i9c7cgxbfs4zgrfysrxqswcyj8ws9law8yd9fc7
subdir:
io-sim
io-sim-classes
Expand Down
6 changes: 3 additions & 3 deletions cardano-node/src/Cardano/Tracing/OrphanInstances/Consensus.hs
Expand Up @@ -46,7 +46,7 @@ import Ouroboros.Consensus.MiniProtocol.ChainSync.Client (TraceChainSy
import Ouroboros.Consensus.MiniProtocol.ChainSync.Server (TraceChainSyncServerEvent (..))
import Ouroboros.Consensus.MiniProtocol.LocalTxSubmission.Server
(TraceLocalTxSubmissionServerEvent (..))
import Ouroboros.Consensus.Node.Run (RunNode (..))
import Ouroboros.Consensus.Node.Run (RunNode, estimateBlockSize)
import Ouroboros.Consensus.Node.Tracers (TraceForgeEvent (..))
import Ouroboros.Consensus.Protocol.Abstract
import qualified Ouroboros.Consensus.Protocol.BFT as BFT
Expand Down Expand Up @@ -1067,7 +1067,7 @@ instance ( tx ~ GenTx blk
(Proxy @blk)
MaximalVerbosity
(blockHash blk)
, "blockSize" .= toJSON (nodeBlockFetchSize (getHeader blk))
, "blockSize" .= toJSON (estimateBlockSize (getHeader blk))
, "txIds" .= toJSON (map (show . txId) txs)
]
toObject verb (TraceAdoptedBlock slotNo blk _txs) =
Expand All @@ -1078,7 +1078,7 @@ instance ( tx ~ GenTx blk
(Proxy @blk)
verb
(blockHash blk)
, "blockSize" .= toJSON (nodeBlockFetchSize (getHeader blk))
, "blockSize" .= toJSON (estimateBlockSize (getHeader blk))
]


Expand Down
12 changes: 9 additions & 3 deletions cardano-node/src/Cardano/Tracing/OrphanInstances/Network.hs
Expand Up @@ -26,7 +26,7 @@ import Cardano.Tracing.Render

import Ouroboros.Consensus.Block (ConvertRawHash (..), getHeader)
import Ouroboros.Consensus.Ledger.SupportsMempool (GenTx, HasTxs (..), txId)
import Ouroboros.Consensus.Node.Run (RunNode (..))
import Ouroboros.Consensus.Node.Run (RunNode, estimateBlockSize)
import Ouroboros.Network.Block
import Ouroboros.Network.BlockFetch.ClientState (TraceFetchClientState (..),
TraceLabelPeer (..))
Expand Down Expand Up @@ -386,7 +386,7 @@ instance ( ConvertTxId blk
toObject MaximalVerbosity (AnyMessageAndAgency _ (MsgBlock blk)) =
mkObject [ "kind" .= String "MsgBlock"
, "blockHash" .= renderHeaderHash (Proxy @blk) (blockHash blk)
, "blockSize" .= toJSON (nodeBlockFetchSize (getHeader blk))
, "blockSize" .= toJSON (estimateBlockSize (getHeader blk))
, "txIds" .= toJSON (presentTx <$> extractTxs blk)
]
where
Expand All @@ -396,7 +396,7 @@ instance ( ConvertTxId blk
toObject _v (AnyMessageAndAgency _ (MsgBlock blk)) =
mkObject [ "kind" .= String "MsgBlock"
, "blockHash" .= renderHeaderHash (Proxy @blk) (blockHash blk)
, "blockSize" .= toJSON (nodeBlockFetchSize (getHeader blk))
, "blockSize" .= toJSON (estimateBlockSize (getHeader blk))
]
toObject _v (AnyMessageAndAgency _ MsgRequestRange{}) =
mkObject [ "kind" .= String "MsgRequestRange" ]
Expand Down Expand Up @@ -554,6 +554,8 @@ instance ToObject (TraceFetchClientState header) where
mkObject [ "kind" .= String "StartedFetchBatch" ]
toObject _verb RejectedFetchBatch {} =
mkObject [ "kind" .= String "RejectedFetchBatch" ]
toObject _verb ClientTerminating {} =
mkObject [ "kind" .= String "ClientTerminating" ]


instance Show peer
Expand Down Expand Up @@ -604,6 +606,10 @@ instance (Show txid, Show tx)
mkObject
[ "kind" .= String "TraceTxSubmissionOutboundSendMsgReplyTxs"
]
toObject _verb (TraceControlMessage _msg) =
mkObject
[ "kind" .= String "TraceControlMessage"
]


instance Show remotePeer => ToObject (TraceKeepAliveClient remotePeer) where
Expand Down
1 change: 0 additions & 1 deletion cardano-node/src/Cardano/Tracing/Queries.hs
Expand Up @@ -51,4 +51,3 @@ instance LedgerQueries (Cardano.CardanoBlock c) where
Cardano.LedgerStateShelley ledgerShelley -> ledgerUtxoSize ledgerShelley
Cardano.LedgerStateAllegra ledgerAllegra -> ledgerUtxoSize ledgerAllegra
Cardano.LedgerStateMary ledgerMary -> ledgerUtxoSize ledgerMary
_ -> error "ledgerUtxoSize: unhandled CardanoBlock case"

0 comments on commit f17aba0

Please sign in to comment.