Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate ouroboros-network #1314

Draft
wants to merge 38 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
809920a
ouroboros-network upgrade: drop NodeToClient versions < 16
neilmayhew Nov 19, 2024
b786ed0
ouroboros-network upgrade: use the new namespace for Network.Mux types
neilmayhew Nov 20, 2024
9cb1b6f
ouroboros-network upgrade: remove field that was discontinued in Bloc…
neilmayhew Dec 13, 2024
16bfc91
Introduce a collection of chainsync handles that synchronizes a map a…
facundominguez May 27, 2024
bedcc80
Implement a call to rotate dynamos in CSJ
facundominguez May 27, 2024
387479f
Specify the order in which to start the peers
Niols Jun 19, 2024
6719d26
Add a BlockFetch leashing attack test
Niols Jun 18, 2024
faf6c52
Accomodate for changes to BlockFetch
Niols Jun 26, 2024
5dd5882
Track the last time the ChainDB thread was starved
Niols Jun 20, 2024
c456631
Add explicit tracing events for CSJ
Niols Jul 15, 2024
1fcbc53
ChainDB: let the BlockFetch client add blocks asynchronously
facundominguez Jul 18, 2024
65c17d1
Update Genesis configuration
nbacquey Jul 16, 2024
ad238fa
Set the jump size to smaller size for byron
facundominguez Jul 23, 2024
75b4e73
Limit the rate at which GDD is evaluated
facundominguez Jul 24, 2024
4a8535e
Documentation edits for CSJ
facundominguez Jun 26, 2024
f8ca570
ChainSync client: disconnect if stuck and not better than selection
amesgen Jul 31, 2024
bfa8401
Update tests
Niols Jul 11, 2024
685ce11
Don't let GDD drop candidates that do not intersect with the selection
facundominguez Aug 1, 2024
8a09295
Introduce `peersOnlyAdversary` and classify abnormal test peers as ad…
nbacquey Aug 6, 2024
317d721
Document all tests that did not have documentation
Niols Aug 6, 2024
b016bbe
Add changelog fragments
amesgen Aug 7, 2024
fe96064
Fix `dropElemsAt` implementation
nbacquey Aug 7, 2024
5627b8d
Adjust stalling test to have more kills by LoP
facundominguez Aug 7, 2024
b115c86
Document prop_blockFetchLeashingAttack
Niols Aug 8, 2024
f8a68df
Disable blockfetch timeouts in uniform tests
facundominguez Aug 8, 2024
ec5f8b7
Groom comments and counterexample messages.
facundominguez Aug 8, 2024
4565a2c
Drop random points from adversarial schedules in the time limited lea…
facundominguez Aug 8, 2024
ddab705
Update configuration after recovering BulkSync in ouroboros-network
facundominguez Aug 20, 2024
a50e092
Add an srp for ouroboros-network
facundominguez Jul 11, 2024
908d3fe
Improve and clarify CSJ documentation
Niols Dec 18, 2024
8f1cbc0
Add a `TraceDrainingThePipe` event
Niols Dec 19, 2024
eeb6366
Make the `DynamoStarting` trace more explicit
Niols Dec 19, 2024
999bfba
Log ChainSync mini-protocol events if need be
Niols Dec 19, 2024
f849a71
Rework default ChainSyncTimeouts in peer simulator
Niols Dec 18, 2024
ea1b40a
Fix tests that relied on default timeouts
Niols Dec 19, 2024
bc3e721
Enrich comment about disabled `mustReplyTimeout`
Niols Dec 19, 2024
f2d134d
Make `ChainSelStarvation` carry an `Enclosed`
jasagredo Dec 19, 2024
f393abe
Cherry pick latest changes from #1179 (#1351)
lehins Dec 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,22 @@ if(os(windows))

-- https://github.com/ulidtko/cabal-doctest/issues/85
constraints: Cabal < 3.13

source-repository-package
type: git
location: https://github.com/IntersectMBO/ouroboros-network.git
tag: 4920b7a8e1a639e6b6a85611bef6d541e21d012a
--sha256: sha256-mrGXtC/mStln5KqoXlruKYl2vHYZhgw3biRlZm82h7A=
subdir:
cardano-client
cardano-ping
monoidal-synchronisation
network-mux
ntp-client
ouroboros-network
ouroboros-network-api
ouroboros-network-framework
ouroboros-network-mock
ouroboros-network-protocols
ouroboros-network-testing
quickcheck-monoids
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,7 @@ library unstable-cardano-tools
microlens,
mtl,
network,
network-mux,
nothunks,
ouroboros-consensus ^>=0.21,
ouroboros-consensus-cardano,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -519,14 +519,7 @@ instance CardanoHardForkConstraints c
]

supportedNodeToClientVersions _ = Map.fromList $
[ (NodeToClientV_9 , CardanoNodeToClientVersion7)
, (NodeToClientV_10, CardanoNodeToClientVersion7)
, (NodeToClientV_11, CardanoNodeToClientVersion8)
, (NodeToClientV_12, CardanoNodeToClientVersion8)
, (NodeToClientV_13, CardanoNodeToClientVersion9)
, (NodeToClientV_14, CardanoNodeToClientVersion10)
, (NodeToClientV_15, CardanoNodeToClientVersion11)
, (NodeToClientV_16, CardanoNodeToClientVersion12)
[ (NodeToClientV_16, CardanoNodeToClientVersion12)
, (NodeToClientV_17, CardanoNodeToClientVersion13)
, (NodeToClientV_18, CardanoNodeToClientVersion14)
, (NodeToClientV_19, CardanoNodeToClientVersion15)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,7 @@ instance SupportedNetworkProtocolVersion (ShelleyBlock proto era) where
, (NodeToNodeV_14, ShelleyNodeToNodeVersion1)
]
supportedNodeToClientVersions _ = Map.fromList [
(NodeToClientV_9, ShelleyNodeToClientVersion5)
, (NodeToClientV_10, ShelleyNodeToClientVersion5)
, (NodeToClientV_11, ShelleyNodeToClientVersion5)
, (NodeToClientV_12, ShelleyNodeToClientVersion5)
, (NodeToClientV_13, ShelleyNodeToClientVersion5)
, (NodeToClientV_14, ShelleyNodeToClientVersion6)
, (NodeToClientV_15, ShelleyNodeToClientVersion7)
, (NodeToClientV_16, ShelleyNodeToClientVersion8)
(NodeToClientV_16, ShelleyNodeToClientVersion8)
, (NodeToClientV_17, ShelleyNodeToClientVersion9)
, (NodeToClientV_18, ShelleyNodeToClientVersion10)
, (NodeToClientV_19, ShelleyNodeToClientVersion11)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import Control.Tracer
import qualified Data.ByteString.Lazy as BL
import Data.Functor.Contravariant ((>$<))
import Data.Void (Void)
import qualified Network.Mux as Mux
import Network.Socket (SockAddr (..))
import Ouroboros.Consensus.Block
import Ouroboros.Consensus.Config
Expand Down Expand Up @@ -40,7 +41,7 @@ import System.FS.IO (ioHasFS)
serve ::
SockAddr
-> N2N.Versions N2N.NodeToNodeVersion N2N.NodeToNodeVersionData
(OuroborosApplicationWithMinimalCtx 'ResponderMode SockAddr BL.ByteString IO Void ())
(OuroborosApplicationWithMinimalCtx 'Mux.ResponderMode SockAddr BL.ByteString IO Void ())
-> IO Void
serve sockAddr application = withIOManager \iocp -> do
let sn = Snocket.socketSnocket iocp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import qualified Data.Map.Strict as Map
import Data.Typeable (Typeable)
import Data.Void (Void)
import GHC.Generics (Generic)
import qualified Network.Mux as Mux
import Ouroboros.Consensus.Block
import Ouroboros.Consensus.MiniProtocol.BlockFetch.Server
(blockFetchServer')
Expand All @@ -48,7 +49,7 @@ import Ouroboros.Network.Driver (runPeer)
import Ouroboros.Network.KeepAlive (keepAliveServer)
import Ouroboros.Network.Magic (NetworkMagic)
import Ouroboros.Network.Mux (MiniProtocol (..), MiniProtocolCb (..),
MuxMode (..), OuroborosApplication (..),
OuroborosApplication (..),
OuroborosApplicationWithMinimalCtx, RunMiniProtocol (..))
import Ouroboros.Network.NodeToNode (NodeToNodeVersionData (..),
Versions (..))
Expand All @@ -74,7 +75,7 @@ immDBServer ::
-> ImmutableDB m blk
-> NetworkMagic
-> Versions NodeToNodeVersion NodeToNodeVersionData
(OuroborosApplicationWithMinimalCtx 'ResponderMode addr BL.ByteString m Void ())
(OuroborosApplicationWithMinimalCtx 'Mux.ResponderMode addr BL.ByteString m Void ())
immDBServer codecCfg encAddr decAddr immDB networkMagic = do
forAllVersions application
where
Expand All @@ -98,7 +99,7 @@ immDBServer codecCfg encAddr decAddr immDB networkMagic = do
application ::
NodeToNodeVersion
-> BlockNodeToNodeVersion blk
-> OuroborosApplicationWithMinimalCtx 'ResponderMode addr BL.ByteString m Void ()
-> OuroborosApplicationWithMinimalCtx 'Mux.ResponderMode addr BL.ByteString m Void ()
application version blockVersion =
OuroborosApplication miniprotocols
where
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Breaking

- Adapted to Genesis-related changes in `ouroboros-consensus` ([#1179](https://github.com/IntersectMBO/ouroboros-consensus/pull/1179)).
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Patch

- Depend on `network-mux` from `ouroboros-network` and use its types.
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ library
hashable,
io-classes ^>=1.5,
mtl,
network-mux ^>=0.5,
ouroboros-consensus ^>=0.21,
ouroboros-network ^>=0.18,
ouroboros-network-api ^>=0.11,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import Control.ResourceRegistry
import Control.Tracer
import Data.ByteString.Lazy (ByteString)
import Data.Void (Void)
import qualified Network.Mux as Mux
import Network.TypedProtocol.Codec
import qualified Network.TypedProtocol.Stateful.Codec as Stateful
import Ouroboros.Consensus.Block
Expand Down Expand Up @@ -465,7 +466,7 @@ mkApps kernel Tracers {..} Codecs {..} Handlers {..} =
responder ::
N.NodeToClientVersion
-> Apps m (ConnectionId peer) b b b b a
-> OuroborosApplicationWithMinimalCtx 'ResponderMode peer b m Void a
-> OuroborosApplicationWithMinimalCtx 'Mux.ResponderMode peer b m Void a
responder version Apps {..} =
nodeToClientProtocols
(NodeToClientProtocols {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ import Data.Hashable (Hashable)
import Data.Int (Int64)
import Data.Map.Strict (Map)
import Data.Void (Void)
import qualified Network.Mux as Mux
import Network.TypedProtocol.Codec
import Ouroboros.Consensus.Block
import Ouroboros.Consensus.Config (DiffusionPipeliningSupport (..))
Expand Down Expand Up @@ -810,7 +811,7 @@ initiator ::
-> NodeToNodeVersion
-> PSTypes.PeerSharing
-> Apps m addr b b b b b a c
-> OuroborosBundleWithExpandedCtx 'InitiatorMode addr b m a Void
-> OuroborosBundleWithExpandedCtx 'Mux.InitiatorMode addr b m a Void
initiator miniProtocolParameters version ownPeerSharing Apps {..} =
nodeToNodeProtocols
miniProtocolParameters
Expand Down Expand Up @@ -845,7 +846,7 @@ initiatorAndResponder ::
-> NodeToNodeVersion
-> PSTypes.PeerSharing
-> Apps m addr b b b b b a c
-> OuroborosBundleWithExpandedCtx 'InitiatorResponderMode addr b m a c
-> OuroborosBundleWithExpandedCtx 'Mux.InitiatorResponderMode addr b m a c
initiatorAndResponder miniProtocolParameters version ownPeerSharing Apps {..} =
nodeToNodeProtocols
miniProtocolParameters
Expand Down
Loading
Loading