7 releases

0.2.0-alpha.7 Dec 11, 2023
0.2.0-alpha.6 Dec 8, 2023
0.2.0-alpha.4 Nov 28, 2023
0.2.0-alpha.3 Oct 23, 2023
0.1.7 Sep 6, 2022

#4 in #phala

Download history 31/week @ 2024-07-19 37/week @ 2024-07-26 22/week @ 2024-08-02 18/week @ 2024-08-09 14/week @ 2024-08-16 20/week @ 2024-08-23 24/week @ 2024-08-30 13/week @ 2024-09-06 24/week @ 2024-09-13 25/week @ 2024-09-20 40/week @ 2024-09-27 12/week @ 2024-10-04 18/week @ 2024-10-11 13/week @ 2024-10-18 8/week @ 2024-10-25 15/week @ 2024-11-01

55 downloads per month
Used in 7 crates (3 directly)

Apache-2.0

53KB
1.5K SLoC

Phala Blockchain

Build

Phala Network is the offchain computing protocol, powering the decentralized execution layer for AI agents.

Native Build

Dependencies

Expand
  • System dependencies

    • Ubuntu (tested with 22.04)
    apt install -y build-essential pkg-config libssl-dev protobuf-compiler
    
    • macOS
    brew install protobuf
    
    • See here for more protobuf installation options
  • Rust

    curl https://sh.rustup.rs -sSf | sh
    
  • Substrate dependencies:

    git submodule update --init
    sh ./scripts/init.sh
    
  • LLVM 14

    wget https://apt.llvm.org/llvm.sh
    chmod +x llvm.sh
    ./llvm.sh 14
    

Build the blockchain and bridge

Make sure you have Rust and LLVM-10 installed.

Note for Mac users: you also need llvm and binutils from Homebrew or MacPort, and to add their binaries to your $PATH

Run git submodule update --init to fetch submodules before build if you haven't add option --recursive when clone code.

cargo build --release

The build script enforces LLVM-10 or newer is used. LLVM-10 is needed because of the wasm port of rust crypto library, ring. We have to compile the C code into wasm while keeping the compatibility with the current rustc.

Run

Please refer to the run scripts

Sub-pages

  • RPC: RPC documentations
  • Test: How to test the components

External Resources


lib.rs:

Tools for writing Sidevm programs.

Dependencies

~6.5MB
~140K SLoC