ethereum / ethereum/ddht

Better management of the routing table

Open
#223 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?

We need better management of the routing table. Here are some things that are less than ideal.

- Situations like losing network connection for a minute can end up dropping all routing table entries. Currently there is no logic that will recover from this.
- Testing some of the `NetworkAPI` stuff is harder than it needs to be since the logic is bundled. Unbundling should simplify some tests.
- Routing table management logic is basically the same in both alexandria and core network, but code is duplicated.

## How can it be fixed?

Probably a new `RoutingTableManager` service.

- handle liveliness checks for routing table entries (send ping messages to entries that haven't been pinged recently)
- detect when the routing table is empty. fallback to bootnodes. fallback to ENR database (needs `eth-enr` upgrade)
- perform network exploration logic.
- external facing API to signal routing table "readyness". `await rtm.routing_table_ready()`
- sharable between both core network and alexandria.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the NetworkAPI logic and the routing-table implementations in core network and alexandria. Review how bootnodes, the ENR database, liveliness checks, and network exploration currently work, including the needed eth-enr upgrade. Done means a shared RoutingTableManager supports these behaviors and exposes routing_table_ready().

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.