go-pulse/trie
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
..
testutil all: implement path-based state scheme (#25963) 2023-08-01 15:17:32 +03:00
triedb core, accounts, eth, trie: handle genesis state missing (#28171) 2023-09-28 10:00:53 +03:00
trienode all: move light.NodeSet to trienode.ProofSet (#28287) 2023-10-10 10:30:47 +02:00
triestate all: activate pbss as experimental feature (#26274) 2023-08-10 22:21:36 +03:00
committer.go all: implement path-based state scheme (#25963) 2023-08-01 15:17:32 +03:00
database_test.go core, trie: cleanup trie database (#28062) 2023-09-07 21:17:14 +08:00
database.go core, accounts, eth, trie: handle genesis state missing (#28171) 2023-09-28 10:00:53 +03:00
encoding_test.go trie: reduce allocs in recHash (#27770) 2023-08-18 22:41:19 +02:00
encoding.go trie: reduce allocs in recHash (#27770) 2023-08-18 22:41:19 +02:00
errors.go cmd, core/state, eth, tests, trie: improve state reader (#27428) 2023-06-20 15:31:45 -04:00
hasher.go build: upgrade to go 1.19 (#25726) 2022-09-10 13:25:40 +02:00
iterator_test.go all: update golang/x/ext and fix slice sorting fallout (#27909) 2023-08-12 00:04:12 +02:00
iterator.go core, trie: rework trie database (#26813) 2023-04-24 10:38:52 +03:00
node_enc.go core, trie: rework trie database (#26813) 2023-04-24 10:38:52 +03:00
node_test.go trie: improve node rlp decoding performance (#25357) 2022-08-19 00:39:47 +02:00
node.go core, trie: rework trie database (#26813) 2023-04-24 10:38:52 +03:00
preimages.go core, trie, eth, cmd: rework preimage store (#25287) 2022-07-27 20:37:04 +02:00
proof_test.go eth/protocols/snap: fix snap sync failure on empty storage range (#28306) 2023-10-13 09:08:26 +02:00
proof.go cmd, core/state, eth, tests, trie: improve state reader (#27428) 2023-06-20 15:31:45 -04:00
secure_trie_test.go all: activate pbss as experimental feature (#26274) 2023-08-10 22:21:36 +03:00
secure_trie.go trie, core/state: revert error removal in (*state.Trie).Commit (#27544) 2023-06-27 15:36:38 +03:00
stacktrie_test.go trie: remove owner and binary marshaling from stacktrie (#28291) 2023-10-11 06:12:45 +02:00
stacktrie.go trie: remove owner and binary marshaling from stacktrie (#28291) 2023-10-11 06:12:45 +02:00
sync_test.go trie: remove internal nodes between shortNode and child in path mode (#28163) 2023-09-22 09:31:10 +03:00
sync.go trie: fix a typo, use correct docstrings (#28302) 2023-10-10 10:32:14 +02:00
tracer_test.go all: activate pbss as experimental feature (#26274) 2023-08-10 22:21:36 +03:00
tracer.go all: implement path-based state scheme (#25963) 2023-08-01 15:17:32 +03:00
trie_id.go cmd, core, eth, les, light: track deleted nodes (#25757) 2022-09-27 10:01:02 +02:00
trie_reader.go all: activate pbss as experimental feature (#26274) 2023-08-10 22:21:36 +03:00
trie_test.go trie: remove owner and binary marshaling from stacktrie (#28291) 2023-10-11 06:12:45 +02:00
trie.go all: implement path-based state scheme (#25963) 2023-08-01 15:17:32 +03:00