Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

findNodes: remove self enr exclusion #451

Closed
wants to merge 1 commit into from

Conversation

ScottyPoi
Copy link
Collaborator

ultralight fails this portal-hive findNodes test:

node a is at distance d to node b
node a sends findNodes to node b for distance d
expected response: NODES: [ node_b.enr ]

ultralight's handleFindNodes method was implemented to exclude a node's own enr from a NODES response.

this, like other design choices, was made with the assumption that nodes would always choose to ping/pong an unknown node before sending another kind of request. other portal clients were not built with the same assumptions, which became apparent through various portal-hive test results.

this fixes the failing portal-hive interop test

@acolytec3
Copy link
Collaborator

The design choice here to exclude our own ENR is because the wire spec says to only send your own ENR if the distance 0 is included in the list of distances.

Request message to get ENR records from the recipient's routing table at the given logarithmic distances. The distance of 0 indicates a request for the recipient's own ENR record.

I would say hee that the test is incorrect and that other client implementations are against spec. Besides that, it doesn't make sense to me to send our own ENR by default if we're in the requested distance. The other node will already have our ENR as part of the discv5 session establishing process so this is just extra bytes over the wire.

Is there some discussion somewhere on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants