Hackernoon logoTrueBit Review — Secure, Scalable, Decentralized Computation for Blockchain by@coincrunchio

TrueBit Review — Secure, Scalable, Decentralized Computation for Blockchain

Coin Crunch Hacker Noon profile picture

@coincrunchioCoin Crunch

TrueBit Protocol is a cryptocurrency initiative that’s bringing scalable computation to blockchains. They provide scalable off-chain computation for Ethereum using the TrueBit Protocol.

Problem

Currently, the computational power on the Ethereum network is limited due to several factors. The concept of gas and gas limits are the ones that prevents large and complex computations and code from being allowed on-chain.

  • Ethereum meters smart contract storage and compute resources with gas.
  • A gas limit (the amount of gas allowed per block) is set in place to limit the size and amount of transactions that can happen within a block.

What is the purpose of the gas limit?

  • The gas limit prevents denial-of-service attacks
  • All miners must replicate every Ethereum computation, so in the event of a massive computation, it would require every single miner to replicate that massive computation.
  • The gas limit helps incentivize transaction verification
  • The gas limit prevents “Verifier’s Dilemma”

The Verifier’s Dilemma:

Situation: Sia puts up a huge transaction and gives an incentive by attaching a really big transaction fee to attract miners.

Miner A, who just mined the block, sees the transaction and says, “Wow that’s a huge incentive, I’ll include that in my block!”

Miner B, Miner C, Miner D, and Miner E looks at the transaction and enters a state of dilemma called, “Verifier’s Dilemma.”

Miners B, C, D, and E are faced with 2 options:

Option 1: Verify the massive transaction which causes these 4 miners to stay behind in the mining race.

Option 2: Skip the verification, but end up mining on the wrong chain, and no miners will follow.

In Summary: Computation on the Ethereum network is limited by the block gas limit. Without a proper solution, this could potentially render many future applications too costly to operate or infeasible. With the eventual growth in complexion to DApps and smart contracts, the network will need a solution to on-board these big smart contracts, as well as compute them at a lower cost and higher efficiency.

Video Interview with Truebit Founder Jason Teutsch:

Solution

TrueBit solves this problem by harnessing the power of off-blockchain computers to verify computations, what is called the Truebit Protocol — utilizing their API called ‘createTask’ on the TrueBit smart contract.

TrueBit is all about outsourcing heavy computations. An example may be that a complex code will require hundreds of hours of computing, instead of having every node process those hours of computing, a protocol will ensure the result matches the algorithm output. The computations are done outside of the blockchain, and only the verified final result is then sent to the blockchain.

TrueBit’s solution to solving larger computes, is the creation of an off-chain protocol and having a single solver process the large code.

A pool of verifiers would volunteer to offer verification services and processing to then approve the work of the solver.

Example of current situation: A code is sent on-chain, and all 100,000 nodes must process and solve that code on-chain.

Example of proposed situation: A code is sent off-chain, and only one person processes, and solves that code. A handful would then be verifying.

The result is much cheaper transaction fees, ability to process bigger computations, and lower usage of processing power on-chain.

Main Features — Tech Overview

TrueBit’s Verification Game:

The step by step process of how the protocol works is as follows:

Step 1: Dan the Developer uploads a big code and offers a reward to the solver in the off-chain market.

  • The cost to put it up and pay the solver in the off-chain market is lower than the cost to actually run the code on Ethereum.

Step 2: A Solver submits a deposit (the deposit is in the event that a dispute occurs), then runs the computation and posts the results back on the off-chain market.

Step 3: Any number of verifiers may also run the computation to verify that the answer and results are correct.

Step 4: After a set period of time, if there are no disputes or challenges, the answer is then, “accepted”, and the solver receives his payment as well as gets his deposit returned.

What happens when there’s a challenge?

When a verifier challenges the results of a solver, the adjudication system begins and the on-chain miners become the judge.

The issue is then narrowed down by binary search.

In the fig. above we see that, the dispute is about a computational program of 1,000,000 steps. Both the parties compute and submit Merkle tree of full state (memory) at Step 1, Step 500,000, Step 750,000, Step 625,000 and so on. After 20 rounds, agreement changes to disagreement in one step (Step 638,295 to Step 638,296). Both submits the Merkle proof and smart contract verifies (re-compute just a single step) with no effort and finds the cheater. It took 20 rounds which is very small in comparison to 1,000,000 rounds and hence faster on chain than actually doing all the computation.

The on-chain miners would only have to determine whether the solver or the verifier is correct within a few rounds, rather than 1,000,000 steps.

If the Solver is correct: The Solver will claim the reward, and the Verifier will lose their deposit for raising a, “false alarm.”

If the Verifier is correct: The Verifier will claim the reward, and the Solver will lose their deposit for posting the incorrect result.

This thus makes TrueBit a Unanimous Consensus Protocol.

  • If an honest verifier disagrees (after checking the computation), then they can post it on the blockchain and can outrule anyone if stands correct. It helps prevent attack by 99.9%. Single honest verifier suffices that nobody can cheat.
  • The honest actor will always win this game. Presence of honest verifier is ensured by economic incentives mechanism.

A problem that arises from a solver being obliged to always producing the correct result and being honest, is that, over the course of time, it could demotivate verifies from offering verification services and processing power, because they know that the solver has no incentives to be dishonest.

To keep the verifiers incentivized, TrueBit introduces the concept of Forced Error.

The concept of forced error, is that at random intervals, the TrueBit server would submit an incorrect solution. Verifiers who find these incorrect solutions would then win a jackpot.

This creates mutual incentives for solvers and verifiers across the protocol.

In Summary: In the TrueBit protocol, an interactive ‘verification game’ will decides whether or not a contested computational task was performed correctly.

The verification game will go through a series of rounds, with each round recursively checking smaller and smaller subsets of the computations. Empowering anyone on the network to verify, compute or generate task in exchange for rewards.

Roadmap

Nothing announced as of April 12, 2018.

Token Mechanics

TrueBit’s TRU tokens will be the form of payment used within the protocol to pay verifiers, adjudicators, and solvers. The primary function of TRU is to reward Verifiers for correctly performing computational tasks. The tokens will also be used to make initial deposits that all verifiers and solvers must do, to prevent bad actors.

Jackpot Repository

Given that a self-sustaining system for incentivizing verifiers must exist, the TrueBit protocol has a verification tax.

Any Task Giver that calls a TrueBit contract must pay not only the cost of computational work done by the Solver but also for the work done by the Verifier(s), as well as the work done by Referees and Judges.

Burn-and-Mint system

Although the preliminary incarnation of TrueBit will inhabit Ethereum’s blockchain, one may adapt it for other ecosystems as well.

Users will have the ability to transfer TRU tokens by burning them on one blockchain while minting them on another

  • This enables universal scalability
  • This offers local autonomy benefits and cross-chain symmetry.

Team + Advisors

Jason Teutsch — Founder
  • PhD in Mathematics
  • Has held postdoctoral positions at National University of Singapore, Penn State, and Universität Heidelberg
  • Has held research positions at think tanks RAND and IDA, and multiple Fulbright fellowships.
  • His work has anticipated the SmartPool project as well as network failure on Bitcoin.
Christian Reitwiessner — Whitepaper Co-Author
  • Team Lead at Ethereum
  • Led the Ethereum project’s Solidity team in developing the smart contract language.
  • Led the development of cpp-ethereum, a client application required to run the network.
Robbie Bent— Chief Operating Officer
  • Has deep experience in building technical teams
  • Obsessed with building products that improve the scalability of smart contract platforms as well as growing a scalable, open source community.
  • Co-Founder and Chief Operating Officer of INVI Energy.
  • Chief Operating Officer of Roamly.

Additional Resources:

This article was originally featured on our website! You can find it here.

For the best in news, reviews, and information for the blockchain and cryptocurrency visit coincrunch.io or check us out on: Youtube | Twitter | FacebookReddit

Tags

Join Hacker Noon

Create your free account to unlock your custom reading experience.