-
Notifications
You must be signed in to change notification settings - Fork 153
feat(l1): enr fork id filtering #5500
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
Conversation
Lines of code reportTotal lines added: Detailed view |
f3c00b6 to
d1bfd70
Compare
ElFantasma
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I think there is room for further code refactoring, but there are some pending PRs that may conflict with this one. Let's merge all and take another look at this code afterwards.
On those lines, I would suggest:
Ideally, I think there would be a clear flow like this: |
MegaRedHand
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I think snap-sync is faster now 🚀 🚀 🚀
| let local_fork_id = ForkId::new( | ||
| chain_config, | ||
| genesis_header.clone(), | ||
| latest_block_header.timestamp, | ||
| latest_block_number, | ||
| ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably cache this: #3660 (in another PR)
Yeah, I definitely like this approach. Probably several lists with different categories and different update intervals: non-validated-contacts, ping-requested-contacts, enr-requested-contacts, once-connected-contacts, etc... But I think this should be done after #4245, or #4491 |
Motivation
Now that we are #5446 from peers, we can filter valid contacts to initiate RLPx connections on lookup.
Closes #5506