Is It Possible to Create a <1GB Blockchain?

in #cryptocurrency6 years ago

TL;DR: Yes, and it is coming soon through Swarm and IPFS.

If Bitcoin’s blockchain keeps growing at this pace, by 2031 it will have grown to 1.6 PB. That’s petabytes! And Bitcoin isn’t even a very complex blockchain! What if Steem keeps growing at a rapid pace? The disk space required would be enormous!

So we definitely need a solution to this problem. Not only will it create inconveniences for anyone running a full node, it will make the blockchain much less decentralized. Many developers have tried to increase the amount of transactions that can be stored in the block’s fixed size, but you can only compress data so much.

What if, instead of storing the blockchain on every person’s computer, we stored it on just a few computers? We already have IPFS, a way to store files in a decentralized way, so why can’t we just do it with blockchains? We can. Even Ethereum is working to do it in the background, through Swarm, a system similar to IPFS but where you are rewarded for storing each block. Next I will explain a simple implementation of a system like Swarm and IPFS.

When a block is produced, a bounty is placed on it. Any person who wants to store that block on their computer can do so and that bounty will be paid out to them and their counterparts over a long period of time. These people will be called the ‘Storers.’ But we can’t fully entrust those Storers with the block, so we have to find a mechanism for them to prove that they are actually storing the block. This mechansim is the hash. I wrote a post about it a while ago, so read it if you are not familiar with the term.

Every user should store the merkle root (basically the hash) of every block so that when they need to view a block and a Storer gives it to them, they can verify that it is the correct block by comparing it’s merkle root to their stored merkle root. But even if a Storer is storing incorrect data or not storing it at all, they will still earn the bounty from the block. That’s why we introduce a Challenger. A Challenger could also be another Storer and would claim that a certain Storer who is supposed to be storing a block is either storing it incorrectly or is not storing it at all. Then the Storer is required to share what it thinks is its block to prove that it is storing it correctly. If it is storing it correctly, nothing happens. If it is not storing it correctly, then the Challenger receives all of the bounty for the storage of that block that was alloted to that Storer.

NOTE: This method is not completely secure and is vulnerable to certain types of Sybil attacks.

So let’s figure out how much storage space this would take for the average user!

To make sure that Storers will have time to store the files and connect, nodes will probably want to store the previous 20 raw blocks in memory. That is a negligible amount, so I will ignore it. So if we are to store the merkle root of each block, then we will have to store 64 bytes per block. So, if we use Bitcoin as our example and find that the latest block is #523764, we know that 523764 Bitcoin blocks have been created. With 64 bytes per block:

64 bytes per block * 523764 blocks = 33520896 bytes total

33520896 bytes total to megabytes = 33 megabytes, or 0.03 gigabytes

So to store the merkle root of each Bitcoin block on your computer, it would only take 0.03 gigabytes! That is a massive improvement! Doing the same calculations with Steem, we find that it would only take 1.6 gigabytes. Why is Steem so much less efficient? There are two reasons:

  1. Steem has much shorter block times; Bitcoin’s are 10 minutes, and Steem’s are 3 seconds.

  2. Most Steem blocks are not as big as Bitcoin blocks, meaning that scaling them down to 64 bytes doesn’t mean too much.

It is actually possible to create a customized Bitcoin client that would use IPFS to store blocks for it, allowing for this tiny block size. No one has done it that I know of, though.

EDIT: It would actually be possible to store all blocks by just knowing the most recent one, but with a bit of risk. Each block stores the hash of the one before it. But if one block in the chain is no longer stored by any Storers, it will mean that the entire chain before it will not be able to be verified.

We are coming very close to removing a massive barrier to running a full node by integrating Swarm and IPFS into blockchains, and doing so will make cryptocurrencies more decentralized and powerful, allowing us to store more and more data into one block.



Thanks for reading this! Resteem this post if you think your followers will like it, and make sure to upvote to support me.

Investing in cryptocurrencies? Use the Binance exchange because it has low fees and a lot of different currencies. If you sign up using the referral link below, 20% of your fees will go to support me and help me keep posting quality content (note: you don’t lose anything by signing up with this link):

https://www.binance.com/?ref=26011358

Sort:  

Gracias. ¿Y tu que piensas?

Coins mentioned in post:

CoinPrice (USD)📈 24h📈 7d
BTCBitcoin7898.560$-4.11%-4.89%
ETHEthereum623.159$-9.32%-10.69%
STEEMSteem2.968$-2.56%5.44%
SWMSwarm0.285$25.11%40.95%

Coin Marketplace

STEEM 0.19
TRX 0.15
JST 0.029
BTC 63061.76
ETH 2602.70
USDT 1.00
SBD 2.75