Ripple Xpring: How to achieve separation of blockchain scalability and interoperability?
This article is produced by Ripple's eco-incubator Xpring and is compiled exclusively by Encrypted Valley . Author Evan Schwartz is the co-founder of Interledger and a Principal Engineer at Xpring.
Layer 2 technologies such as Lightning Networks and Plasma are expected to make significant advances in the scalability, interoperability and functionality of the blockchain. However, most of the Layer 2 projects focus on scalability and less on interoperability. why?
This is not only a problem at the development stage. In essence, this is because the purpose of Layer 2 is to expand, and Layer 3 is focused on the interoperability level.
Scalability and interoperability are complementary, but at the same time they are independent of each other and are best addressed by different protocol layers. To illustrate this problem, we will introduce some of the purposes of the protocol hierarchy and the role of Layer 1, 2, and 3 in it. Second, we will also explain how to differentiate scalability and interoperability to improve both solutions and pave the way for the development of value Internet.
Purpose of protocol layering
Direct multiple independent issues to a complex, interdependent solution. In most cases it is a bad idea.
The Internet is the best example of a protocol hierarchy that is a key factor in the development and usability of the Internet. Different functional segments are split into separate protocols that are built together rather than bundled into a single system.
For example, IP (Internet Protocol) is built on different underlying network technologies or "link layer" protocols such as Ethernet and WiFi. Because IP is designed as a separate layer, it is not tied to any particular network technology and can work in the same way on many different types of wired or wireless connections.
The "hourglass" structure of the Internet: IP abstracts the differences between the underlying network and the applications built on it.
The protocol hierarchy provides a number of important benefits:
- Interoperability – By abstracting the differences between them, IP can work across many different network technologies. As long as a link can send data, IP can communicate through it. This means that no matter what type of underlying network we use, we can seamlessly connect.
- Upgradability – Abstraction allows different layers to evolve separately. Although the Internet was born in the 1970s, in fact, IP has been able to upgrade from dial-up to fiber and 4G by abstracting different network technologies. Higher level protocols do not need to be changed, but as new network technologies evolve, our connections will become faster and faster.
Layering is an important design tool for the information Internet and value Internet, but determining which features are appropriate for which layers is the most difficult part. Too many layers can make the system too complicated, but too much bundling can interfere with interoperability and scalability.
- A versatile, universal infrastructure – IP is also independent of any particular use case, which allows the same infrastructure to be used for applications from the Web to email and voice over IP (VoIP). If the Internet is specifically built for file transfer, we may need to build a complete, stand-alone network for each different use case. Instead, we have a single internet that can be used for many types of communication.
Value internet protocol stack
The Interledger protocol stack has direct similarities to the Internet Protocol suite, largely because we have found that dividing functionality into similar layers helps solve problems. Here, we'll take a brief look at each layer and their roles, and show the benefits of focusing Layer 3 on interoperability.
Interledger Protocol (ILP) connects and abstracts the differences between Layer 2 technologies
Blockchains and other types of ledgers are like physical cables that support the Internet. Digital communications are ultimately achieved through wired and wireless links that connect devices and transfer data between them. Ledgers are also the basis of the value of the Internet, which makes it possible for two people to accept the same asset or to hold the same account in the same system for trading.
Just like a physical cable, the ledger and blockchain need to establish additional protocols on it to facilitate the exchange of data or currency. For blockchains, the main problem is to increase transaction throughput and reduce latency while maintaining decentralization.
The ledger is logically centralized, so it is destined to become a performance bottleneck. Whether the ledger is maintained in a centralized or decentralized manner, it requires a unified, shared account and balance status to ensure that funds are not “double spent”. Updating a large number of shared states is expensive and slow. The constraint may be the speed of consensus in the distributed books, or the performance of a single machine that centralizes the ledger.
It is useful to improve the scalability of the ledger, but moving the normal and repetitive transactions out of the main ledger using the Layer 2 protocol will increase throughput and reduce latency to a greater extent.
Layer 2 is a solution for extending blockchains, similar to the link layer protocols of the Internet stack, such as Ethernet and WiFi. This layer creates bilateral links or LANs (LANs) that allow directly connected parties or devices to communicate more efficiently on the underlying network.
The blockchain's Layer 2 technology is designed to enable fast, low-cost, and high-throughput transactions at the bottom level through a programmatic managed form. This category includes a variety of bilateral technologies (such as payment channels and generalized state channels) and multilateral solutions (such as lightning networks, Raiden, sidechains, and Plasma). By allowing pairs or smaller account holders to trade without having to interact with the main ledger each time, making the transaction faster and cheaper.
The core mechanism of the Layer 2 solution is a programmatic managed form. Assets are first deposited in holding accounts, scripts or smart contracts on the main ledger. Participants can then perform a large number of fast transactions by updating their local state to change the allocation of managed assets. When the parties want to end their interaction, they submit the final status to the primary ledger, which checks its validity and allocates the managed assets accordingly.
Importantly, the features provided by the underlying ledger directly determine the type of functionality that the Layer 2 system can include because the ledgers support different types of programmatic hosting.
Layer 2 solutions must be tied to certain ledgers because they take advantage of specific features in the underlying Layer 1 system.
That's why Lightning Networks is defined with BTC scripts, Raiden uses a specific Ethereum smart contract, and Plasma's implementation also uses the specified smart contract. Lightning networks can work with specific BTC forks (such as LTC) to support SegWit, while Raiden and Plasma can work with other blockchains that use Ethereum virtual machines. However, if they try to support a ledger with a large number of different feature sets (for example, a lightning network that does not use SegWit or a Plasma that uses only BTC scripts), then each Layer 2 technology will become very bad.
However, this is no problem at all! The Layer 2 extension solution can (and should) take advantage of every feature provided by the underlying ledger.
The close relationship between Layer 1 and Layer 2 is why we need a separate layer to achieve interoperability. True interoperability is all about abstraction and requires minimizing the set of features used by the protocol. The less functionality the interoperability layer expects for the underlying network, the more heterogeneous networks it can connect to. Since the Layer 2 solution can take advantage of Layer 1 specific features, we need a separate layer for interoperability, using as few specific functions as possible for the ledger.
Layer 3: Interoperability
The purpose of Layer 3 is to abstract the differences between the different Layer 1 and Layer 2 technologies to connect to completely different types of networks. This is the role of the Internet Protocol (IP) on the Internet and the role of the Interledger Protocol (ILP) on the value Internet.
The core protocol of the Internet stack, IP, transmits packets over the network while abstracting the differences between the underlying telecommunications technologies. The Internet has succeeded because it uses such clear abstractions that it can connect everything from phone lines to cellular mobile networks to satellite networks and dedicated fiber-optic cables.
The only thing IP needs for the underlying network is the ability to send data. It does not depend on any additional features, or even speed or reliability. Because of its simple abstraction, IP creates a common network that connects more than half of the population.
In the value Internet, ILP packs value like packaged data. It transmits funds packages over the network while abstracting out assets and ledgers, as well as the differences with Layer 2 technology. Like IP, the core of ILP is the network-independent packet and address format.
The only requirement for the underlying ILP is to be able to send funds. It does not require any special transaction types, features or programmatic hosting. Faster, cheaper transactions can improve the user experience, but even these are not strictly required.
ILP's minimal abstraction supports interoperability with all types of Layer 1 and Layer 2 networks, including those that are not designed to interoperate. So far, it has been used to connect the three different Layer 2 systems of BTC Lightning Network, bilateral Ethereum payment channels and XRP payment channels. Work is in progress to connect all other types of Layer 1 and Layer 2 systems.
Layer 4 and Layer 5 are not the focus of this article, but you can read STREAM by reading STREAMing Money and Data Over ILP, which is a Layer 4 transport protocol inspired by QUIC.
- The smallest abstraction on the Layer 2 network
Summary: Separation of scalability and interoperability is key
Scalability and interoperability are complementary, but they are essentially different types of problems and are best addressed by a separate protocol layer. Scalability solutions such as Lightning and Plasma work best when leveraging all the features provided by their underlying ledger. In contrast, interoperability protocols, such as Interledger, require minimal abstraction to work across different types of underlying networks.
A subtle benefit of separating the link layer from the interoperability layer is that the Internet is still evolving. Internet protocols are designed for space-sized computers, but they still apply to mobile phones and IoT devices. It also allows for significant improvements in the underlying technology by reducing the IP characteristics required for the underlying network. This is not possible if the IP is built on a specific feature or API of the network at development time.
By abstracting the differences between Layer 1, Layer 2 and Layer 3, we can build a better user experience. At the same time, given the future development, this will make the value of the Internet faster, cheaper and more efficient.
Added: Which is better for bilateral and multilateral Layer 2 programs, which is an interesting open question. The Internet stack is also strikingly similar, and we believe that the Internet should be built on bilateral links rather than LANs.
The content is for reference only, not as an investment recommendation.
Copyright is strictly prohibited without permission