fix: PeerExchange rpc decode in order not to take response's status_code mandatory - for support old protocol implementation#3059
Merged
NagyZoltanPeter merged 1 commit intorelease/v0.33from Sep 25, 2024
Conversation
…de mandatory - for support old protocol implementation
|
You can find the image built from this PR at Built from 37b7e05 |
Ivansete-status
approved these changes
Sep 25, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
lite-protocol-tester implementation started using PX from the receiver side and found that node that implements old style PeerExchange protocol does not containing status_code and status_desc can cause decode failure.
To handle this false assumption of making status_code for response mandatory, if not included the value is derived from the response enr list length.
+1
I found that PeerExchange tries to aggressively fill the ENR cache at startup. It takes a minimum 60 Peers to fill in the cache. But if there is not many this loop will run - async - till end of program at every 5.secs, instead of running at every 10 minutes as designed.
So to break the loop I added a max 10 times trial of aggressive filling.
Changes