kostaleonard / theblockchainkiller

Leo's anti-The Blockchain
MIT License
4 stars 1 forks source link

Change blockchain serialization format from binary to JSON #27

Open kostaleonard opened 8 months ago

kostaleonard commented 8 months ago

As a miner, I want to use JSON as my blockchain serialization format so that I can easily inspect the values visually or with languages like Python.

We have a binary serialization format which is very difficult to read and test. I realized after implementing this serialization format that we should just use JSON.

kostaleonard commented 7 hours ago

Reading "Building Microservices" by Sam Newman, I realized that the binary encoding has some advantages I hadn't considered. Since it's more compact than JSON, it's faster to transmit and easier to store. So, although JSON would be more interpretable, binary encoding is a valid approach with some important benefits.