My understanding is that the archival node stores the state tree for each block -- that's the reason the size is so big. Can someone validate my understanding?
The state of archival node (compared to Full node) is much bigger because every change to the State is kept in your disk. This way if you issue
eth.getBalance(address) you can call it with a block number as parameter, for example: eth.getBalance(address,block_number) and it will give you the balance of the account after all transactions for that block were executed. With Full node you can't do this. Full node only tracks 128 last states (in memory only, you can increase this constant modifying
core/blockchain.go:TriesInMemory constant) and you can only query the latest balance of an account.
Added to this, the state is so big (compared to other cryptocurrencies) because it stores contract data. Contract data is like a binary executable .exe in Windows, it contains instructions to be executed and this takes much bigger space than a signed transaction or an account record. All the invocations to contracts also kept with
input stored in tx.Data() field. The data of input for a contract will be much much bigger than its code, over time. The storage of the contract (all the variables it is storing internally) is also participating in the hashing algorithm of the merkle trie, so it is also kept in the State. Also, contracts are immutable , once you uploaded it , you can't modify it, so a new version of the executable must be fully uploaded if you have to apply some changes. This is the reason Ethereum's state is so big. It is like a hard disk where files are created but never deleted. In the future this is going to get worse.
Why would you need an archival node?
- You are a white hacker and you want to trace what happened quickly after the attack was discovered
- You have your front running robot and you need to test it with past data. (or any other development task which needs to run transaction on a State of a particular block)
- You are running an Explorer service, like Etherscan and you need to query older data.
Most people don't need archival nodes. However you can find articles in Medium stating that nobody runs archival nodes even the Ethereum Foundation doesn't have them. This is not true. Lots of people are running archival nodes. If nobody would be running archival nodes, you wouldn't be able to download block bodies, which contain all transaction data.
Yes, you're correct. An Ethereum archival node is a geth full node. A full node will download/maintain block header + block data + perform full data validation. This process takes a more time and storage.
For more details, see the answer to this question: What is the parity light pruning mode?