Skip to content

Conversation

@ScottyPoi
Copy link
Contributor

@ScottyPoi ScottyPoi commented Apr 10, 2025

Fix for failing hive test PingHandshakeInterrupted

Test PingHandshakeInterrupted starts a handshake, but doesn't finish it and sends a second ordinary message
packet instead of a handshake message packet. The remote node should respond with
another WHOAREYOU challenge for the second packet.


@chainsafe/discv5 fails to do this. The sendChallenge method is called, but first checks to see if we already sent a challenge, and if so, simply returns without sending a new challenge.

This PR removes the condition from sessionService.sendChallenge which prevents a new challenge from being sent. The new challenge simply replaces the old one in this.activeChallenges.

This allows the hive test linked above to pass. Actually, it allows the test to fail for a different reason, detailed in #309 . When combined with a solution to the id encoding issue here: #312, the PingHandshakeInterrupted test passes.

@ScottyPoi ScottyPoi requested a review from a team as a code owner April 10, 2025 00:10
@ScottyPoi ScottyPoi changed the title Send challenge even with active challenge Fix: SessionService should send challenge even with active challenge Apr 10, 2025
@ScottyPoi ScottyPoi changed the title Fix: SessionService should send challenge even with active challenge fix: SessionService should send challenge even with active challenge Apr 10, 2025
@wemeetagain wemeetagain merged commit 62c1054 into ChainSafe:master Apr 15, 2025
6 of 13 checks passed
@github-actions github-actions bot mentioned this pull request Apr 15, 2025
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.

2 participants