-
Notifications
You must be signed in to change notification settings - Fork 162
feat(l1): request updated ENR when PONG enr_seq differs from cached #5910
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
**Motivation** <!-- Why does this pull request exist? What are its goals? --> **Description** <!-- A clear and concise general description of the changes this PR introduces --> <!-- Link to issues: Resolves #111, Resolves #222 --> **Checklist** - [ ] Updated `STORE_SCHEMA_VERSION` (crates/storage/lib.rs) if the PR includes breaking changes to the `Store` requiring a re-sync. Closes #5574 and #5575. Co-authored-by: Esteban Dimitroff Hodi <[email protected]>
**Checklist** - [ ] Updated `STORE_SCHEMA_VERSION` (crates/storage/lib.rs) if the PR includes breaking changes to the `Store` requiring a re-sync. Closes #issue_number
**Motivation** I saw current new_nonce impl allocated a vector when it can just return a fixed size array. **Description** Removes the needless vec **Checklist** - [ ] Updated `STORE_SCHEMA_VERSION` (crates/storage/lib.rs) if the PR includes breaking changes to the `Store` requiring a re-sync.
**Motivation** In order to start merging discv5 code into main, to avoid having a huge PR at the end of the development, we should create a feature flag disabled by default. Closes #5639
**Motivation** <!-- Why does this pull request exist? What are its goals? --> **Description** <!-- A clear and concise general description of the changes this PR introduces --> <!-- Link to issues: Resolves #111, Resolves #222 --> **Checklist** - [ ] Updated `STORE_SCHEMA_VERSION` (crates/storage/lib.rs) if the PR includes breaking changes to the `Store` requiring a re-sync.
**Motivation** <!-- Why does this pull request exist? What are its goals? --> **Description** <!-- A clear and concise general description of the changes this PR introduces --> <!-- Link to issues: Resolves #111, Resolves #222 --> **Checklist** - [ ] Updated `STORE_SCHEMA_VERSION` (crates/storage/lib.rs) if the PR includes breaking changes to the `Store` requiring a re-sync. Closes #5570 Closes #5571
Kimi AI Code ReviewThis PR aims to improve the handling of ENR updates in the DiscoveryServer by requesting updated ENRs when a PONG message has a different Code Correctness and Potential Bugs
Security Vulnerabilities
Performance Implications
Rust Best Practices and Idiomatic Patterns
Memory Safety and Proper Error Handling
Code Readability and Maintainability
Ethereum-specific Considerations
Overall, this PR looks good. It introduces a necessary improvement to handle ENR updates correctly and includes a comprehensive test case to verify the new functionality. The code follows Rust best practices and is well-structured for readability and maintainability. I approve this PR with no changes requested. Automated review by Kimi (Moonshot AI) |
Motivation
Per the discv5 spec, when receiving a PONG with an ENR sequence number different from our
cached version, we should request the updated ENR using FINDNODE with distance 0. This
ensures we have up-to-date ENRs for peers (IP changes, capability updates, etc.).
Description
handle_pongwhen PONG'senr_seqdiffers from cachedvalue
test_enr_update_request_on_pongverifying:Closes #5850