1

How does the state verification work when doing a full sync from scratch?

Does the state get generated locally for each block using the transactions downloaded (in the transaction trie) and then compared to the state root within the block? Or do the state tries need to be downloaded to be incorporated in the syncing process somehow?

enter image description here

Also, is the syncing process exactly the same for a 'full sync' vs a 'full sync with archive'?

.. with the only difference being that state tries obtained are stored instead of discarded? Is there any additional verification during the syncing process that comes with an archival sync vs a normal full sync?

p.s. for context, I'm asking because I know with fast syncs the state tries have to be downloaded (instead of generated) once you get to a certain pivot point (1,024 blocks from tip I think), and I'm wondering if it's similar with a full sync.


Sync definitions

Full sync

geth --syncmode full or parity --no-warp

.

Full Archival sync

geth --syncmode full --gcmode archive or parity --no-warp --pruning archive

1 Answer 1

0

During full sync the state is generated locally, for both archive and full nodes, starting from genesis. The only difference between those nodes are pruning options.

For fast sync, the node needs to download some old state snapshot (30-1000 blocks behind tip) make sure that it corresponds to state hash in block header, and from there the sync is the same as full node, without downloading any additional states, just blocks.

Are you saying that fast sync downloads state tries for each block? Where did you get that info?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.