plugeth/cmd/devp2p/internal/ethtest
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
..
testdata all: remove ethash pow, only retain shims needed for consensus and tests (#27178) 2023-05-03 12:58:39 +03:00
chain_test.go cmd/devp2p, eth: drop eth/66 (#28239) 2023-10-03 15:03:19 +03:00
chain.go core/forkid: correctly compute forkid when timestamp fork is activated in genesis (#27895) 2023-08-16 23:31:02 +02:00
helpers.go cmd/devp2p, eth: drop eth/66 (#28239) 2023-10-03 15:03:19 +03:00
large.go all: update license headers and AUTHORS from git history (#24947) 2022-05-24 20:39:40 +02:00
snap.go eth/protocols/snap: fix snap sync failure on empty storage range (#28306) 2023-10-13 09:08:26 +02:00
snapTypes.go cmd/devp2p/internal/ethtest: update tests for eth/67 (#25306) 2022-08-02 14:48:55 +02:00
suite_test.go core, accounts, eth, trie: handle genesis state missing (#28171) 2023-09-28 10:00:53 +03:00
suite.go cmd/devp2p, eth: drop eth/66 (#28239) 2023-10-03 15:03:19 +03:00
transaction.go cmd: use errrors.New instead of empty fmt.Errorf (#27329) 2023-05-24 12:21:29 +02:00
types.go cmd/devp2p, eth: drop eth/66 (#28239) 2023-10-03 15:03:19 +03:00