Truebit Verify
  • Getting Started
    • 📄What is Truebit Verify?
      • How does Truebit work?
      • System Actors
    • ⏱️Get Started
    • ⚙️Architecture
      • Truebit Verify Hub
      • Truebit Verify Nodes
      • What is a transcript?
        • Transcript example
        • API Transcript example
    • Key Concepts
      • What is verification?
      • Determinism
      • WebAssembly
      • Task instrumentation
  • Developing Truebit Tasks
    • Introduction
    • Writing Function Tasks
      • Supported languages
        • Javascript
        • Python
        • Rust
    • Writing API Tasks
    • Task examples
      • Function Task examples
        • Fibonacci
        • Reverse Alphabet
        • Encrypt sha256 using bun.js
        • Encrypt sha256 using Deno
        • ECDSA signature verification
        • NumPy example
      • API Task examples
        • Pet Store CRUD
        • API-Auth examples
    • Namespace management
    • Task Authorization
    • Truebit CLI
      • secret.json
  • Executing Truebit tasks
    • Introduction
    • Task Execution API
      • Execute Function Tasks
      • Execute API Tasks
      • Get Task Status
    • Transcript API
      • Get Transcript
      • Get Invoice
  • Community
    • Truebit Unchained Protocol
    • Support
Powered by GitBook
On this page
  • Nodes provide decentralized execution
  • Components
  • http-adapter
  • event-adapter
  • message broker (message-bus)
  • wasm-runner
  • wasm-instrumenter
  • filesystem-adapter
  • local code storage
  • api-adapter
  • ledger-adapter
  • local storage

Was this helpful?

  1. Getting Started
  2. ⚙️Architecture

Truebit Verify Nodes

PreviousTruebit Verify HubNextWhat is a transcript?

Last updated 2 months ago

Was this helpful?

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 . This aspect enables developers to and Truebit tasks during their development process. They can safely instrument and test their code locally, ensuring it's readiness before it to the Truebit Verify Hub.

  • Second, the Truebit node can be utilized by the 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.

Components

http-adapter

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:

  • invoice (Only for Function Tasks execution)

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

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 when building the Tasks.

task developer
task developer
task developers
Node Providers
build
execute
deploying
The Truebit node: Internal components diagram.
task_created
node_outcome
computed_outcome