ethereum / ethereum/ddht

ClientAPI.find_nodes behavior when messages get lost

Open
#127 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
19
Forks
15
PR merge metrics
No merged PRs in 30d

Description

## What was wrong?

inspired by: https://github.com/ethereum/ddht/pull/122/files/a1238887112f663e6c46696e3f0937bb3bd3df7a#r509003163

The current logic for a FINDNODES message is that the response may be spread across multiple messages. If any of these messages fail to be delivered our implementation will drop all of the responses and treat it as a timeout.

## How can it be fixed?

An alternate approach would be to return whatever messages we receive, even if all messages are not received since they will contain a subset of the the requested ENR records.

Care should be taken to ensure that there aren't undefined behaviors or security concerns in this approach.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at ClientAPI.find_nodes and trace how FINDNODES responses are collected and handled when one or more messages are lost. Read the referenced ethereum/ddht pull request for context, then verify the desired behavior and security implications; done means safely returning received ENR records without treating partial delivery as a timeout.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.