A new sync for Status.im and Ethereum
Ethereum availability
Status.im with support of Ethereum foundation ordered an investigation on the subject whether it is possible to improve the existing light sync as the fastest protected blockchain synchronization method. The goal was to make a step towards mobile users and bring Ethereum services to mobile and embedded devices.
The issue arose when the Telegram service was banned in Russia. Consequently, the Infura service stopped working for several months and fully stable operations could not be provided. As a result, multiple clients stopped working with Infura or lost some of the service’s functionality.
Blockchain Client Synchronization Issues And Solutions
Blockchains consist of large databases existing on a shared basis among numerous computer systems interconnected by a single network operating on a wide variety of consensus protocols. Though various solutions have been proposed to the major issues of blockchains that are impeding their development, there has not been a single solution that was universally perceived to be a panacea.
The scalability problem has long been considered to be one of the main issues hindering the broader adoption of blockchain-based solutions on a global scale. However, alongside scalability, there is another issue that is just as crucial and labor-intensive on the hardware side of the matter.
Given that blockchains contain near endless arrays of data on countless transactions, the snowball effect created by the compilation of progressive data generation is forcing network-supporting computers to increase their storage drives to accommodate the full dataset of the blockchain. Blockchain client synchronization is a major problem hindering the widespread adoption of blockchain technology based applications. The technical requirements needed for storing the vast amounts of data and the speeds involved for synchronizing the entire chain of blocks on a device for it to properly interact with the network are often ridiculously demanding and cannot be served by the majority of users.
Potential Solutions
There have been proposed solutions to the blockchain client synchronization issue, many of which have been implemented in working applications with varying degrees of success.
Full Sync
Full sync, or full synchronization of the blockchain database is the firstborn method of network operation. The limitations of the approach are evident, as the full data of a network like Bitcoin or Ethereum can take over a month on a desktop computer to reach full sync with all other computers in the system and operate properly.
At the start of synchronization, the receiving device checks which block was the last in the chain, and the following blocks are requested from all connected computers called peers. Next, the blocks are obtained over the network and are verified one by one in the order of their seniority by serial number, thus allowing the transactions in them to be executed. The given sequence changes the balances of users in accordance with the transactions.
The process is automatic, but requires immense amounts of storage space and processing power. The computing requirements for full sync are often unattainable for average users, thus making the approach non-viable for mobile applications and rapid transaction processing.
The security capabilities of full sync have been appreciated over time, as the possession of the entire database makes fraud virtually impossible. Attacks like the 51% attack and other types are also less likely, given the characteristics of the underlying blockchain.
Fast Sync
In an attempt to build a faster system as a counter to the full sync approach, the fast sync solution was proposed and successfully implemented. The approach is just as well protected in terms of security as the full sync approach. The main advantage of fast sync is that the operating device will not be required to download the entire database of the blockchain and the process will take up to a week.
With fast sync, the requesting requests and receives all the blocks, but not each transaction is executed. The block is checked for correctness along with the Merkle tree. Less checks results in faster synchronization, but requires the same amount of disk space and the same amount of data needs to be downloaded from the network
Light Sync
The light client, or light sync, became the next evolution of the syncing process and takes up several dozens of minutes to reach up-to-date status with the blockchain. The approach is considerably more viable for applications on mobile devices.
At its core, the light client approach does not require nodes to run round-the-clock and process data in the blockchain. Under the light sync approach, the nodes use full nodes as intermediaries for communication with the blockchain on transactions, such as transfers and balance requests.
All light clients interact with full nodes on a trust-minimized basis, which foresees the use of full nodes for checking transaction validity and broadcasting them to the main network. In such a way, the full nodes bear the brunt of processing power requirements and receive rewards for their efforts. The security of such an approach is ensured by means of consensus, as any block with at least 10 previously built-on blocks can be considered secure.
The light sync requires the light client to only download the block headers of the blockchain containing the Merkle tree root, which acts as an identifier of all the information stored on the blockchain, such as account balances. Any changes in the blockchain will change this “fingerprint” as well. As such, light clients are required to only check the block headers when communicating with full nodes, thus improving data authenticity.
Infura
Infura is another approach to solving the synchronization issue. The approach proposed by Infura provides instantaneous synchronization of the blockchain, but the infrastructure is limited in its functionality. The limitations resulted in the development of add-ons, which became paid services. In addition, the service operated on unverified servers and a vaguely familiar code.
Infura stated that it provides the tools and infrastructure that allow developers to easily take their blockchain application from testing to scaled deployment with simple and reliable access to Ethereum and IPFS. The Infura API suite provides instant access over HTTPS and WebSockets to the Ethereum and IPFS networks.
Infura is powered by a microservice-driven architecture that dynamically scales to support its APIs. Developers can connect to Ethereum and IPFS via HTTPS and WebSocket, where request-response times are up to 20 times faster than other services and self-hosted solutions. The Infura API suite has access to the latest network updates and maintains service availability during all network changes.
Infura operates via archive nodes that identify full Ethereum nodes operating in archive mode. Full nodes in archive mode compress data in the blockchain to save disk space and thus reduce syncing times along with processing power requirements.
Ultra Light Client
The Ultra Light Client (ULC) is a new approach to synchronization that significantly reduces the time and resources needed for syncing the full Ethereum network chain. The main concept underlying the ULC approach relies on reducing the amount of messages in the interaction with nodes and thus reducing the amount of validation on the client side.
The main advantages of the ULC approach include 10 times faster speeds than those of the light client sync method. ULC does not require code rewriting for integration and exists as an add-on option to the existing light client sync. The ULC is resistant to censorship, as the user determines the servers that they are willing to trust. At the same time, the selected servers do not know that they have been selected by some clients as trusted ones and are thus deprived of human factor interference. The synchronization process takes up to several minutes. ULC is compatible with PoW, PoS and PoA, and is adopted for go-Ethereum code from the Ethereum Foundation.
The ULC is fully protected from DoS attacks, as well as other types of interferences by virtue of its code. A Sybill attack on a ULC is unforeseen as the client is already protected in the classic LES model and only users download block headers with trusted fingerprints from the full nodes they trust.
A Sybill attack on trusted servers is even less probable than even under the LES model, as the attackers will need to hack a significant number of servers to have any effect on the blockchain.
DoS attacks on trusted servers are unlikely with ULC, as it conceals trusted nodes from the users and the users do not send any information unverified by LES to any LES servers, regardless of their trusted on untrusted status. In addition, the servers do not know that they have been chosen as a trusted LES server.
MiTM attacks are prevented, as all transactions must be signed by LES servers and given the fact that servers do not know that they have been chosen as trusted ones, it becomes impossible to select a server for the attack and sign a transaction.
The main guarantees for security provided by ULC rely on two main factors. The first is that the approach reduces probability of failure for the performance of a correct request as a result of failure of remote servers. The second is the lack of requirements for trust towards data incoming from nodes that are unverified or malicious by nature.
Applications of ULC
The ULC has multiple applications within the Ethereum network ecosystem. The ULC acts as another alternative client with more security than Infura and better speeds than the LES. ULC is a middle level solution with backward compatibility to LES and easy integration that takes minutes. More advantages include a higher degree of decentralization and system stability.
The end customers also benefit from the use of the ULC, as there are currently no viable solutions for mobile and embedded devices capable of operating full Ethereum network nodes. ULC may be able to act as such a solution, giving grounds to believe that it will be possible to gradually increase the involvement of new users in various DApps, both in use and under development.
Startups can rely on ULC as a replacement for Infura. The ULC allows projects to retain customers in countries with controlled internet spaces by selecting trusted servers in other countries and guaranteeing full Ethereum availability. The accessibility of the Ethereum API is also ensured, unlike Infura (https://infura.io/docs), which does not give access to the API filters, subscriptions, Swarm, and Whisper.
About The Developer
YourICO.rocks is the developer of the ULC, a small company from Lazada, part of Alibaba. The company is now engaged in developing distributed systems in cryptography and financial sectors.
The company is the developer of a number of applications and services, and is also involved in research and development activities on a variety of decentralized frontiers, such as gaming, exchanges, stablecoins and many others. The company has developed projects on Status, which were the first in the crypto industry. The development team was also among the first to start working with the Ethereum Foundation for joint Status + Ethereum research and subsequent implementation of projects. The ULC is one of the most recent products of the group.