Hacker News new | past | comments | ask | show | jobs | submit login

Is this for Bitcoin or for Ethereum? I thought the former has UTXOs and the latter has accounts.

So the issue is, if you want to validate a transaction, I would have to find the block in which the input was made, and confirm all the blocks from that one to the current block?




You're correct, Ethereum uses account balances. You don't have to keep track of inputs and outputs, just check that the balance is sufficient.

Since each block header has a merkle root of the block's state, you can just get all the block headers to check PoW, get the current state, and validate transactions and states as many blocks back as you feel you need to make sure a miner hasn't faked the current state.

Here's an old article by Vitalik on the subject:

https://blog.ethereum.org/2015/06/26/state-tree-pruning/


Yeah, looks like I got the terminology wrong, but the concept is the same for these purposes. Whether you track the outputs or the account balances, there's a lot more information that you need to keep an accounting of than what you can glean from just the last N blocks. Which makes sense; it is a distributed ledger after all.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: