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

fix: validate received ENR response in discv4 #8407

Merged
merged 1 commit into from
May 27, 2024

Conversation

mattsse
Copy link
Collaborator

@mattsse mattsse commented May 27, 2024

acccording to the discv4 spec https://github.com/ethereum/devp2p/blob/master/discv4.md#enrresponse-packet-0x06

The recipient of the packet should verify that the node record is signed by the public key which signed the response
packet

this performs the check and ignores the enr if it does not match

@mattsse mattsse requested review from emhane and Rjected as code owners May 27, 2024 11:08
@mattsse mattsse added the A-discv4 Related to discv4 discovery label May 27, 2024
@mattsse mattsse requested a review from fgimenez May 27, 2024 11:12
Copy link
Member

@fgimenez fgimenez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@mattsse mattsse enabled auto-merge May 27, 2024 11:15
@mattsse mattsse added this pull request to the merge queue May 27, 2024
Merged via the queue into main with commit f3013e4 May 27, 2024
31 checks passed
@mattsse mattsse deleted the matt/validate-enr-id-on-enr-response branch May 27, 2024 11:35
mw2000 pushed a commit to mw2000/reth that referenced this pull request Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-discv4 Related to discv4 discovery
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants