forked from cerc-io/plugeth
1cb3b6aee4
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. |
||
---|---|---|
.. | ||
catalyst | ||
downloader | ||
ethconfig | ||
fetcher | ||
filters | ||
gasprice | ||
protocols | ||
tracers | ||
api_admin.go | ||
api_backend.go | ||
api_debug_test.go | ||
api_debug.go | ||
api_miner.go | ||
api.go | ||
backend.go | ||
bloombits.go | ||
handler_eth_test.go | ||
handler_eth.go | ||
handler_snap.go | ||
handler_test.go | ||
handler.go | ||
peer.go | ||
peerset.go | ||
state_accessor.go | ||
sync_test.go | ||
sync.go |