Giter Club home page Giter Club logo

phala-blockchain's Introduction

Phala Blockchain

Funded by the web3 foundation

Rust

Phala Network is a decentralized offchain computing protocol aiming to build the Web3 Cloud. This repo includes:

  • node/: the main development blockchain built on Substrate
  • standalone/pherry/: the message relayer to connect the blockchain and pRuntime
  • standalone/pruntime/: the contract execution kernel running inside TEE enclave

Overview

The blockchain is the central component of the system. It records commands (confidential contract invocation), serves as the pRuntime registry, runs the native token and on-chain governance modules.

pherry is the message relayer. It connects the blockchain and pRuntime. It passes the block data from the chain to pRuntime and passes pRuntime side effects back to the chain. A multi-client version of the runtime bridge is being developed here and now in alpha version.

pRuntime (Phala Network Secure Enclave Runtime) is a runtime to execute confidential smart contracts, based on confidential computing.

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

phala-blockchain's People

Contributors

kvinwang avatar h4x3rotab avatar jasl avatar leechael avatar shelvenzhou avatar tolak avatar soptq avatar index0011 avatar goldenfiredo avatar dependabot[bot] avatar blocktink avatar guigou12358 avatar mondaylord avatar krhougs avatar baidang201 avatar nanometerzhu avatar kichjang avatar kureus avatar bernardoaraujor avatar kingsleydon avatar pacoyang avatar hauni97 avatar vabaly avatar vinhbhn avatar anonymous-hentai avatar wenfengwang1213 avatar hashwarlock avatar lucasliu2022 avatar pymongo avatar tenheadedlion avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.