Designing Blockchain #4: Merkle Trees and State Verification
dev.to·6d·
Discuss: DEV
🌳Merkle Trees
Preview
Report Post

Intro

In the previous article, we secured our Fleming blockchain by implementing cryptographic signatures and wallets, ensuring that only legitimate account owners can authorise transactions. However, if you remember from the second article, we left a critical architectural problem unresolved: storing the full state in every block is extremely wasteful and doesn’t scale well.

Let’s understand the magnitude of this problem. In our current implementation, each block contains a complete copy of the entire blockchain state — a HashMap<Address, u64> where Address is a String ("0x" prefix + 40 hex characters =…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help