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

CAD-3444 update ouroboros-network #3215

Closed
wants to merge 18 commits into from
Closed

Conversation

coot
Copy link
Contributor

@coot coot commented Sep 17, 2021

No description provided.

coot and others added 17 commits September 8, 2021 16:12
with changes in ouroboros-network api.
Changes includes:
- new format for topology files
- new configuration options:
    * RespondersIdleTimeout
    * ProtocolIdleTimeout
    * WaitTimeTimeout
    * TargetNumberOfRootPeers
    * TargetNumberOfKnownPeers
    * TargetNumberOfEstablishedPeers
    * TargetNumberOfActivePeers
- new tracers
    * LocalRootPeers
    * PeerSelection
    * DebugPeerSelection
    * PeerSelectionActons
    * ConnectionManager
    * InboundGovernor (Armando)
    * PeerSelectionCounters (Armando)
- old tracers where removed

ConnectionManager tracer

* it was turned off if ekg direct was defined
* renamed "numberConns" from ConnectionManagerCounters to "prunableConns"  (in ekg)

- leave a thunk in the Mark snapshot
- cardano-node using p2p-governor and connection manager

Inbound Governor Tracers

* Added new constructors
* Removed ekg established counter

- connection-manager: dump state on SIGUSR1
- Fixed trace severity (#3176)
- update ouroboros-network
Sometimes one wants to run multiple nodes, which requires changing db
and sock directories.
* TraceInboundGovernor
* TraceInboundGovernorCounters
* TraceLocalInboundGovernor

Just to match all the other tracers, they should be prefixed with
'Trace'.

network counters configuration

Consistently keep a seprate option for turning counters on / off.  All
of them (`TraceConnectionManagerCounters`, `TracePeerSelectionCounters`,
`TraceInboundGovernorCounters`) are on by default:

Fix peer selection trace, which should be set on / off by
`tracePeerSelection` and not `tracePeerSelectionCounter` option.

Fix connection manager counters, which should be set on / off by
`traceConnectionManagerCounters` rather than `traceInboundGovernor`
option.

Fix inbound governor counters, which should be set on / off by
`traceInboundGovernorCounters` rather than `traceInboundGovernor`
option.

Fix order of config options in `Cardano.Tracing.Config` module.

Fix default value of `tracePeerSelectionCounters`: it ought to be
`OnOff True`.

Trace inbound governor counters with EKG

Added ekg for established and warm remote peers counter metrics

Track "tips" served over blockfetch

Track the number of "tips" (really the number of times we serve the
block with the highest slot number we've seen. Gives an estimate of how
usefull the node is to its downstream peers.

Calculate the CDF for 1s, 2s and 5s for block delay

Calculate the CDF for 1s, 2s and 5s for the last 1080 blocks which
corresponds to about 6h for mainnet.

Add a counter block propagation delay
Updated Network Topology configuration to use optional top level fields

Added tracing to signal handler local config changes

Added explanation on how to update local configuration on the fly to the docs

Added new topology configuration file format to docs

Updated new names to docs

introduce readTopologyFileOrError

Changed daLocalRootPeersVar, daPublicRootPeersVar and
daUseLedgerAfterSlotVar to STM actions since they are read-only

Updated NetworkTopology configuration file format

Refactored new config file to its own module, preserving the old config format

Changed name of top level producer configuration to LocalRoots and PublicRoots
Added success message to log in case the topology file is parsed with success

Added error message to log in case the topology file fails to parse when
SIGHUP is sent
- Added p2p-master branch types to TopologyP2P (e.g. UseLedger)
Cleaned up imports in Peer.hs

Refactored Network.hs

- Cleaned up imports in Network.hs
- Added missing import to Network.hs
- Accomodate ouroboros-network changes
Refactored Run.hs

- Cleaned up imports
- Use mkDiffusionArgumentsP2P in Run.hs
- Added handleSimpleNodeNonP2P to Run.hs
- Cleaned up and fixed missing imports
- Added createDiffusionArgumentsNonP2P
- Added producerAddressesNonP2P
- Use NetworkP2PMode switch in Run.hs
- Add trace logging that tells which mode was picked
- Accomodate ouroboros-network changes

Refactored Tracers.hs

- Add P2P and NonP2P null tracers
- Clean up some imports
- Use NetworkP2PMode switch in Tracers.hs
Add ncTestEnableDevelopmentNetworkProtocols config
- Fixed topology format generation in chairman tests.
- Updated config file and topology file
- Fixed valency in Run.hs
- Added P2P Switch flag to chairman config files
- Added mkTopology function to switch accordingly as well
- Disable P2P Mode for Byron and Shelley tests
- General chairman-tests refactoring to support P2P Switch

Refactored mkTopology function

- Fix valency in ByronShelley

Updated some of the scripts and config files
- ToJSON Instances:
  - PeerStatus
  - PeerSelectionTargets
  - ProtocolLimitFailure
  - RefuseReason
  - HandshakeProtocolError
  - MiniProtocolNum

- ToObject Instances:
  - InboundGovernorTrace
  - ServerTrace
  - TracePeerSelection
  - LocalRootPeers
  - PeerSelectionActionsTrace
  - TracePublicRootPeers
  - TraceLocalRootPeers
  - ConnectionHandlerTrace
Simplified the integration of p2p / non-p2p code, based on changed in
ouroboros-network repository.
Use `LocalAddress` and `LocalSocket`, which are then passed to
ouroboros-network's data diffusion.  This allows to remove a single
`#ifdef` in `Cardano.Node.Run`.
@coot coot added the networking Issues and PRs related to networking label Sep 17, 2021
@karknu karknu force-pushed the p2p-master branch 2 times, most recently from f3dfc1d to 7af2978 Compare November 2, 2021 15:01
@newhoggy
Copy link
Contributor

What's the status of this PR?

@coot coot force-pushed the p2p-master branch 22 times, most recently from 757e891 to 2fd6b26 Compare November 16, 2021 18:51
@iohk-bors iohk-bors bot deleted the branch p2p-master November 16, 2021 20:50
@iohk-bors iohk-bors bot closed this Nov 16, 2021
@coot coot deleted the coot/p2p-update-17-09-2021 branch March 16, 2023 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
networking Issues and PRs related to networking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants