DevBlog #1 - The Importance of Sidechains

avatar

A Simple Blockchain Diagram - Slalom.com

As we all know, blockchains are extremely powerful tools that can be used to empower individuals to create immutable, censorship-resistant interactions; from monetary transactions to permanent (and optionally encrypted) messages.

Not only does the individual gain such benefits, but organizations of all sizes. DAOs are a great example of a deterministic source of funding and governance for a community or company, with far greater transparency than any traditional company or organization could ever achieve.

Blockchains are one of the first forms of databases that have extremely high fault-tolerance, which makes them pair extraordinarily well with P2P networks. Hence, cryptocurrency (including all sub-forms) was born.

However, with the ever-growing growth of blockchain usage, there are a few things to bear in mind...

- The Downsides of Blockchain Technology


As a blockchain (such as Bitcoin or Hive) grows in usage, their respective blockchain will store all history of every piece of data ever submitted to it.

This is perfect for immutability and determinism. Although, for the users running full-nodes, this becomes quite a challenge as the blockchain continues to grow. If it exceeds the speed of that of a user's hardware specs, then it will become harder and harder for people to decentralize the network.

Spam is a threat to consider, but by now the majority of public blockchains have mechanisms to combat such exhaustion attacks:
  • Bitcoin uses transaction fees per-byte of data within a transaction, costing the user more Bitcoin as they fill a transaction with additional data.

  • Hive uses a Resource Credits and Voting Mana system, which allows for "fee-free" transactions on the Hive network, instead of costing the user per-byte of data. The Hive network allocates an amount of RC and Mana to every user on the network, weighted by their Hive Power (aka staked Hive).
    This system allows new users of the network to transact without owning a single Hive, by limiting the amount of actions they can do within a certain time-frame.

For example, a new Hive user may only be able to create 3 comments in 5 hours, but a Hive user with 1,000 HP may be able to create 30 comments in the same time-frame. This means each comment will cost less, relative to the amount of staked Hive the user owns, with RC and Mana "regenerating" over time.


Even with anti-spam measures in place, the natural non-malicious growth of a blockchain may still outpace the development and costs of consumer hardware, hampering the user's ability to utilize it safely or run their own full-nodes.

So, blockchain "bloat" is a cause of concern on highly-utilized blockchain platforms... How can this be reduced?

- Sidechains


A sidechain is an additional, layer-two protocol that has full interoperability with a "main chain.
Sidechains can be used to store and transact with custom tokens and data, backed by the main chain's stability and security.

Put simply, a sidechain can be used as a layer-two solution to reduce the data bloat on the main chain, allowing it to store more "essential" data while also cutting down the sizes of the blocks and the load on the main chain's P2P network.

Examples:

  • The Hive Engine is a Hive sidechain that allows for custom token and smart contact creation & utilization.
  • The ZENZO Forge is essentially a ZENZO sidechain that allows for unique divisible and non-divisible tokens to be utilized by players, game developers and services.

Sidechains can be used to allow for optional parts of a decentralized network to be utilized depending on a user's preference.

For example, if a user wants to run a full-node for a blockchain, they're going to have to download the entire history of the chain. And if all data is on that one chain, even non-essential and bloated data, they are going to have to sacrifice time and resources into downloading and processing data that isn't even relevant to them.

With sidechains, you could download the main chain and leave out any sidechains, meaning you gain access to the "Core" protocol. For many projects this is generally the "monetary layer" of the blockchain, without downloading all the additional smart-contracts, tokens, and data bloat of the optional sidechain.

- The Happy-Ending Results of Sidechain Utilization

  • After running some quick tests on the ZENZO Blockchain, on-chain data was reduced by 66.3% over a span of 227 "sidechain" token transactions.

  • The total size of the data set of the tokens transacted mounts up to ~151kb, yet the on-chain data storage was only ~51kb. The "sidechain" did the heavy-lifting of signature-secured token data, while the main chain handled the layer-one monetary policy of the token transactions.

So there we have it! With sidechains, you can spread data across an efficient, opt-in P2P network that doesn't force users, services, and node-runners to download parts of a chain that won't be of any use to them. Optimization at its best...


Did you learn anything new from this DevBlog?

Feel free to share your thoughts and feelings. This is a simple overview blog to share some commonly used blockchain infrastructures. I hope you were able to learn some new things and please let me know anything else that you Hivers would like to learn more about!

See ya' in the next blog, friends! 🐱



0
0
0.000
8 comments
avatar

Congratulations @jskitty! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s) :

You got more than 10 replies. Your next target is to reach 50 replies.

You can view your badges on your board And compare to others on the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

To support your work, I also upvoted your post!

Support the HiveBuzz project. Vote for our proposal!
0
0
0.000
avatar

Great article Kitty, I really enjoyed reading this one. As most of us have learned through using the blockchain, especially with blockchain games, it is really a horrible experience to put every single action on the blockchain. It creates a bad experience for everyone all around, even though it's "on the blockchain". Sidechains and side networks (similar to ZENZO's Metadata Network) have shown that there is a better model that allows for the important aspects of blockchain to be kept (validity and immutability), without having to clog the chain, cause users more expensive tx fees, and wait for ridiculous confirmation times. I have never been a believer in a one sizes fits all blockchain, though I'm sure in theory it could be done. By creating specific cases and systems for specific problems in specific industries, I believe this is the future of blockchain for now. Nice article once again and I would really like to understand Hive's overall infrastructure better. If I was aware of it, I could make a nice infographic to help educate other people as well... Keep writing!

0
0
0.000
avatar

With atomic swapping, like Justin Sun was talking about before getting his v.22.2 pie in the face, does each of two chains become a sub-chain of the other?

0
0
0.000
avatar

Very well explained and easy to grasp the concept of such a complex move. Maybe this explains why @dtube Decided to create their own blockchain to avoid future overloading from dapps on the main chain.

Looking forward to learn from your blogs. Thanks

0
0
0.000