State channels allow nodes to communicate with each other off-chain to reduce transaction waiting time and make transactions cheaper. Let's have a look into what these state channels are and how exactly they work for Ethereum
State channels are a method to do off-chain transactions and then post only the initial and final transactions on the main chain.
So in simple words, State channels are a way to use the blockchain less.
Channels allow to transact x no of times off-chain while submitting only the opening and closing transaction to the main Ethereum network.
1. In this the transaction parties create a multisign contract and lock their funds in the channel.
2. Then the opening transaction gets posted on the mainnet and then they transact X no of times.
3. When the transaction gets completed. All the transacting parties sign the multisign contract and then the closing transaction gets posted on the mainnet and then the funds get released.
Channels are beneficial where there are many tiny transactions and the transacting parties have trust in one another.
Pros and cons of channels
Channels have a high throughput rate because of having instant finality ,as soon as the transacting parties signs a state update it is considered final.
But the downside of state channels is that it cannot be automated means that state Channels need 100% availability of all the participants involved
Popular examples of channels are Celer and Raiden network. .
We all have heard about Polygon or Matic . It is a popular Ethereum sidechain
Sidechains can be thought of as a separate blockchain that's connected to the main blockchain via some sort of two-way peg. These chains usually have their own native token and use a consensus mechanism that is different from that used by the main chain (although they can also use proof-of-work). A sidechain is a blockchain that runs in parallel with the main Ethereum chain. The idea behind sidechains is that they allow users to create their own blockchains, and then interact with the Ethereum ecosystem through tokens that can be transferred between chains.
By creating and deploying your own blockchain, you can develop your own applications and smart contracts on it. In order to interact with other apps or use dapps (decentralized applications) built by others, though, you'll need an easy way for those apps to exchange data and assets between chains without having to go through centralized exchanges or platforms like Metamask. That's where cross-chain bridges come in:
A bridge, essentially, connects two different blockchains. This means that anyone can use the bridge to send transactions from one chain to another.
For example, if you wanted to move an asset from Ethereum Mainnet to a sidechain (or vice versa), you could do so by sending it through a bridge.
The bridge acts as an intermediary or relay: It receives a transaction from one blockchain and then broadcasts it to the other blockchain.
Bridges are built on Ethereum and use smart contracts that enable cross-platform data transfers between chains which wouldn’t otherwise be possible. That way both chains get access to each other’s information without compromising their security or privacy settings in any way whatsoever!
In the next part, we will deep dive into the most promising layer 2 scaling solution Rollups.