Truebit Verify Nodes

Please note that during Public Beta, all Truebit Verify Nodes will be hosted by Truebit.

This section serves as a reference to the design of the node software, which will be made available at a future date for the operation of independent nodes.

Nodes provide decentralized execution

The Truebit node serves a dual purpose within the Truebit ecosystem.

  • First, it functions as a "Development Environment" tailored to task developers. This aspect enables developers to build and execute Truebit tasks during their development process. They can safely instrument and test their code locally, ensuring it's readiness before deploying it to the Truebit Verify Hub.

  • Second, the Truebit node can be utilized by the Node Providers seeking to contribute their computer's processing power to the Truebit network. These users have the opportunity to earn incentives by executing tasks for other users on the network.

In essence, the Truebit node accommodates both Task Developers and Node Providers to participate and earn rewards within the Truebit network.

To interact with the Truebit Node, users employ the Truebit CLI (command-line interface) to execute commands.

The Truebit node: Internal components diagram.

Components

http-adapter

The http-adapter service serves as a vital bridge connecting the Truebit node and the task developer.

This crucial component plays the role of an orchestrator, responsibly managing and mediating a diverse array of commands that can be executed within the node by the task developer when building the Tasks.

event-adapter

The event-adapter service serves as a vital bridge connecting the Truebit node and the Verify hub.

When the Truebit node is used by the Node Provider, the event-adapter acts as the communication link between the Truebit node and the Verify hub when executing tasks on behalf of other users.

message broker (message-bus)

Imagine the Message Bus as a super-smart messenger that helps all the different parts of the Truebit node to share information without confusion. It lets services talk to each other, even if they're busy with their own jobs.

When one service has something to say, it just sends a message into the Message-Bus, and the bus makes sure the right service gets it.

wasm-runner

The wasm-runner requests the task to the local code storage based on the received <taskId>. Then, it connects to the wasm-interpreter to execute the Task. Finally, it cleans resouces and shuts itself down.

wasm-instrumenter

The wasm-instrumenter is responsible for instrument Truebit tasks to guarantee a deterministic execution.

filesystem-adapter

The filesystem-adapter service plays a crucial role in our network. Its main responsibility is to manage the flow of tasks between The Truebit node and the Verify hub.

local code storage

The local code storage acts as a secure vault designed to store and manage Truebit tasks efficiently. Each Truebit task is assigned a unique identifier known as a <taskId>. With the local code storage, you can trust that your Truebit tasks are stored safely, making it easy to retrieve and work on them seamlessly.

api-adapter

The api-adapter is used to run API Tasks on a node. It is the one in charge of making the API calls to the defined endpoints.

  • For development, it is used to ensure tasks are working correctly.

  • For production, we rely on the api-adapter service located within the Truebit Verify Hub.

ledger-adapter

The ledger adapter abstracts interaction with the various ledgers from the rest of the Node. This service is the one in charge of communication with the different blockchains

local storage

To make sure the Truebit Verify Hub behaves in a trustworthy way, all the nodes store every message sent to and from the Hub. This way, if something goes wrong, like an incorrect payment to the node, it has all the information needed to dispute it.

All the messages are stored within the folder app/datadb.

The file names are defined as:

${process.env.LOCALSTORE}/${process.env.NODE_ENV}-${process.env.ADDRESS}-eventDB.json

This is the list of stored messages:

Last updated

Was this helpful?