plugeth/eth/protocols/snap
rjl493456442 1cb3b6aee4
eth/protocols/snap: fix snap sync failure on empty storage range (#28306)
This change addresses an issue in snap sync, specifically when the entire sync process can be halted due to an encountered empty storage range.

Currently, on the snap sync client side, the response to an empty (partial) storage range is discarded as a non-delivery. However, this response can be a valid response, when the particular range requested does not contain any slots.

For instance, consider a large contract where the entire key space is divided into 16 chunks, and there are no available slots in the last chunk [0xf] -> [end]. When the node receives a request for this particular range, the response includes:

    The proof with origin [0xf]
    A nil storage slot set

If we simply discard this response, the finalization of the last range will be skipped, halting the entire sync process indefinitely. The test case TestSyncWithUnevenStorage can reproduce the scenario described above.

In addition, this change also defines the common variables MaxAddress and MaxHash.
2023-10-13 09:08:26 +02:00
..
discovery.go core, eth: split eth package, implement snap protocol (#21482) 2020-12-14 10:27:15 +01:00
handler.go eth/protocols/snap: fix snap sync failure on empty storage range (#28306) 2023-10-13 09:08:26 +02:00
metrics.go p2p, p2p/discover: add dial metrics (#27621) 2023-07-06 16:20:31 +02:00
peer.go all: fix docstrings 2022-10-04 09:18:02 +02:00
protocol.go core/state/snapshot, core/types, eth: move account definition to type (#27323) 2023-06-06 11:17:39 +03:00
range_test.go eth/protocols/snap: fix snap sync failure on empty storage range (#28306) 2023-10-13 09:08:26 +02:00
range.go eth/protocols/snap: fix snap sync failure on empty storage range (#28306) 2023-10-13 09:08:26 +02:00
sort_test.go core, les, eth: port snap sync changes (#24898) 2022-07-15 14:55:51 +03:00
sync_test.go eth/protocols/snap: fix snap sync failure on empty storage range (#28306) 2023-10-13 09:08:26 +02:00
sync.go eth/protocols/snap: fix snap sync failure on empty storage range (#28306) 2023-10-13 09:08:26 +02:00
tracker.go eth/protocols, prp/tracker: add support for req/rep rtt tracking (#22608) 2021-04-22 11:42:46 +03:00