From 917bee97a7632fd61f7528a50862aa84a0e3593d Mon Sep 17 00:00:00 2001 From: Jet Hughes Date: Tue, 20 Dec 2022 09:14:48 +1300 Subject: [PATCH] vault backup: 2022-12-20 09:14:48 --- content/notes/think-writing.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/content/notes/think-writing.md b/content/notes/think-writing.md index 1f3070728..34c7b52f2 100644 --- a/content/notes/think-writing.md +++ b/content/notes/think-writing.md @@ -91,6 +91,7 @@ For business use cases: Fabric has pluggable consensus algorithms: iroha has only YAC + I started reading the bitcoin paper again. In bitcoin they are able to save space by storing hashes of transactions in a merkle tree and stubbing off branches. In Ethereum and other chains with smart contracts and storage, how to they prevent the chain from taking up a lot of space? I also thought that blockchain can act basically as a database and you are able to go back and look at data stored "on-chain". Where is this data stored? I'll have to read up about Ethereum again but I suspect the chain must use more storage space, or maybe they clean up old smart contracts? How would that even work? In etherum each block hold the entire state of the chain. The state is stored in a tree structure. And for each block only a small part of the tree needs to be changed. So the data can be stored once, and referenced twice using pointers. This is done using a "patricia tree". Patricia trees are similar to merkle trees but the allow insertion and deletion of nodes. Also since the entire state is stored on each chain there is no need to store the entire blokchain history. @@ -107,3 +108,8 @@ I think I have a much better understanding ![](https://i.imgur.com/aKtNoso.png) ![](https://i.imgur.com/xqUG10J.png) + +--- + +# 20/12 +