Skip to content
Merged
Changes from all commits
Commits
Show all changes
190 commits
Select commit Hold shift + click to select a range
eb5427e
initial discv5
ElFantasma Dec 9, 2025
dd0990b
Merge branch 'main' into discv5
ElFantasma Dec 9, 2025
a61953f
discv5 stub modules
ElFantasma Dec 10, 2025
637aaac
Merge branch 'main' into discv5
ElFantasma Dec 10, 2025
e1a8a83
Ordinary packet
ElFantasma Dec 11, 2025
fec454e
Added WhoAreYou packet
ElFantasma Dec 11, 2025
2e65c2e
Merge branch 'main' into discv5
ElFantasma Dec 11, 2025
6ecfb65
WhoAreYou decode test pass
ElFantasma Dec 11, 2025
0de7e39
WhoAreYou encode test pass
ElFantasma Dec 11, 2025
a56f4da
protocol version check
ElFantasma Dec 11, 2025
7a8541b
Added Discv5Codec
ElFantasma Dec 12, 2025
334044e
feat(l1): implement `discv5`'s `Pong` message (#5616)
azteca1998 Dec 12, 2025
ac66212
Merge branch 'main' into discv5
ElFantasma Dec 12, 2025
31b82d2
Added decryption and corrected Ping decoding
ElFantasma Dec 12, 2025
db0a79c
Corrected Ping encoding
ElFantasma Dec 12, 2025
3020428
feat(l1): implement discv5 TalkReq message coding (#5631)
edg-l Dec 15, 2025
552160a
feat(l1): implement discv5 nodes message coding (#5630)
edg-l Dec 15, 2025
d2da66c
feat(l1): implement discv5's FindNode message (#5629)
edg-l Dec 15, 2025
4af6e40
chore(l1): fix discv5 branch lints (#5633)
edg-l Dec 15, 2025
e247d48
chore(l1): improve discv5 new_nonce (#5652)
edg-l Dec 16, 2025
13b1e16
chore(l1): put all discv5 behind a feature flag (#5651)
edg-l Dec 16, 2025
48282da
feat(l1): implement discv5 TICKET message codec (#5650)
edg-l Dec 16, 2025
2907a37
feat(l1): implement `discv5` `TalkRes` message codec (#5632)
azteca1998 Dec 16, 2025
c547ab5
Merge branch 'main' into discv5
ElFantasma Dec 16, 2025
52fa23e
Merge branch 'main' into discv5
ElFantasma Dec 16, 2025
4aae22c
feat(l1): implement discv5 handshake encoding/decoding (#5653)
edg-l Dec 16, 2025
92ea30a
Merge branch 'main' into discv5
edg-l Dec 17, 2025
f2e8501
feat(l1): discv5, add ordinary packet coding (#5665)
edg-l Dec 17, 2025
0eda82b
Merge branch 'main' into discv5
ElFantasma Dec 17, 2025
8cab21f
Merge branch 'main' into discv5
edg-l Dec 18, 2025
bb8e46a
feat(l1): add discv5 session structures and remaining official vector…
edg-l Dec 18, 2025
1a3fca7
Initial server code - WIP
ElFantasma Dec 18, 2025
60c7e3f
Merge branch 'discv5' into discv5-server
ElFantasma Dec 18, 2025
16da2ac
rename feature
edg-l Dec 18, 2025
de865e2
rename
edg-l Dec 18, 2025
aba0c28
Corrected FindNode and sending it inside a Package - WIP
ElFantasma Dec 18, 2025
e314828
Random FindNode message - WIP
ElFantasma Dec 18, 2025
45d01e2
Merge branch 'main' into discv5
ElFantasma Dec 18, 2025
c0c293e
Improving protocol - WIP
ElFantasma Dec 18, 2025
a43b915
address comments
edg-l Dec 19, 2025
afdaeba
Merge branch 'main' into discv5
edg-l Dec 19, 2025
d7ada2b
Updated some types
ElFantasma Dec 19, 2025
9e562dd
Merge branch 'main' into discv5
ElFantasma Dec 19, 2025
683191a
Merge branch 'discv5' into discv5-server
ElFantasma Dec 19, 2025
3e93c71
Updated feature name
ElFantasma Dec 19, 2025
2aca677
Addressed PR comments and corrected req_id type
ElFantasma Dec 19, 2025
6b819a1
Corrected static_header type
ElFantasma Dec 19, 2025
41d100e
Removed unnecessary stuff
ElFantasma Dec 19, 2025
c1d3031
Merge branch 'main' into discv5
ElFantasma Dec 19, 2025
ffd7c61
Merge branch 'discv5' into discv5-server
ElFantasma Dec 19, 2025
ec85eb5
Several refactors to support partially decoded Packets - WIP
ElFantasma Dec 22, 2025
79354b6
Merge branch 'main' into discv5-server
ElFantasma Dec 22, 2025
06652ed
Merge branch 'main' into discv5-server
ElFantasma Dec 22, 2025
3a07910
Saving messages by nonce
ElFantasma Dec 22, 2025
438fb8d
Building handshake message from WhoAreYou
ElFantasma Dec 23, 2025
a0a92ea
Merge branch 'main' into discv5-server
ElFantasma Dec 23, 2025
377fc00
Fixing tests improving code
ElFantasma Dec 24, 2025
1115a8a
Merge branch 'main' into discv5-server
ElFantasma Dec 24, 2025
e237fa7
Improved tests
ElFantasma Dec 24, 2025
3040f2e
More tests and a fix in FindNode
ElFantasma Dec 26, 2025
82ac8dc
Merge branch 'main' into discv5-server
ElFantasma Dec 26, 2025
1dbf0c6
Removed DecodedPacket dependencies in server
ElFantasma Dec 26, 2025
9072f7c
Fixed some error in NodeRecord decoding
ElFantasma Dec 29, 2025
fc7f1d4
Removed DecodedPacket to use Packet only - WIP
ElFantasma Jan 5, 2026
206e613
Added PacketTypeWrapper for better Packet handling
ElFantasma Jan 6, 2026
f532169
Merge branch 'main' into discv5-server
ElFantasma Jan 6, 2026
1645035
Better FindNode randomization and handling Nodes message
ElFantasma Jan 6, 2026
dff4a4a
Nodes messages handling and some bug fixes
ElFantasma Jan 7, 2026
c453579
Nodes messages handling and some bug fixes
ElFantasma Jan 7, 2026
6637230
Merge branch 'main' into discv5-server
ElFantasma Jan 7, 2026
f19fa11
Put peer_table and discovery_server behind discv5 feature flag
ElFantasma Jan 7, 2026
94a0fbc
Reordered p2p.rs
ElFantasma Jan 7, 2026
6e1ff33
Merge branch 'main' into discv5-server
ElFantasma Jan 7, 2026
76ec6b9
Added links to github issues on comments
ElFantasma Jan 8, 2026
c260ea9
Verifiying ENR fork-ids
ElFantasma Jan 9, 2026
840e16f
ENR is sent optionally on Handshake messages
ElFantasma Jan 9, 2026
ba152dd
Merge branch 'main' into discv5-server
ElFantasma Jan 9, 2026
8aa81ea
Merge branch 'discv5-server' into discv5-server-enr-validation
ElFantasma Jan 9, 2026
43cc825
Merge branch 'discv5-server-enr-validation' into discv5-server-option…
ElFantasma Jan 9, 2026
8930dc9
Added store to discv4 PeerTable
ElFantasma Jan 9, 2026
3924c01
Merge branch 'discv5-server-enr-validation' into discv5-server-option…
ElFantasma Jan 9, 2026
5a10661
Improved discv4 initiate candidates
ElFantasma Jan 11, 2026
e5ca440
Improved discv4 initiate candidates
ElFantasma Jan 11, 2026
a7b639b
Merge branch 'discv5-server-enr-validation' into discv5-server-option…
ElFantasma Jan 11, 2026
c277322
Fixed clippy issue
ElFantasma Jan 12, 2026
ea4aafb
Merge branch 'discv5-server-enr-validation' into discv5-server-option…
ElFantasma Jan 12, 2026
79bb838
Fixed l2 initialization
ElFantasma Jan 12, 2026
b91d7d0
Merge branch 'main' into discv5-server
ElFantasma Jan 12, 2026
21acbf3
Merge branch 'main' into discv5-server
ElFantasma Jan 12, 2026
49d7db7
Merge branch 'main' into discv5-server
ElFantasma Jan 13, 2026
9ff749f
prune expired messages from messages_by_nonce
ElFantasma Jan 13, 2026
e6f4790
Merge branch 'discv5-server-enr-validation' into discv5-server-option…
ElFantasma Jan 13, 2026
0fa0c25
Merge branch 'discv5-server-optional-enr-send-on-handshake' into disc…
ElFantasma Jan 13, 2026
c6b9b96
Merge branch 'main' into discv5-server
ElFantasma Jan 13, 2026
f27b30e
Merge branch 'discv5-server' into discv5-server-enr-validation
ElFantasma Jan 13, 2026
b966976
Merge branch 'discv5-server-enr-validation' into discv5-server-option…
ElFantasma Jan 13, 2026
b29c82a
Merge branch 'discv5-server-optional-enr-send-on-handshake' into disc…
ElFantasma Jan 13, 2026
23d4a3e
Implemented ping/pong workflow
ElFantasma Jan 14, 2026
19d0a43
Added recipient-port to Pong messages
ElFantasma Jan 14, 2026
11dea1f
Improved error messaging and revalidate intervals
ElFantasma Jan 14, 2026
5e82edf
cargo fmt
ElFantasma Jan 14, 2026
7fdcef3
Addressed PR comments
ElFantasma Jan 14, 2026
08cdc24
Merge branch 'main' into discv5-server
ElFantasma Jan 14, 2026
7c62ef8
Removed duplicate code
ElFantasma Jan 14, 2026
0d11c39
Merge branch 'main' into discv5-server
ElFantasma Jan 14, 2026
5f06156
Merge branch 'main' into discv5-server
ElFantasma Jan 14, 2026
d8a79c0
Added PacketTrait to reduce code duplication
ElFantasma Jan 15, 2026
bb0a679
Merge branch 'discv5-server' into discv5-server-enr-validation
ElFantasma Jan 15, 2026
002b3d3
Merge branch 'discv5-server-enr-validation' into discv5-server-option…
ElFantasma Jan 15, 2026
a0f1014
Merge branch 'discv5-server-optional-enr-send-on-handshake' into disc…
ElFantasma Jan 15, 2026
4ef7ecd
Merge branch 'discv5-server-maintain-messages-by-nonce' into discv5-s…
ElFantasma Jan 15, 2026
ede1342
Implement discv5 FindNode request handling
ElFantasma Jan 15, 2026
8d06692
cargo fmt
ElFantasma Jan 15, 2026
8f8eee8
Implemented discv5 handshake handling
ElFantasma Jan 15, 2026
1937849
Merge branch 'main' into discv5-server-enr-validation
ElFantasma Jan 16, 2026
d298c15
Merge branch 'discv5-server-enr-validation' into discv5-server-option…
ElFantasma Jan 16, 2026
11c7f90
Merge branch 'discv5-server-optional-enr-send-on-handshake' into disc…
ElFantasma Jan 16, 2026
66ee8b9
Merge branch 'discv5-server-maintain-messages-by-nonce' into discv5-s…
ElFantasma Jan 16, 2026
5ba8ea6
Merge branch 'discv5-server-ping-pong-workflow' into discv5-server-fi…
ElFantasma Jan 16, 2026
198dd89
Merge branch 'discv5-server-findnode-handling' into discv5-server-han…
ElFantasma Jan 16, 2026
54df884
rate limit WHOAREYOU packets per source IP to prevent amplification a…
ElFantasma Jan 19, 2026
4a84a6d
cargo fmt
ElFantasma Jan 19, 2026
e1c5fc7
request updated ENR when PONG enr_seq differs from cached
ElFantasma Jan 19, 2026
952bf3c
cargo fmt
ElFantasma Jan 19, 2026
ded19fe
Merge branch 'main' into discv5-server-enr-validation
ElFantasma Jan 20, 2026
c48ca79
Merge branch 'discv5-server-enr-validation' into discv5-server-option…
ElFantasma Jan 20, 2026
b6c7473
Added PR suggestion
ElFantasma Jan 20, 2026
0befa05
Merge branch 'main' into discv5-server-enr-validation
ElFantasma Jan 20, 2026
3efd2b9
Merge branch 'discv5-server-enr-validation' into discv5-server-option…
ElFantasma Jan 20, 2026
ece3e41
Merge branch 'discv5-server-optional-enr-send-on-handshake' into disc…
ElFantasma Jan 20, 2026
ee24f5d
Merge branch 'discv5-server-maintain-messages-by-nonce' into discv5-s…
ElFantasma Jan 20, 2026
2136f81
Merge branch 'discv5-server-ping-pong-workflow' into discv5-server-fi…
ElFantasma Jan 20, 2026
b2bb21d
Merge branch 'discv5-server-findnode-handling' into discv5-server-han…
ElFantasma Jan 20, 2026
3799fd1
Merge branch 'discv5-server-handshake-handling' into discv5-server-ra…
ElFantasma Jan 20, 2026
adc9016
Merge branch 'discv5-server-rate-limit' into discv5-server-enr-update…
ElFantasma Jan 20, 2026
b5347ef
Merge branch 'main' into discv5-server-optional-enr-send-on-handshake
ElFantasma Jan 21, 2026
817d889
Merge branch 'main' into discv5-server-optional-enr-send-on-handshake
ElFantasma Jan 21, 2026
b024329
perf(l1): execution-based prewarming (#5906)
iovoid Jan 20, 2026
3b451cc
perf(levm): use fxhashset for access lists (#5824)
edg-l Jan 20, 2026
c1d8667
refactor(l1): move embedded tests to dedicated tests/ directories (#5…
ilitteri Jan 20, 2026
f18a8b7
Added PR suggestion
ElFantasma Jan 20, 2026
76ceb6b
perf(levm): improve CALLDATACOPY/CODECOPY/EXTCODECOPY (#5810)
edg-l Jan 20, 2026
04ad794
Merge branch 'discv5-server-optional-enr-send-on-handshake' into disc…
ElFantasma Jan 21, 2026
52861b3
Merge branch 'discv5-server-maintain-messages-by-nonce' into discv5-s…
ElFantasma Jan 21, 2026
d7ba2db
perf(l1): execution-based prewarming (#5906)
iovoid Jan 20, 2026
d3a6fd8
perf(levm): use fxhashset for access lists (#5824)
edg-l Jan 20, 2026
f47cf71
refactor(l1): move embedded tests to dedicated tests/ directories (#5…
ilitteri Jan 20, 2026
1717a01
Added PR suggestion
ElFantasma Jan 20, 2026
19bd12f
perf(levm): improve CALLDATACOPY/CODECOPY/EXTCODECOPY (#5810)
edg-l Jan 20, 2026
893f1e6
Merge branch 'discv5-server-ping-pong-workflow' into discv5-server-fi…
ElFantasma Jan 21, 2026
9f5e1db
Merge branch 'discv5-server-findnode-handling' into discv5-server-han…
ElFantasma Jan 21, 2026
4248caa
Merge branch 'discv5-server-handshake-handling' into discv5-server-ra…
ElFantasma Jan 21, 2026
2367500
Fixed Cargo.lock after merge
ElFantasma Jan 21, 2026
951d368
Merge branch 'discv5-server-findnode-handling' into discv5-server-han…
ElFantasma Jan 21, 2026
bb8dfcb
Merge branch 'discv5-server-handshake-handling' into discv5-server-ra…
ElFantasma Jan 21, 2026
a7efd0f
Merge branch 'discv5-server-rate-limit' into discv5-server-enr-update…
ElFantasma Jan 21, 2026
f52d05a
Merge branch 'main' into discv5-server-ping-pong-workflow
ElFantasma Jan 22, 2026
2ce3abe
Merge branch 'discv5-server-ping-pong-workflow' into discv5-server-fi…
ElFantasma Jan 22, 2026
a13be93
Merge branch 'discv5-server-findnode-handling' into discv5-server-han…
ElFantasma Jan 22, 2026
d7e4916
Merge branch 'discv5-server-handshake-handling' into discv5-server-ra…
ElFantasma Jan 22, 2026
6cd7208
Merge branch 'discv5-server-rate-limit' into discv5-server-enr-update…
ElFantasma Jan 22, 2026
eb35886
Merge branch 'main' into discv5-server-findnode-handling
ElFantasma Jan 22, 2026
2f4c387
Merge branch 'discv5-server-findnode-handling' into discv5-server-han…
ElFantasma Jan 22, 2026
5cdde1d
Merge branch 'discv5-server-handshake-handling' into discv5-server-ra…
ElFantasma Jan 22, 2026
dee4d7b
Merge branch 'discv5-server-rate-limit' into discv5-server-enr-update…
ElFantasma Jan 22, 2026
5eb63f1
Merge branch 'main' into discv5-server-findnode-handling
ElFantasma Jan 23, 2026
fd05a99
Merge branch 'discv5-server-findnode-handling' into discv5-server-han…
ElFantasma Jan 23, 2026
c86ae64
Merge branch 'discv5-server-handshake-handling' into discv5-server-ra…
ElFantasma Jan 23, 2026
33ac9d9
Merge branch 'discv5-server-rate-limit' into discv5-server-enr-update…
ElFantasma Jan 23, 2026
8981cb1
Merge branch 'main' into discv5-server-handshake-handling
ElFantasma Jan 27, 2026
87bbc11
Merge branch 'discv5-server-handshake-handling' into discv5-server-ra…
ElFantasma Jan 27, 2026
315bfeb
Merge branch 'discv5-server-rate-limit' into discv5-server-enr-update…
ElFantasma Jan 27, 2026
68d8473
Merge branch 'main' into discv5-server-rate-limit
ElFantasma Feb 2, 2026
e61cc4c
Merge branch 'discv5-server-rate-limit' into discv5-server-enr-update…
ElFantasma Feb 2, 2026
880d5c4
Merge branch 'main' into discv5-server-enr-update-on-pong
ElFantasma Feb 10, 2026
b766e21
Merge branch 'main' into discv5-server-enr-update-on-pong
ElFantasma Feb 10, 2026
7ce78de
fix(l1): generate fresh req_id for FINDNODE on ENR mismatch, extract …
ElFantasma Feb 10, 2026
f7d2120
fix(l1): don't swallow errors in test_enr_update_request_on_pong
ElFantasma Feb 10, 2026
9aa9095
cargo fmt
ElFantasma Feb 10, 2026
38e11d1
fix(l1): remove unnecessary clone in handle_pong
ElFantasma Feb 10, 2026
c3768dd
fix(l1): use > instead of != for enr_seq comparison in handle_pong
ElFantasma Feb 10, 2026
d624d88
fix(l1): update existing contact ENR on NODES response
ElFantasma Feb 10, 2026
a1a0e15
fix(l1): defer fork-id validation and handle missing record in ENR up…
ElFantasma Feb 10, 2026
e21d523
Merge branch 'main' into fix/update-existing-contact-enr-on-nodes-res…
ElFantasma Feb 11, 2026
1f39ea9
refactor(l1): extract evaluate_fork_id helper in new_contact_records
ElFantasma Feb 12, 2026
5d52f9b
fix(l1): reset validation state when contact IP/port changes on ENR u…
ElFantasma Feb 12, 2026
c413edc
Merge branch 'main' into fix/update-existing-contact-enr-on-nodes-res…
ElFantasma Feb 12, 2026
33ad9a6
Merge branch 'main' into fix/update-existing-contact-enr-on-nodes-res…
ElFantasma Feb 18, 2026
36057d1
Merge branch 'main' into fix/update-existing-contact-enr-on-nodes-res…
ElFantasma Feb 19, 2026
1cab0d1
cargo fmt
ElFantasma Feb 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 45 additions & 18 deletions crates/networking/p2p/discv5/peer_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -843,32 +843,59 @@ impl PeerTableServer {

async fn new_contact_records(&mut self, node_records: Vec<NodeRecord>, local_node_id: H256) {
for node_record in node_records {
if !node_record.verify_signature() {
continue;
}
if let Ok(node) = Node::from_enr(&node_record) {
let node_id = node.node_id();
if let Entry::Vacant(vacant_entry) = self.contacts.entry(node_id)
&& !self.discarded_contacts.contains(&node_id)
&& node_id != local_node_id
{
let mut contact = Contact::from(node);
let is_fork_id_valid =
if let Some(remote_fork_id) = node_record.decode_pairs().eth {
backend::is_fork_id_valid(&self.store, &remote_fork_id)
.await
.ok()
.or(Some(false))
} else {
Some(false)
if self.discarded_contacts.contains(&node_id) || node_id == local_node_id {
continue;
}
match self.contacts.entry(node_id) {
Entry::Vacant(vacant_entry) => {
let is_fork_id_valid =
Self::evaluate_fork_id(&node_record, &self.store).await;
let mut contact = Contact::from(node);
contact.is_fork_id_valid = is_fork_id_valid;
contact.record = Some(node_record);
vacant_entry.insert(contact);
METRICS.record_new_discovery().await;
}
Entry::Occupied(mut occupied_entry) => {
let should_update = match occupied_entry.get().record.as_ref() {
None => true,
Some(r) => node_record.seq > r.seq,
};
contact.is_fork_id_valid = is_fork_id_valid;
contact.record = Some(node_record);
vacant_entry.insert(contact);
METRICS.record_new_discovery().await;
if should_update {
let is_fork_id_valid =
Self::evaluate_fork_id(&node_record, &self.store).await;
let contact = occupied_entry.get_mut();
if contact.node.ip != node.ip || contact.node.udp_port != node.udp_port
{
contact.validation_timestamp = None;
contact.ping_req_id = None;
}
contact.node = node;
Copy link
Contributor

Choose a reason for hiding this comment

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

When updating an existing contact in the Occupied branch, contact.node = node can change the contact's IP address, but validation_timestamp is not reset. The validate_contact method (line 798) relies on was_validated() + an IP match to prevent amplification attacks (see the anti-amplification comment on lines 806-809). After this update, a previously-validated contact now appears validated at a new IP it was never actually pinged at.

Attack scenario: A malicious node M, previously validated at IP_M, creates a legitimately-signed ENR with IP_victim and higher seq. When this ENR arrives in a NODES response, we update M's contact: node.ip = IP_victim, while validation_timestamp is preserved. A spoofed FindNode packet with src = IP_victim now passes validate_contact, causing us to send a large NODES response to the victim.

The fix would be to check if the IP changed and, if so, reset validation_timestamp (and ping_req_id). This is a new concern — on main, new_contact_records only inserted vacant entries, so a contact's IP could never change through this path.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The specific attack scenario doesn't quite work as described. Let me trace through it:

  1. In discv5, messages are encrypted with session keys established via ECDH handshake. A third party can't forge a FindNode as node M without M's session key.

  2. More importantly, validate_contact (which checks sender_ip == contact.node.ip) is not called in the discv5 handle_find_node handler at all — that check only exists in discv4. So validation_timestamp is irrelevant to this path.

  3. handle_find_node responds to contact.node.udp_addr() (the stored IP from the ENR), not to the actual sender_addr from the UDP packet. This is a pre-existing behavior — before this PR, the handler was already responding to the stored contact IP without any IP check.

What our PR changes: it makes it possible for a peer to update its stored IP via a NODES response (previously only possible during initial discovery). This marginally broadens the existing issue but doesn't create it.

The real pre-existing issue is that discv5's handle_find_node lacks the anti-amplification defense that discv4 has. The proper fix (as a separate PR) would be:

  1. Pass sender_addr to handle_find_node and respond to it instead of contact.node.udp_addr()
  2. Add a sender_addr.ip() == contact.node.ip check (like discv4's validate_contact)

Neither alone is sufficient (responding to stored IP allows ENR-based redirection; responding to sender_addr alone allows UDP spoofing), but together they make amplification much harder.

That said, resetting validation_timestamp on IP change is cheap and reasonable as defense-in-depth — happy to add it. But it won't fix the actual gap since validate_contact isn't used in the discv5 FindNode path.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added the validation_timestamp + ping_req_id reset when IP or UDP port changes: 5d52f9b

Also opened #6199 for the pre-existing anti-amplification gap in discv5's handle_find_node.

contact.record = Some(node_record);
contact.is_fork_id_valid = is_fork_id_valid;
}
}
}
// TODO Handle the case the contact is already present
}
}
}

async fn evaluate_fork_id(record: &NodeRecord, store: &Store) -> Option<bool> {
if let Some(remote_fork_id) = record.decode_pairs().eth {
backend::is_fork_id_valid(store, &remote_fork_id)
.await
.ok()
.or(Some(false))
} else {
Some(false)
}
}

fn peer_count_by_capabilities(&self, capabilities: Vec<Capability>) -> usize {
self.peers
.iter()
Expand Down