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.
What was wrong?
It's possible for wrong Enr to be passed to utp library if it was changed recently.
See #1596 for more details.
How was it fixed?
The utp-rs library is updated (see ethereum/utp#136) so only peer id (NodeId) is required when receiving the utp packet, while entire peer (Enr) is passed when calling
accept_with_cid
.The biggest change is in
crates/portalnet/src/discovery.rs
, where we now callfind_enr
only if Enr is unknown when we have to send them packet (which should rarely happen), instead of every time we receive packet.Worth highlighting that due to the nature of #1596, we can't easily verify that this actually fixes it until it's deployed to the servers. I did some manual testing and I'm confident that this should fix it (but I plan to verify once this is merged and deployed).
To-Do