kostaleonard / leocoin

Leo's cryptocurrency
MIT License
4 stars 1 forks source link

Change blockchain serialization format from binary to JSON #27

Open kostaleonard opened 9 months ago

kostaleonard commented 9 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 1 month 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.