-
Notifications
You must be signed in to change notification settings - Fork 711
In-house discv5 #11728
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
Merged
Merged
In-house discv5 #11728
Changes from all commits
Commits
Show all changes
214 commits
Select commit
Hold shift + click to select a range
954f8f5
Kademlia codes
asdacap ebbae61
Commit before I do something bad
asdacap 0fbaa51
Better default
asdacap c6fcc4f
It does work, just really slow
asdacap d865921
It does work. Just need some metric.
asdacap b0aac86
More discovery message
asdacap 74c25cd
Allow disabling static labels
asdacap 853f1a7
Allow disabling static labels
asdacap e1163c5
Merge branch 'feature/better-discv4-metrics' into feature/kademlia-di…
asdacap 3440fbb
Address comment
asdacap 170cf29
Merge remote-tracking branch 'origin/feature/better-discv4-metrics' i…
asdacap a6cd971
This is confusing AF
asdacap 10295f6
Merge remote-tracking branch 'origin/master' into feature/kademlia-di…
asdacap 18dcfd5
Ok, I see where the problem is
asdacap 56cbe78
Fix the neighbour issue
asdacap b37793e
Cleaner
asdacap 3b1919e
Slight cleanup
asdacap 5cb8568
Poor simplification attempt
asdacap 90b50c6
Remove bucket list
asdacap c824035
Reducing change
asdacap 8440f68
Fix tests
asdacap 4dfdcd2
Fix tests
asdacap 7929753
Slight cleanup
asdacap 26e48ef
Simplification
asdacap 37a3502
Exit logic
asdacap 744d792
Configurable limit
asdacap dc23995
Merge remote-tracking branch 'origin/master' into feature/kademlia-di…
asdacap d040d5d
Some cleanup
asdacap 90b7934
Refinement
asdacap 51524bc
Refinement
asdacap 894a9ef
Respond with two nodes message.
asdacap 169bcca
Fix build
asdacap dee4927
Fix some test
asdacap 497c1c8
Fix unit tests
asdacap d1bba3a
Fix E2E
asdacap ce1541f
Slight cleanup
asdacap 5d77123
Hide some error
asdacap c510776
Improved candidate count metric
asdacap 9b81905
Experiment
asdacap e9a90ec
Remove unnecessary code
asdacap f2325e2
Send optional enr
asdacap b3be4c6
Merge remote-tracking branch 'origin/master' into feature/kademlia-di…
asdacap 1a73860
Fix test build
asdacap 2302278
Additional todo
asdacap 18ac3f2
Remove nodes locator
asdacap b85ce7e
Nodestats
asdacap 4f2d413
Remove discovery manager
asdacap 917c9d4
Remove content extension
asdacap ee8fe72
Reducing change
asdacap e623c44
Lets just save for now
asdacap 2279c7f
Remove routing table
asdacap cea08d8
Move session into one class
asdacap 90a5fe1
Remove NodeFilter
asdacap 291d6dd
Pass cancellation token
asdacap 033c7f7
Fix
asdacap 121d9b0
Fix throttle logic
asdacap 7aa73f1
ISolating
asdacap a7e8f03
Cleanup attempt
asdacap da1312c
Some refinement
asdacap aa133ab
Change the unit test
asdacap f42a7b2
Reduce timeout
asdacap 319e6ad
Unit tests
asdacap 97c4211
NSubstitute
asdacap d7e1a7a
Whitespace
asdacap 9f47dea
Merge remote-tracking branch 'origin/master' into feature/kademlia-di…
asdacap 4ed05f4
Remove some code
asdacap aef2d12
Remove more metric
asdacap e2eb741
Gonna commit this first
asdacap b50807a
Extract node record provider
asdacap 31ab6f7
DiscV5 to DI
asdacap adde8e0
DiscV4 to DI
asdacap 5253f1c
Consolidate the network storage initialization
asdacap 1adb534
Allow more margin
asdacap f0e1b36
Override discovery db in test also
asdacap 0ecd9f5
Merge branch 'master' into refactor/move-discovery-initialization
asdacap ec29d12
Whitespace
asdacap 0925a19
Merge branch 'refactor/move-discovery-initialization' into feature/ka…
asdacap 6a2022f
Fix build
asdacap 64893ae
Merge remote-tracking branch 'origin/master' into feature/kademlia-di…
asdacap 2e76e44
Tests
asdacap b0e8660
Merge remote-tracking branch 'origin/master' into feature/kademlia-di…
asdacap 9c3ae6b
Slight code reduction
asdacap 30c22be
Reducing change
asdacap 14a1ada
Reducing change
asdacap 45962ba
Reducing change
asdacap fa41f0c
Reducing change
asdacap 3d93ace
Nodes to array segment
asdacap f1eeeef
Extract some logic out to DiscoveryPersistenceManager.cs
asdacap 1d25869
Merge branch 'feature/reduce-change-to-discv4' into feature/kademlia-…
asdacap e0431a8
Remove unnecessary comment
asdacap 77540b6
Remove unnecessary class
asdacap d5ba1ff
Fix simulation
asdacap 0fc5e2e
Merge remote-tracking branch 'origin/master' into feature/kademlia-di…
asdacap e7a54c3
Fix build
asdacap 9cd429e
More attempted lookup
asdacap 594a157
Trying to simplify
asdacap 2d7c42c
KBucket does not need
asdacap 0c49205
Slight cleanup
asdacap 9806c30
Fix build
asdacap fc91f9d
Rename and comment
asdacap a709097
Remove original lookup code
asdacap 58313f7
Fix test
asdacap 9ffdeba
Reduce code
asdacap d0e910e
More xor test
asdacap 6d1c6d8
Whitespace
asdacap 67f0193
Merge remote-tracking branch 'origin/master' into feature/kademlia-di…
asdacap 0d9509c
Make the node lookup generic
asdacap 32922dd
Address comment
asdacap f013df6
Remove strange
asdacap 0335ea5
Fix build
asdacap e1e617f
Merge origin/master into feature/kademlia-discv4
flcl42 35fdd3a
Some fixes (#11654)
flcl42 6c4f8aa
Merge branch 'master' into feature/kademlia-discv4
flcl42 221c120
Review
flcl42 3291f46
Simplify
flcl42 375a88c
Fix spelling
flcl42 bf8866e
test(discovery): dedupe discv4/kademlia tests
LukaszRozmej 9a2c6b9
refactor(discovery): address review comments
LukaszRozmej e8e11e9
fix(discovery): address review findings + fill test gaps
LukaszRozmej d9544a1
Merge remote-tracking branch 'origin/master' into pr-8616
LukaszRozmej d745ab5
test(discovery): dedupe new Kademlia and persistence tests
LukaszRozmej 2b78b36
Merge origin/master into feature/kademlia-discv4
flcl42 91a8860
Merge remote-tracking branch 'origin/feature/kademlia-discv4' into fe…
flcl42 c6f7aab
Extract generic Kademlia and harden native discv5
flcl42 043f4e9
Align discv5 discovery lifecycle
flcl42 50e86f9
Set Ethereum discovery versions
flcl42 febda46
Merge master into generic Kademlia discovery
flcl42 0e1ba97
Harden discv5 ENR handling
flcl42 cd48718
Drain Kademlia background operations
flcl42 6b37cdf
Avoid peer penalties on lookup cancellation
flcl42 6c48383
Validate ENR key ordering and size
flcl42 dd1c35c
Require ENR v4 identity
flcl42 6ec92a5
Validate discv5 relayed ENR addresses
flcl42 d510357
Harden discv5 node ingestion
flcl42 b3c20ac
Harden discv5 ENR relay validation
flcl42 1abb491
Recover stale discv5 sessions
flcl42 c105bd0
Gate discv5 shared node ingestion
flcl42 7540b95
Merge remote-tracking branch 'origin/master' into generic-kad-2
flcl42 8bf6a82
Bound discv4 discovery node dedupe
flcl42 5b7cef2
Require discv4 bond before node health updates
flcl42 5a0761f
Harden discovery receive paths
flcl42 ec864a4
Reduce discv5 allocation pressure
flcl42 d0ada32
Add distance service
flcl42 a60aac2
Reduce discv5 message allocations
flcl42 4abfa13
Merge remote-tracking branch 'origin/master' into generic-kad-2
flcl42 5fde794
Fix PR validation failures
flcl42 cbd1fab
Merge origin/master into generic-kad-2
flcl42 8ad3ff7
Refactor more
flcl42 c644dd4
Rename
flcl42 20c6b26
Merge remote-tracking branch 'origin/master' into generic-kad-2
flcl42 148c82a
Refactor more
flcl42 c257aed
More moves and cleanup
flcl42 7a4cb6c
Add discv5 trace logging
flcl42 d3252bd
Fix PR CI failures
flcl42 51374a1
Fix and cut
flcl42 73ce7f0
Merge branch 'master' into generic-kad-2
flcl42 7c37920
Use native compressed ECDH
flcl42 6781fe9
Stabilize discovery E2E test
flcl42 88096d4
Fix review
flcl42 7b23431
Harden discv5 packet dispatch
flcl42 25a00d6
Restore Kademlia distance SIMD
flcl42 8bfcf7f
Remove unused Kademlia factory
flcl42 4826b76
Reduce discovery duplication
flcl42 464af4b
Harden Kademlia cleanup
flcl42 274df2d
Tidy Kademlia tests
flcl42 ecac6ad
Add async node health disposal
flcl42 6283f39
More unification
flcl42 55f9aba
Tidy discovery follow-ups
flcl42 22dc769
Harden discovery lookup nodes
flcl42 34a5c46
Review
flcl42 fb775f4
More fixes
flcl42 15cc266
Clean NodeTests imports
flcl42 d00b47f
Refactor discovery types
flcl42 8d91fb8
Better naming for double lru
flcl42 bab7ede
Merge branch 'master' into generic-kad-2
flcl42 84a7bee
Review
flcl42 d71022e
Merge branch 'generic-kad-2' of github.com:NethermindEth/nethermind i…
flcl42 815862f
Fix enodes in discv5 and build
flcl42 caab1ae
Use pooled set in Kademlia
flcl42 1a8e526
Consolidate ENR builders in discovery tests
LukaszRozmej 7813457
Remove duplicate ToHash test helpers
LukaszRozmej 1abe8a9
More pooled
flcl42 a3f87c3
Merge branch 'generic-kad-2' of github.com:NethermindEth/nethermind i…
flcl42 7aeafbd
More locals init skipped
flcl42 43cc5d2
Remove unused discovery usings
flcl42 9af85fc
More fixes
flcl42 98b9fdd
Merge remote-tracking branch 'origin/master' into generic-kad-2
flcl42 a49775a
Null not expected
flcl42 34a6cf6
Fix tests
flcl42 5a3c9b4
Fix dos vector
flcl42 0ea629e
Fix discovery serialization review
flcl42 7a93ef6
Reduce discovery token allocations
flcl42 cfdf4f2
Prevent a malformed discv5 packet from killing a worker loop
flcl42 b3f5e09
Test cases
flcl42 dc9dedb
Better rlp encoder init
flcl42 f1aa511
Reduce discovery retention
flcl42 7f8adc4
Merge remote-tracking branch 'origin/master' into generic-kad-2
flcl42 da8eb5f
feat: host-side prerequisites for the embedded beacon chain plugin (S…
asdacap 0640843
Harden discv4 unsolicited responses
flcl42 150e959
Merge master into generic-kad-2
flcl42 c7cbf75
More magic words
flcl42 f4b4eba
Some fixes
flcl42 b6a1c6c
Simplify Kademlia test keys
flcl42 ca09665
Refine discovery review fixes
flcl42 dc72968
Refine LRU eviction
flcl42 44d7ff6
Deduplicate ENR signer tests
flcl42 cd50eaf
Move more discovery into kad
flcl42 dddbe6b
Fix stab config
flcl42 1927bc1
Merge remote-tracking branch 'origin/master' into generic-kad-2
flcl42 eddc286
Fix discv4 node source self emission
flcl42 6eb3c62
Remove unused merge usings
flcl42 2db358b
Address discv5 review feedback
flcl42 ae1fb22
Refine discovery review fixes
flcl42 6dcc35b
Merge remote-tracking branch 'origin/master' into generic-kad-2
flcl42 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/Nethermind/Nethermind.Core/Caching/DisposingLruCache.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| // SPDX-FileCopyrightText: 2026 Demerzel Solutions Limited | ||
| // SPDX-License-Identifier: LGPL-3.0-only | ||
|
|
||
| using System; | ||
|
|
||
| namespace Nethermind.Core.Caching; | ||
|
|
||
| public sealed class DisposingLruCache<TKey, TValue> : LruCache<TKey, TValue> | ||
| where TKey : notnull | ||
| where TValue : IDisposable | ||
| { | ||
| public DisposingLruCache(int maxCapacity, int startCapacity, string name) | ||
| : base(maxCapacity, startCapacity, name) | ||
| { | ||
| } | ||
|
|
||
| public DisposingLruCache(int maxCapacity, string name) | ||
| : base(maxCapacity, name) | ||
| { | ||
| } | ||
|
|
||
| protected override void Evict(TValue value) => value.Dispose(); | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.