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?
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