This is the first Truebit research & engineering update.

For context on Truebit, please refer to our whitepaper or overview.

WebAssembly in Truebit

Truebit tasks are WebAssembly modules. The architecture allows efficient execution of these modules offchain, and resolves disputes on chain based on state snapshots.

WebAssembly is seeing widespread use in blockchains. As such, we spent a week-long design session with engineers from Ethereum, Parity, and Dfinity towards the end of March. These conversations helped us hone in on core trade-offs around metering, nondeterminism, and integrating with the host environment.

Following up on this collaboration, Truebit ran a session at the WebAssembly Community Group meeting. This annual gathering is where core WebAssembly engineers from Google, Apple, Mozilla, and Microsoft review new proposals and update the spec. In our session, titled WebAssembly in Blockchains (notes here), we presented the requirements of the Blockchain platform as distinct from the Web. We will take part in discussions going forward, and help steer proposals in a direction helpful for blockchains.

Our team also doubled down on efforts to build a community of virtual machine engineers in the Bay Area. We hosted a meetup with Dfinity at the Polychain Capital offices which was attended by a talented group of engineers who are interested in blockchains.

Check out this video from that evening for a deep dive into our WebAssembly architecture.

Truebit and WebAssembly: a Deep Dive into the Architecture

Computation & Dispute-Resolution layers: deployed to testnet

Truebit is a modular system. The computation layer involves a WebAssembly VM running computations offchain and onchain. The dispute resolution layer enables interactive verification games between a solver and challenger. The incentive layer includes the jackpot and forced error mechanism.

Truebit’s modular architecture

In April, we made substantial progress with the contracts handling the computation and dispute-resolution layers:

submitting tasks (link).

processing of Merkle proofs (link).

handling ALU operations of the WASM machine (link).

validating a single instruction onchain (link).

To ensure that the disputed instruction always fits within the Ethereum gas limit, we divide each WebAssembly opcode into phases. A single phase is then run onchain (link).

Truebit tasks can have data passed in directly. In the case of Scrypt verification for the Doge-Ethereum bridge, for instance, the block header fields are provided in the Solidity call.

Tasks can also reference content-addressed locations for data. This allows Task Givers to reference larger inputs that would not fit within a call, but which could be uploaded to a decentralized filesystem. To this end, we implemented an integration with IPFS (link).

The contracts are deployed on the Kovan, Rinkeby, and Ropsten testnets.

Configurable Truebit Client: truebit-os

The Truebit client enables one to become part of the Truebit network; to create tasks, solve them for a reward, or submit challenges.

As a modular system, Truebit is composed of various computation, dispute resolution, and incentive layers. For instance, the Truebit implementation supporting Scrypt verification has the following components:

Computation layer: Scrypt.

Dispute resolution layer: verification game.

Incentive layer: simplified altruistic verifiers.

In contrast, the Truebit architecture in development for Livepeer, one of our first integrations, will have the Truebit WebAssembly virtual machine as its computation layer.

Going forward, we will implement various incentive layers for testing in the wild. These will include the original Truebit (forced errors and jackpots), Truebit Beta (multiple solvers and pairwise verification games as in the overview), or other schemes (explored further in the Truebit token roadmap).

In order to allow us to experiment with different computation, dispute-resolution, and incentive layers, we implemented Truebit OS. It is a configurable client which allows layers as plugins, and has a built-in CLI to enable experimentation and early use. Watch the demo below.

Configurable Truebit Clients: truebit-os demo

The team

We enjoyed connecting with the San Francisco over the last few months. We are now colocating in Berlin to work out of the Full Node for the next two months. Our engineering team will maintain a presence in the Bay Area, and we will be back before long.

To that end, we are hiring and are looking for two additions to the Truebit family:

Please get in touch if you or anyone you know has an interest.

With that, we bid you farewell until the next update!