1

I understand that when a new client starts syncing the Ethereum blockchain, they have to recreate all previous states for each transaction starting from a particular checkpoint (in geth, this depends upon whether Snap or Full sync is used).

But where can a new client get the sumset of all historical states? Do they have to necessarily connect to archive nodes?

My understanding is that standard nodes does not store a full archive of the state.

1

1 Answer 1

1

It seems what you're fundamentally asking is:

  1. Does a new Ethereum client/node need to connect to an archive node to become an archive node? or
  2. Given a new Ethereum client can become a full node by connecting only to another full node is it possible for it to convert this newly instantiated full node into an archive node using its own data?

No, a new Ethereum client/node does NOT need to connect to an archive node to become an archive node itself. Regarding the 2nd phrasal above while it is theoretically possible for a full node to become a complete archive node storing all block states back to genesis, all major Ethereum client implementations currently only enable full nodes to become partial archive nodes storing block states from the latest block onwards as explained here

How It's Possible:

  1. Blockchain Download: Your archive node in the making downloads all blocks from the genesis block to the current head block. It can get this data from a full node which stores all blocks from genesis, despite not storing all block states like an archive node.
  2. Transaction Execution: As it downloads blocks, your node also executes all transactions within those blocks, effectively simulating the state transitions of the blockchain block by block.
  3. State Storage: By running your node in archive mode (--gcmode "archive" in Geth), you instruct it to store the state at each block, not just the most recent state/s. This is what differentiates an archive node from a full node.
  4. Verification: The state at each block is verified by computing the state root and comparing it to the state root in the block header. This ensures the integrity of the historical state data.

Your Answer

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

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