Skip to content

consensus: more carefully hide HeaderWithTime from traces #1498

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

Merged
merged 1 commit into from
May 8, 2025

Conversation

geo2a
Copy link
Contributor

@geo2a geo2a commented May 7, 2025

This is a follow-up to #1288 that ensures

  • do not expose HeaderWithTime in TraceGDDEvent via GDDDebugInfo
  • do not store the chain fragment with HeaderWithTime in DensityBounds

adding the "no changelog'' label, as the relevant changelog fragments are already included into "main"

Draft PR to for integration with the node: IntersectMBO/cardano-node#6211

@geo2a geo2a marked this pull request as ready for review May 7, 2025 12:04
Copy link
Member

@amesgen amesgen left a comment

Choose a reason for hiding this comment

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

LGTM (after squashing)

@@ -354,7 +354,7 @@ densityDisconnect (GenesisWindow sgen) (SecurityParam k) states candidateSuffixe
where
densityBounds = do
(peer, candidateSuffix) <- candidateSuffixes
let (clippedFragment, _) =
let (clippedFragmentWithTime, _) =
Copy link
Member

Choose a reason for hiding this comment

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

(No action required in this PR.)

This WithTime suffix feels like a distraction, the GDD doesn't care about time at all. I think the "proper" thing to do here would be to make the code more abstract, ie consuming AnchoredFragment hdr0/AnchoredFragment hdr1, and doing the transformation in the tracer (via its Contravariant instance) instead.

This is a follow-up to eb8f344 merged in PR ouroboros-consensus#1288

- do not expose `HeaderWithTime` in `TraceGDDEvent` via `GDDDebugInfo`
- do not store the chain fragment with `HeaderWithTime` in `DensityBounds`
@geo2a geo2a force-pushed the geo2a/header-with-time-followup branch from 1797e4f to 5e519ff Compare May 8, 2025 06:20
@geo2a geo2a enabled auto-merge May 8, 2025 06:22
@geo2a geo2a added this pull request to the merge queue May 8, 2025
Merged via the queue into main with commit 292d711 May 8, 2025
32 of 39 checks passed
@geo2a geo2a deleted the geo2a/header-with-time-followup branch May 8, 2025 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants