Are blockchain stateless and UTXO stateful?
As far as I understand, when a new node joined the network, it will download 500+ GB blockchain data that will be used to verify the blockchain integrity.
Start from checking header from genesis block to tip block in order to check the integrity whether the downloaded blockchain is corrupted or not, since blockchain is hard to rewrite but easy to verify.
Then, it's iterating the body of block from genesis block to tip block which take days or weeks to construct UTXO (the current balance of each address).
For every block during iteration:
- Add an address to UTXO set if it's being an output (destination) in a transaction.
- Remove the address from UTXO set if it 's being an input (source) in a transaction.
So, can I say the blockchain itself is stateless since it's only allowing append operation to generate new block thus it's only storing transaction history.
From that stateless data, every node can construct UTXO sets which is stateful where every nodes keep the state in its internal memory (same like how mempool stored). Correct?
If correct, that's mean UTXO of every nodes might be vary.
Please clarify my understanding.
from Recent Questions - Bitcoin Stack Exchange https://ift.tt/WMswaIp
via IFTTT