plugeth/common
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
..
bitutil common,crypto: move fuzzers out of core (#22029) 2020-12-23 17:44:45 +01:00
compiler common/compiler: json unmarshalling error checks (#25449) 2022-08-01 13:47:21 +02:00
fdlimit fix: linter warning (#25192) 2022-06-29 10:54:57 +02:00
hexutil build: upgrade to go 1.19 (#25726) 2022-09-10 13:25:40 +02:00
lru common/lru: add test case for BasicLRU.Peek (#27559) 2023-06-27 10:27:40 +02:00
math common/math: fix typo in comment (#27561) 2023-06-25 17:33:50 +02:00
mclock common/mclock: add Alarm (#26333) 2023-01-03 12:10:48 +01:00
prque all: remove deprecated uses of math.rand (#26710) 2023-02-16 14:36:58 -05:00
big.go core, vm, common: define constantinople fork + shift (#16045) 2018-02-23 12:32:57 +02:00
bytes_test.go all: simplify and fix database iteration with prefix/start (#20808) 2020-04-15 14:08:53 +03:00
bytes.go internal/ethapi: add db operations to api (#24739) 2022-04-27 08:37:48 +02:00
debug.go common: rename unused function with typo (#23025) 2021-06-10 10:53:23 +03:00
format.go common: improve pretty duration regex (#25073) 2022-06-14 14:08:43 +02:00
path.go common: delete MakeName (#27023) 2023-04-03 03:51:31 -04:00
size_test.go common: increase StorageSize test coverage (#25188) 2022-06-29 12:13:00 +02:00
size.go core, cmd, vendor: fixes and database inspection tool (#15) 2019-05-16 10:39:34 +03:00
test_utils.go all: replace uses of ioutil with io and os (#24869) 2022-05-16 11:59:35 +02:00
types_test.go log: avoid stack lookups when not needed/used (#28069) 2023-09-07 08:48:49 -04:00
types.go eth/protocols/snap: fix snap sync failure on empty storage range (#28306) 2023-10-13 09:08:26 +02:00