Are blockchain stateless and UTXO stateful?

Are blockchain stateless and UTXO stateful?

Manage alerts

Loading saved threads...

Muhammad Ikhwan Perwira · External communityPost link
External question — Bitcoin Stack Exchange Author: Muhammad Ikhwan Perwira Original post: https://bitcoin.stackexchange.com/questions/126083 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. 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.
Quote
Report
Murch · External communityPost link
External answer — Bitcoin Stack Exchange Author: Murch Original post: https://bitcoin.stackexchange.com/a/126086 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. 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. We track UTXOs in the UTXO set per their unique outpoint , not by address. Overall, the blockchain is an append-only data structure with probabilistic finality. I agree with RedGrittyBrick that I’m not sure "stateless/stateful" makes sense in that context. The purpose of the blockchain (which is a journal of all transactions) is to establish a shared ground truth about the UTXO set (the ledger). Nodes that have processed the blockchain up to the same block will have applied exactly the same sequence of operations to their UTXO set and have the same UTXO set: i.e., synchronized nodes agree completely about the existence or non-existence of each and every UTXO. Individual UTXOs cannot be modified. They are only created by a transaction output and consumed by a transaction input. There is no way to partially use a UTXO or to modify it. Of course nodes that are still catching up may not have the same UTXO set, yet, but they will have exactly the same UTXO set as every other node had at that block.
Quote
Report

Post Reply

Checking account access…