Skip to content

Conversation

tzdybal
Copy link
Member

@tzdybal tzdybal commented Aug 2, 2025

As discussed in #1882., #2221 (and during calls), PEX operation should be unified.

This PR proposes following changes:

  • ignore seed mode flag -> all nodes should act the same
  • all nodes should disconnect from PEX right after address book exchange - thank to reactor-specific peers, this will create open "slots" for PEX connections allowing new peers to build address book quickly

Missing features in this draft:

Resolves #1882.

Adjust tests to show that PEX is working correctly.
Even the seed01 is normal node, not seed node.
Added mock reactor with single channel, to use reactor-specific-peers and maintain connection.
Increased timeout, to make test more stable - usually it finishes within 260ms, but sometimes it needs to wait and request for peers again, after 30s.
This helps with some flaky tests, and probably can eliminate some edge cases in real world.
This is a temporary solution, just to show that peer is stopped before the messages are delivered - this change is caused by more indirect message processing introduced with parallel message processing.
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.

Modify the Pex Reactor to act as a seed node
1 participant