Skip to content

fix: use go-libp2p fork with mocknet deadline noop#370

Merged
walldiss merged 1 commit intocelestiaorg:mainfrom
walldiss:fix/mocknet-deadline
Mar 4, 2026
Merged

fix: use go-libp2p fork with mocknet deadline noop#370
walldiss merged 1 commit intocelestiaorg:mainfrom
walldiss:fix/mocknet-deadline

Conversation

@walldiss
Copy link
Member

Summary

  • Replace github.com/libp2p/go-libp2p with github.com/celestiaorg/go-libp2p fork based on v0.46.0
  • The fork makes SetDeadline, SetReadDeadline, and SetWriteDeadline return nil on mocknet streams instead of an error

Context

go-libp2p-pubsub added SetWriteDeadline calls in libp2p/go-libp2p-pubsub@6587e8e (part of libp2p/go-libp2p-pubsub#631). Mocknet streams use io.Pipe which doesn't support deadlines, so SetWriteDeadline returns an error. The pubsub code treats this as fatal — resets the stream and never sends the hello packet. This prevents gossipsub peers from discovering each other's subscriptions in any mocknet-based test.

Upstream PR: https://github.com/libp2p/go-libp2p/pull/new/fix/mocknet-deadline-noop

@walldiss walldiss self-assigned this Feb 27, 2026
@walldiss walldiss enabled auto-merge (squash) February 27, 2026 13:34
@walldiss walldiss disabled auto-merge March 2, 2026 15:43
@walldiss walldiss enabled auto-merge (squash) March 2, 2026 15:43
Copy link
Member

@renaynay renaynay left a comment

Choose a reason for hiding this comment

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

fine w me but will u have merge conflict

@walldiss walldiss force-pushed the fix/mocknet-deadline branch from 0454d51 to 59fa158 Compare March 4, 2026 15:35
@walldiss walldiss merged commit ae31c6e into celestiaorg:main Mar 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants