go-ethereum/p2p/discover
Felix Lange af0a3274be
p2p/discover: fix crash when revalidated node is removed (#29864)
In #29572, I assumed the revalidation list that the node is contained in could only ever
be changed by the outcome of a revalidation request. But turns out that's not true: if the
node gets removed due to FINDNODE failure, it will also be removed from the list it is in.
This causes a crash.

The invariant is: while node is in table, it is always in exactly one of the two lists. So
it seems best to store a pointer to the current list within the node itself.
2024-05-28 18:13:03 +02:00
..
v4wire all: use rlp.DecodeBytes instead of rlp.Decode where possible (#27994) 2023-08-24 11:47:42 +03:00
v5wire p2p/discover/v5wire: add tests for invalid handshake and auth data size (#29708) 2024-05-06 13:17:19 +02:00
common.go p2p/discover: improved node revalidation (#29572) 2024-05-23 14:26:09 +02:00
lookup.go p2p/discover: improved node revalidation (#29572) 2024-05-23 14:26:09 +02:00
metrics.go all: fix mismatched names in comments (#29348) 2024-03-26 21:01:28 +01:00
node.go p2p/discover: fix crash when revalidated node is removed (#29864) 2024-05-28 18:13:03 +02:00
ntp.go all: remove dependency on golang.org/exp (#29314) 2024-03-25 07:50:18 +01:00
table.go p2p/discover: improved node revalidation (#29572) 2024-05-23 14:26:09 +02:00
table_reval.go p2p/discover: fix crash when revalidated node is removed (#29864) 2024-05-28 18:13:03 +02:00
table_reval_test.go p2p/discover: fix crash when revalidated node is removed (#29864) 2024-05-28 18:13:03 +02:00
table_test.go p2p: fix typos (#29828) 2024-05-24 11:33:19 +02:00
table_util_test.go p2p/discover: fix crash when revalidated node is removed (#29864) 2024-05-28 18:13:03 +02:00
v4_lookup_test.go p2p/discover: using slices.Contains (#29395) 2024-04-04 12:24:49 +02:00
v4_udp.go p2p/discover: improved node revalidation (#29572) 2024-05-23 14:26:09 +02:00
v4_udp_test.go p2p/discover: improved node revalidation (#29572) 2024-05-23 14:26:09 +02:00
v5_talk.go p2p/discover: concurrent TALKREQ handling (#27112) 2023-04-28 11:03:43 +02:00
v5_udp.go p2p/discover: improved node revalidation (#29572) 2024-05-23 14:26:09 +02:00
v5_udp_test.go p2p/discover: improved node revalidation (#29572) 2024-05-23 14:26:09 +02:00