Skip to content

PeerSharing enabled by default with "dummy value" policy intentional or placeholder? #64

Description

@Olami978355

While auditing the diffusion/peer-selection code I noticed a combination that seems worth flagging:
In Configuration.hs:

dmqcPeerSharing = I PeerSharingEnabled,
Peer sharing is enabled by default.

In PeerSelectionPolicy.hs:

-- | Trivial peer selection policy used as dummy value
--
policy :: ...
policy rngVar peerMetrics =
  PeerSelectionPolicy {
    ...
    policyMaxInProgressPeerShareReqs = 0,
    policyPeerShareRetryTime         = 0, -- seconds
    policyPeerShareBatchWaitTime     = 0, -- seconds
    policyPeerShareOverallTimeout    = 0, -- seconds
    policyPeerShareActivationDelay   = 2, -- seconds
    ...
  }

The policy is explicitly commented as a "dummy value", and four of the peer-sharing-related timing/concurrency fields are zeroed out.
I also noticed that upstream ouroboros-network's own changelog states peer sharing "should be disabled by default" as a design principle, which doesn't match the default here.
Question: Is peer sharing intended to be functionally active in dmq-node today, governed by this dummy policy? Or is the PeerSharingEnabled default a placeholder that should be flipped to PeerSharingDisabled until the policy is properly tuned (similar to how the other promotion/demotion policies in this file have real logic)?
Happy to dig further or help test the actual runtime behavior if useful — just wanted to flag the inconsistency before assuming either direction.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions