Horizontally Scaling Blockchain Apps with vCPU

Blockchains still face pressing scalability issues due to inherent resource limitations. vCPU is here to change that.

LiquidApps
Oct 14 · 6 min read
Today, LiquidApps introduced vCPU and a fully functional, immortal Chess desktop dApp private testnet concept with PvP and AI.

Scaling blockchains vertically — by requiring validating nodes to add more capacity — raises the barrier to entry for potential miners and block producers, thereby harming network decentralization. Furthermore, resources will always be limited to the maximum capacity of a single machine.

Today, LiquidApps announced the release of vCPU: a way to scale blockchain processing power horizontally, while providing far more computing power per action than native blockchains can provide. vCPU harnesses DAPP Service Providers (DSPs) to execute processing tasks in parallel before returning results that can be compared on chain.

This way, developers can access an exponentially greater supply of decentralized computation, making their applications significantly quicker and more affordable to build.

Clogged Blockchains Were Hampering Adoption, Until Now

Smart contracts, first seriously implemented by Ethereum in 2015, opened up new possibilities for developers to build applications that run without a centralized server. Decentralized applications (dApps) promised to remold the internet by giving users greater control of their own data while unlocking new models of collaboration and exchange.

But processing constraints are preventing most dApps from taking the step from idealistic innovation to true usage.

In late 2017, Ethereum discovered the limitations of its chain as the collectible game CryptoKitties slowed the network to a halt.

EOS was designed as a scalable alternative on which to run dApps, but it is contending with processing challenges of its own. Users stake EOS tokens in order to reserve CPU, a time-denominated resource that measures the amount of time an EOS BP should dedicate to transactions from their account. But they have reported frustrations with CPU capacity running out or behaving erratically. Furthermore, CPU costs for developers may soon increase if the “free bandwidth multiple” is reduced, as was recently proposed by Block.one in response to spam attacks congesting the network’s CPU.

These constraints make it difficult for base-layer networks to handle even a significant volume of token transfers on their own, let alone host computationally-intensive applications. Running a sophisticated game, for example, becomes increasingly expensive as computation requirements increase.

Since DSPs live on a second layer while still running full blockchain nodes, they are able to read requests from the chain, handle computations in parallel, and return the results to the requesting dApp on chain.

To demonstrate the capabilities of vCPU, LiquidApps has released a real-world implementation of the service running within a desktop chess web application on the EOS blockchain. After every chess move, the application must run a series of computations to determine whether the move was legal, the moving player’s king is not in danger, and the game has not been won by any player. In our LiquidChess desktop web app, each move is recorded on chain and processed by the DSPs, who return results that the dApp can compare and verify on chain.

A chess AI is included, as well — running on distributed computing thanks to vCPU.

The game is currently available and does not require any blockchain wallet to run, thanks to the LiquidAccounts service providing free, seamless, non-custodial EOS accounts for dApps.

How Does vCPU Work?

DAPP Service Providers (DSPs) already perform a host of tasks and services on behalf of the developers. Some of the functionality provided by DSPs include:

To provide these and other services, DSPs run a full EOS node in order to deliver results to developers on chain. With the LiquidOracles service, DSPs are tasked with accessing data feeds from across the web and returning the results to the requesting dApp, which compares them on chain in order to weed out incorrect data and prevent collusion. Similarly, DSPs providing vCPU services read on-chain requests, run computation, and return results that are compared and/or verified on chain by the requesting dApp. Every service request sent by a dApp to the DSP is in the form of a blockchain transaction that forms a part of chain history, while every result is compared by the dApp on chain before a final answer is chosen. dApps are encouraged to stake to multiple DSPs to enhance trustlessness and redundancy.

Parallel Processing with Customizable Decentralization

Traditional computing has long utilized parallel processing to deliver quicker results and scale execution. Even within a single CPU, multi-threading allows a computer to split a single task into multiple threads of execution that run concurrently. LiquidApps’ services, vCPU included, take a horizontal approach to scaling blockchain resources.

Thanks to vCPU, blockchain developers can finally take advantage of parallelism to speed up their processing without compromising on decentralization.

dApps can use vCPU to allocate specific tasks to whichever DSP they wish. Large jobs can be broken down and executed by different sets of DSPs, returning results that are combined on chain. It is up to developers to configure the level of decentralization that matches their specific use case.

And since vCPU is fully customizable, dApps have the freedom to choose the level of trustlenessness best suits their use-case. After all, DeFi and banking dApps may require greater levels of decentralization and trustlesness than arcade games. By offloading computation to DSPs on a second layer while returning the results back to the requesting dApp on chain, vCPU gives developers access to scalable decentralized computation, which can allow previously-inconceivable dApps to emerge.

More Power Than Ever Before

Every blockchain has limits on the computation available per action. Whether this is reflected as a limit on nested actions, a hard execution time limit such as EOS’s 30 milliseconds of CPU time per action, or some other restriction, dApps simply cannot perform more complex computation in a trustless way — until now.

With vCPU’s ability to run contract code beyond the constraints of the actual blockchain node software, whole new scopes of computational power become available to dApps. Complex math and data operations, artificial intelligence operations, and machine learning become possible. DApps could fight bias and compromise by using multiple DAPP Service Providers and comparing or averaging the results as appropriate.

LiquidChess allows for desktop users to engage in player vs. player and in player vs. AI running on vCPU. Future implementations could even allow AI creators to pit their algorithms against each other. Ever since IBM’s Deep Blue stunningly defeated world chess champion Gary Kasparov, AI chess has captured the imagination of both the scientific community and millions of globally distributed enthusiasts. With machine chess players now dominating their human counterparts, vCPU could enable these chess AIs to battle for supremacy with the trustlessness and transparency characteristic of dApps, allowing for provably fair battles.

Although plenty of intense computational tasks do not require trustlessness, some may. Consider these examples:

  • Keeping data-based prediction models for elections and other events honest,
  • analyzing criminal evidence without fear of human tampering with the resultant data, and
  • unbiased distribution or partitioning of resources or land according to a transparent ruleset

In all of these situations, decentralization may be desirable. With vCPU and multiple DSPs, dApps now have access to this new realm of computation, unlocking an entirely new category of trustless application.

Building dApps that are indistinguishable from traditional applications in terms of usability and speed is a prerequisite to mass adoption of blockchain technology. With their latest release of the vCPU service along with a real-world desktop implementation in LiquidChess, LiquidApps has moved the needle on scalability by exponentially increasing the decentralized processing power and capacity available to dApp developers.

Play LiquidChess now on your computer!

Follow LiquidApps

Website | Twitter | Telegram | LinkedIn | Github

Please click here to read an important disclaimer.

The LiquidApps Blog

Designing tools for building and scaling the dApps of the future.

LiquidApps

Written by

LiquidApps aims to optimize development on the blockchain by equipping developers with a range of products for building and scaling dApps.

The LiquidApps Blog

Designing tools for building and scaling the dApps of the future.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade