Docs

Discover how Phala's AI Agent Contract offers the essential tools to develop and profit from intelligent applications.

Explore Now

Phala Network: 5 Years of Pioneering TEE Verifier Solutions

2024-07-31

TL;DR

Phala Network is revolutionizing the tech industry by combining blockchain and AI with its innovative Trusted Execution Environment (TEE) technology. TEEs ensure sensitive computations are securely isolated, offering unmatched security, verifiability, and privacy. By integrating TEE into its infrastructure, Phala Network is setting new standards for decentralized computing and protecting the proprietary data sent for inference LLM.

Phala Network's unique hybrid blockchain TEE design makes it a leader in secure, verifiable computing solutions. This approach addresses privacy, data integrity, and computational verifiability by securely merging AI with blockchain. With over 30,000 TEE devices, Phala's infrastructure is the first of its kind at this scale, paving the way for the future of decentralized and secure computation in Web3 while addressing LLM privacy concerns.

Leading TEE for 5 years built from ground up to make blockchain secure and verifiable

Phala Network has been at the forefront of TEE technology for over five years, continuously evolving to meet the demands of the blockchain space. Initially developed as Phat Contracts, the technology has advanced into AI Agent Contracts, enhancing the capabilities of Ethereum Virtual Machine (EVM) smart contracts. By incorporating zero-knowledge proofs (ZKPs) and supporting fully homomorphic encryption (FHE) coprocessors, Phala ensures robust security and verifiability for any project. This commitment to innovation underscores Phala’s leadership in providing secure, scalable, and verifiable computation solutions in the decentralized web ecosystem, addressing data privacy AGI concerns.

Messari: Phala Network TEE Explained

DFG Global: The Intersection of AI & DePIN

IoTEX: DePIN Scan

How Phala's Blockchain-TEE Works

Phala Network utilizes a hybrid blockchain TEE design to address the complexities of integrating AI with blockchain, while ensuring security and privacy, especially when protecting the proprietary data sent for inference LLM.

Here’s a detailed look at how Phala’s Blockchain-TEE operates:

Decentralized Confidential Computing Network

Phala Network positions itself as an AI coprocessor, acting as a backend host that provides scalable blockchain technology. By leveraging TEE, Phala ensures secure and verifiable computation. This hybrid setup combines the decentralized nature of blockchain with the secure computation capabilities of TEEs, allowing Phala to offer a decentralized cloud network where computation tasks are executed in a trust-minimized environment.

TEE (Intel SGX) Framework

At the core of Phala’s TEE framework is Intel’s Software Guard Extensions (SGX). This technology ensures that code execution happens within an isolated, hardware-protected area of a processor. SGX protects the data from external access or tampering, even from higher-privileged system processes.

AI Agent Contracts

Phala’s AI Agent Contracts helps bridges the gap between smart contracts and AI models by enabling them to be compatible with Ethereum Virtual Machine (EVM) smart contracts by enabling them to control AI agents that operate offchain. These contracts, written in TypeScript or JavaScript, are executed securely and privately by Phala nodes operating within TEEs. This setup not only enhances security but also facilitates complex AI tasks by integrating offchain data and computation, ensuring data privacy AGI.

Worker Nodes

TEE adoption in numbers

Dune Analytics:
Dune Analytics: TEE Adoption

How it works?

Worker nodes are the backbone of Phala’s decentralized network. These nodes perform offchain computations within TEEs, ensuring the integrity and privacy of the executed tasks. The key component here is pRuntime (Phala Runtime), a program running inside the TEE that handles computational tasks received from the blockchain. The steps involved include:

  1. Publication: Developers publish AI Agent Contracts onchain.
  1. Fetching and Verification: pRuntime fetches the contract code and verifies it through a built-in light client.
  1. Execution: The code is executed offchain inside the TEE and the stats of the contract is saved on Phala Blockchain.
  1. Proof Generation: The TEE generates a proof of execution, verified onchain.

This process guarantees that all computations are tamperproof and secure, maintaining a high level of trust and integrity. Furthermore, we’re launching pRuntime V3 with 5-10x CPU efficiency and gigabytes of memory. Supporting novel TEE environments like confidential virtual machines and containers enhancing CPU TEE performance and developer experience.

Gatekeepers

Phala’s network includes special worker nodes called Gatekeepers, responsible for managing encryption keys and ensuring the secure distribution of these keys among worker nodes. This ensures that even if some nodes exit the network or are compromised, the security and integrity of the overall system remain intact.

Multi-Proof System

Phala employs a multi-proof system that combines TEE proofs with cryptographic proofs like zero-knowledge proofs (ZKPs) and can enable blockchain projects build fully homomorphic encryption (FHE) coprocessor with our development stack. This hybrid approach enhances the security and verifiability of the computations while reducing costs and complexity compared to traditional methods.

  • zkDCAP Verifier: A zero-knowledge-based onchain TEE proofs verifier.
  • zkDCAP Verifier: A zero-knowledge-based DCAP verification module that make the remote attestation on Ethereum possible
  • TEE-Proof: Developers can generate TEE proof by derive a key in their contract, the key can be secure saved in TEE env.

By integrating these technologies, Phala ensures robust security and integrity of the computation processes, making it a cost-effective and reliable solution for various applications. We are also working on improving Phala’s Trustless AI Coprocessor Network by combining cryptographic proofs, including ZKP, MPC, and FHE; updating SGX DCAP into all workers; and releasing Tokenomics 2.0.

A First of Its Kind at Scale

Phala Network's blockchain TEE infrastructure is truly cutting-edge. It represents the first large-scale deployment of a hybrid blockchain and TEE system, integrating over 30,000+ TEE devices. This scale is unprecedented in the industry, providing a robust and secure platform for decentralized applications that require high levels of security and privacy.

Phala’s innovative approach enables a wide range of applications, from AI model training to secure data processing, all within a verifiable and tamperproof environment. Phala's infrastructure processed 849,000 offchain queries in 2023, showcasing its capacity and efficiency. In comparison, Ethereum processed 1.1 million onchain transactions in the same period, highlighting Phala's significant throughput.

Phala’s network includes more than 4,000 AI Agent Contracts and over 30,000 worker nodes, demonstrating its extensive reach and capability. This unique infrastructure not only ensures the integrity and confidentiality of computations but also sets a new benchmark for the industry, demonstrating the immense potential of combining blockchain with TEE technology.

Future Directions: Confidential GPUs

Phala Network is pioneering the integration of confidential GPUs, further enhancing the capabilities and security of its TEE infrastructure. Confidential GPUs, such as NVIDIA's H100 Tensor Core GPUs, provide a hardware-based solution that can operate alongside any cryptographic algorithm. This technology enhances the integrity and confidentiality of compute-intensive tasks such as AI model training and inference, protecting sensitive data and AI models from unauthorized access and tampering.

NVIDIA's confidential computing capabilities ensure that data and applications remain secure, even in virtualized environments or the cloud. This is achieved through hardware-based isolation and encryption, which prevent unauthorized access to data during processing. The integration of confidential GPUs into Phala's network will enable more secure and efficient handling of large language models (LLMs) and other AI workloads.

In our next blog, we will delve deeper into how Phala Network is building this cutting-edge GPU TEE network and the transformative impact it promises for the future of secure computation.

About Phala

Phala Network is a decentralized cloud that offers secure and scalable computing for Web3.

With Phat Contracts, an innovative programming model enabling trustless off-chain computation, developers can create new Web3 use cases.

Get the latest Phala Content Straight To Your Inbox.