How does Truebit work?
Last updated
Was this helpful?
Last updated
Was this helpful?
A crucial concept we have is the , comparable to an AWS Lambda function but with unique properties. Once you write your Truebit Task code, you deploy it into the . Afterward, we make that task code available for execution across a decentralized network known as .
The request triggers a Task execution on our nodes, and we verify it. Following this process, we provide you with two essential outcomes:
First, you get the results, the output of your function call.
How your code was executed
Which code was executed
Who executed it
The steps of verification taken.
This transcript serves as a durable record, assuring you that the output can be trusted.
Verification is a straightforward concept. When you're unsure about who's running your task, the most reliable approach is to have multiple individuals run the same job. If they all produce the same result, it provides certainty that your code ran correctly and the results are accurate.
Verification is the protocol we establish to achieve this. When you execute a Truebit task, we distribute the job in parallel to multiple nodes. In the illustration, three nodes simultaneously run the task and send their results back in real time to our verification hub. If the results match, we conclude that, at face value, the job appears to be verified.
However, if one node provides a different result, we engage in the Truebit verification game. We delve into the machine code level, as Truebit tasks operate within the WebAssembly architecture. We meticulously step through the code to identify which node executed it incorrectly. Once identified, we determine which nodes are correct and which node is incorrect. We can also pinpoint where the execution went awry. This process establishes an economic structure behind the scenes, ensuring good behavior by all nodes. If a node executes incorrectly, it incurs penalties.
Last but not least, after the initial verification, which, under normal circumstances, works seamlessly around 99.99% of the time, we conduct a second check. This check is to ensure that even if things seem to have gone correctly, there's a possibility of misbehavior in the Truebit system itself. To address this, we introduce an audit through the blockchain. This audit empowers all nodes to provide a check and balance of the hub's activity.
The initial verification that confirms the results' validity then undergoes finalization and certification during this audit stage. If any issues arise, a protocol is in place to resolve them. However, in most cases, everything operates smoothly, and you quickly receive a final, fully certified transcript back into the system.
The makes a request (We expose your Truebit task as a web services API).
Second, you receive a detailing exactly
Click to read more about Verification
Click to read more about the Truebit Certified Transcript