7 releases

0.2.0-alpha.7 Dec 11, 2023
0.2.0-alpha.3 Oct 23, 2023
0.2.0-alpha.2 Aug 25, 2023
0.2.0-alpha.1 Aug 24, 2023
0.1.1 Sep 6, 2022

#4 in #sidevm

Download history 29/week @ 2024-07-22 23/week @ 2024-07-29 28/week @ 2024-08-05 17/week @ 2024-08-12 15/week @ 2024-08-19 43/week @ 2024-08-26 10/week @ 2024-09-02 15/week @ 2024-09-09 27/week @ 2024-09-16 27/week @ 2024-09-23 37/week @ 2024-09-30 10/week @ 2024-10-07 15/week @ 2024-10-14 18/week @ 2024-10-21 12/week @ 2024-10-28 14/week @ 2024-11-04

59 downloads per month
Used in 8 crates (2 directly)

Apache-2.0

20KB
490 lines

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

Dependencies

~3.5MB
~78K SLoC