Project-TOEP

所属分类:区块链开发
开发工具:Rust
文件大小:0KB
下载次数:0
上传日期:2023-08-06 02:04:20
上 传 者sh-1993
说明:  基于RISC Zero zk计划的基板区块链,具有用于Polkadot APAC黑客马拉松的去中心化证明程序基础设施,
(RISC Zero zk programs based Substrate blockchain with decentralized prover infra for Polkadot APAC hackathon,)

文件列表:
.cargo/ (0, 2023-08-25)
.cargo/config.toml (86, 2023-08-25)
.devcontainer/ (0, 2023-08-25)
.devcontainer/devcontainer.json (635, 2023-08-25)
.editorconfig (229, 2023-08-25)
.vscode/ (0, 2023-08-25)
.vscode/tasks.json (1068, 2023-08-25)
CODEOWNERS (24, 2023-08-25)
Cargo.lock (240721, 2023-08-25)
Cargo.toml (149, 2023-08-25)
Containerfile (905, 2023-08-25)
Dockerfile (1312, 2023-08-25)
LICENSE (918, 2023-08-25)
diagrams/ (0, 2023-08-25)
diagrams/diagram.png (32125, 2023-08-25)
examples/ (0, 2023-08-25)
examples/factors/ (0, 2023-08-25)
examples/factors/Cargo.toml (56, 2023-08-25)
examples/factors/factors/ (0, 2023-08-25)
examples/factors/factors/Cargo.toml (687, 2023-08-25)
examples/factors/factors/metadata.scale (37451, 2023-08-25)
examples/factors/factors/src/ (0, 2023-08-25)
examples/factors/factors/src/main.rs (2362, 2023-08-25)
examples/factors/methods/ (0, 2023-08-25)
examples/factors/methods/Cargo.toml (284, 2023-08-25)
examples/factors/methods/build.rs (638, 2023-08-25)
examples/factors/methods/guest/ (0, 2023-08-25)
examples/factors/methods/guest/Cargo.toml (400, 2023-08-25)
examples/factors/methods/guest/src/ (0, 2023-08-25)
... ...

# Substrate TOEP T - Trustless O - Offchain E - Executable P - Programs zk-provable Offchain Programs Project which features onchain tracking of offchain Rust programs and their execution, which is proven using RISC Zero and whose zkSTARK proofs are verified onchain. ## Key Features - zk-STARK proven execution - Write zk-provable programs in plain Rust - Privacy-preserving - zk prover infrastructure, incentivised through proof market - (Future) Composability of proofs/programs with recursive proofs ![Alt text](https://github.com/justinFrevert/Project-TOEP/blob/master/./diagrams/diagram.png "diagram") ## Project Structure ``` ├── node: contains all code for Substrate chain │ ├── pallets │ │ ├── prover-mgmt: custom pallet for proof verification, program storage, and proof market │ ├── runtime │ ├── node ├── examples: Contains code for example program │ ├── factors: CLI for building and uploading "Factors" example program │ ├── methods: Core logic for example program ├── prover: Prover application for proving one program execution and uploading its proof onchain ``` ## Installation Please follow the setup instructions located on the [Substrate docs site](https://github.com/justinFrevert/Project-TOEP/blob/master/https://docs.substrate.io/install/). Check the setup by running `cargo check` in the directory root. ## Developing Programs The chain supports storing programs and verifying proofs of their execution. The examples serve as a guide for getting started. Note that the code which is executed is considered to be RISC Zero ZKVM code, which is the code whose execution is proven by the ZKVM. See the [RISC Zero docs on this topic](https://github.com/justinFrevert/Project-TOEP/blob/master/https://dev.risczero.com/zkvm/developer-guide/annotated-guest-code) for a full description. With that understanding, development of a program occurs in the same fashion as RISC Zero guest development. The above documentation can also guide on a process for local development for such programs. ### Examples Examples demonstrating how to write an offchain program are included in `./examples`. The current example also uploads the program to the chain, and requests a proof for it. ## Usage instructions This walks through an example workflow which consists of: 1. A program developer writes their program and uploads it to the chain 2. The program developer also submits a request for a proof to be generated for their program 3. A prover notes the request, starts the proving process, generates the proof, and submits it to the chain, fulfilling the request. ### Start the chain Start the chain by building the code `cargo build --release`, and starting the node: `./target/release/node-template --dev`(for docker: follow the steps in `Docker Instructions`) ### Upload program See `./examples` for an example of a provable program. To test uploading the program to the chain, run: ```cargo run``` from `./examples/prover` It will return the `image id`, which is handy for proving later ### Prover Prover nodes can fulfill onchain requests for proofs, or just prove any onchain program. The included proving cli application in `./prover` allows someone to pass an `image_id` of an onchain program, retrieve it, prove it, and upload the resulting proof to fulfill the request. To test, pass a hex-encoded, bincode-serialized image id(just copy the output from the `./examples` local execution) ``` SIGNING_KEY={your signing key} cargo run -- --image-id {your image id} ``` ### Docker Instructions 1. `docker pull vivekvpandya/toep` 2. `docker run -dit --net=host vivekvpandya/toep --dev` 3. connect polkadot.js app on 127.0.0.1:9944

近期下载者

相关文件


收藏者