Skip to content

Conversation

@coot
Copy link
Collaborator

@coot coot commented Oct 7, 2025

Description

Requires: #5200 to be merged first.

  • sim-net: improve debug output
  • sim-net: removed duplicate traces
  • sim-net: show timed events using WithTime
  • signalProperty: more concise time logging
  • sim-net: default tracer configuration
  • tests-lib: moved dynamicTracer to tests-lib

Checklist

Quality

  • Commit sequence makes sense and have useful messages, see ref.
  • New tests are added and existing tests are updated.
  • Self-reviewed the PR.

Maintenance

  • Linked an issue or added the PR to the current sprint of ouroboros-network project.
  • Added labels.
  • Updated changelog files.
  • The documentation has been properly updated, see ref.

@coot coot requested review from a team as code owners October 7, 2025 13:03
@github-project-automation github-project-automation bot moved this to In Progress in Ouroboros Network Oct 7, 2025
@coot coot force-pushed the coot/net-sim-tracer branch from ed39f5b to fe63b8e Compare October 7, 2025 13:16
@coot coot changed the base branch from main to coot/packages October 7, 2025 13:17
@coot coot self-assigned this Oct 7, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Improves net-sim tracing and test output, centralizes a dynamic IOSim tracer in tests-lib, and streamlines time rendering in counterexamples.

  • Add TVar labelling/tracing for peer selection public state; derive Show to support tracing
  • Make diffusionSimulation IOSim-specific, provide internal diffusionSimulationM, and update tests to include timestamps via selectTraceEventsSayWithTime
  • Move dynamicTracer to tests-lib and remove duplicate tracers

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
ouroboros-network/tests/lib/Test/Ouroboros/Network/Diffusion/Node/Kernel.hs Add MonadTraceSTM/MonadLabelledSTM constraints and label/trace the public peer selection TVar
ouroboros-network/tests/lib/Test/Ouroboros/Network/BlockFetch.hs Remove dynamicTracer and unused imports; simplify tracer import
ouroboros-network/tests-lib/lib/Test/Ouroboros/Network/Utils.hs Export and define dynamicTracer; add note on WithTime usage
ouroboros-network/tests-lib/lib/Test/Ouroboros/Network/Data/Signal.hs Render times more concisely in signalProperty counterexamples
ouroboros-network/lib/Ouroboros/Network/PeerSelection/Governor/Types.hs Derive Show for PublicPeerSelectionState to enable tracing
ouroboros-network/changelog.d/20251007_150356_coot_net_sim_tracer.md Changelog: Show instance, cleaner counterexamples, new dynamicTracer
cardano-diffusion/tests/lib/Test/Cardano/Network/Diffusion/Testnet/Simulation.hs Make diffusionSimulation IOSim-only; add diffusionSimulationM; adjust tracers; remove iosimTracer
cardano-diffusion/tests/lib/Test/Cardano/Network/Diffusion/Testnet.hs Update tests to new diffusionSimulation; print timestamps via selectTraceEventsSayWithTime; remove iosimTracer
cardano-diffusion/changelog.d/20251007_150408_coot_net_sim_tracer.md Changelog: breaking API note for diffusionSimulation; net-sim testing improvements

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@coot coot force-pushed the coot/net-sim-tracer branch from fe63b8e to 7e17390 Compare October 8, 2025 09:08
@coot coot force-pushed the coot/net-sim-tracer branch from 7e17390 to 64ace4a Compare October 14, 2025 16:15
@coot coot force-pushed the coot/packages branch 2 times, most recently from 487ab4a to f7850ac Compare October 15, 2025 10:09
@coot coot force-pushed the coot/net-sim-tracer branch from 64ace4a to 25eb7b7 Compare October 16, 2025 08:08
@coot coot changed the base branch from coot/packages to main October 16, 2025 10:57
@coot coot force-pushed the coot/net-sim-tracer branch from 25eb7b7 to 2ddd872 Compare October 16, 2025 11:31
Copy link
Contributor

@crocodile-dentist crocodile-dentist left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@coot coot enabled auto-merge October 23, 2025 13:36
@coot coot force-pushed the coot/net-sim-tracer branch from d7fee75 to 650c9bb Compare October 23, 2025 13:55
@coot coot added this pull request to the merge queue Oct 23, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Oct 23, 2025
coot added 2 commits October 24, 2025 09:59
* labelled `PublicPeerSelectionStateVar`;
* trace `PublicPeerSelectionStateVar` values through `traceTVar`.
* avoid duplicate traces;
* avoid duplicate time stamps in the `Say` output in `IOSim` trace;
@coot coot force-pushed the coot/net-sim-tracer branch from 650c9bb to 9c3a273 Compare October 24, 2025 08:03
@coot coot force-pushed the coot/net-sim-tracer branch from 9c3a273 to 6272a47 Compare October 24, 2025 08:07
@coot coot enabled auto-merge October 24, 2025 08:24
@coot coot force-pushed the coot/net-sim-tracer branch from 6272a47 to 9770f3a Compare October 24, 2025 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants