Skip to main content

Coprocessors

Delegating computations to off-chain nodes is a well established way of scaling blockchains. Approaches such as sidechains, plasma and rollups are able to process more transactions over a much smaller node network as they can easily scale in terms of storage, computational power and networking. The off-chain nodes are required to checkpoint data on-chain over regular intervals. This allows third-parties to point out any inconsistencies in the data submitted by the off-chain nodes keeping them in check. However, such designs still maintain a blockchain-esque data structure albeit off-chain.

An obvious extension of such off-chain scaling solutions is to carry out computations off-chain with the same degree of verifiability on-chain but not limit the off-chain data structure to resemble a blockchain. Instead the computational environment can be generalized and resemble any virtual machine (VM) for which appropriate attestations of computations done in them can be generated.

Additional benefits of coprocessors include:

  1. Expressive: A generalized VM allows programmers to be much more expressive. It gives programmers the flexibility to deploy their existing web 2 apps directly in decentralized environments, or write new ones in familiar languages with known design patterns. It provides access to frameworks like TensorFlow, complex math libraries and parallel programming capabilities that would be otherwise unavailable on-chain.

  2. Web 2 APIs: Blockchain applications regularly rely on off-chain inputs (oracles) and actions (liquidations). Similarly, decentralized applications on the blockchain are often exposed to users through frontends that are served through centrally hosted platforms. Coprocessors allow backends to be decentralized and also offer HTTPS support. This enables on-chain interactions for both reading and writing data through trustless gateways.

  3. Blockchain history: Historical data of chains is normally not available to smart contracts as it would require validators to also run archive nodes which would increase the resource requirements to run a validator and hence hinder decentralization. However, several dApps which rely on credit scoring and reputation management can benefit from such data. Coprocessors can provide smart contract applications with trustless access to such data.

Lastly, coprocessors can help abstract out the blockchain and allow decentralized applications to be directly deployed on them. Such a design pattern would allow settlement to happen on-chain for strong security guarantees but provide users with a web 2-like backend for seamless interactions while still being fully decentralized.