4 ms·
> how do you know what it’s supposed to be The information is in the block headers. > In ETH instead it is common to just download the result and trust it’s v
by bouncycastle 8y ago
> how do you know what it’s supposed to be
The information is in the block headers.
> In ETH instead it is common to just download the result and trust it’s valid
Nope. You still have to download all the block headers from block 0 and check if they are valid, including the PoW and other hashes.. The blocks are basically tamper proof as in Bitcoin (but can also be vulnerable to a 51% attack)
Then that's where it all diverges from Bitcoin: in Ethereum, there are three merkle trees: one for the state, one for transactions and one for the transaction results (receipts). The roots of these trees are in the blocks, once you have these, you can verify a particular value of, say, a state value, without the need to verify each and every other value, by walking through the tree and doing a merkle proof. There's plenty of info on the web explaining how it works if you look it up, eg. Search for "ethereum state trie"
As for syncing, recently it improved a lot. I did it a few times last month with Geth on an old machine just to test it out. Synced within 2 days, a big improvement over the previous versions of Geth. And yes, it got all the blocks from 0 to current. Blocks by themselves are very light.
- keymone 8y ago> The information is in the block headers > You still have to download all the block headers from block 0 and check if they are valid, including the PoW and other hashes.. and unless you validate those blocks you don't know if the chain you're looking at is valid. headers don't help with that. > The blocks are basically tamper proof as in Bitcoin (but can also be vulnerable to a 51% attack) vulnerability to 51% attack depends on cost of such attack. if it is "normal" in ethereum to trust third parties with state of just couple hundred blocks old - the attack becomes very cheap. and if i understand correctly that's the case with majority of ethereum nodes as they aren't fully validating and are in fast sync or light mode. in BTC `--assumevalid` points to a block that is more than year and a half old. > The roots of these trees are in the blocks, once you have these, you can verify a particular value of, say, a state value, without the need to verify each and every other value, by walking through the tree and doing a merkle proof. except when the state you downloaded from third parties and assumed was valid, was actually forged. since you're not executing transactions you can't know what transaction receipts would have been created. > And yes, it got all the blocks from 0 to current. Blocks by themselves are very light. nah, i call bs. it might have downloaded them but didn't validate anything beyond headers and some recent transactions. admittedly i haven't checked for like half a year, but full sync was literally freezing and not completing at all on powerful laptops and aws instances. it's quite possible the wonder kids of javascript cryptocurrency finally fixed their shit but i wouldn't bet my money on it.