Skip to content

Core::replicate() errors when no peers are in the mesh — no no-op success path #52

Description

@sacha-l

Context: Single-node CLI usage — user creates a note on a fresh machine before a peer has connected.

Problem: replicate() returns Err(GossipsubBroadcastMessageError) because it broadcasts over gossip internally. There is no "no-op success" path. Apps that replicate on every local write must treat this as non-fatal.

Suggestion: Either succeed silently when there are no peers (data is buffered locally anyway) or expose a dedicated NoPeers error variant distinct from broadcast failures.

Workaround: match node.replicate(...).await { Ok(()) => {}, Err(_) => println!("no peers; will sync later"), }.

Severity: important


Originally logged while building apps/sovereign-notes in forge-p2p. See library-feedback.md for the full index of findings.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions