Create the Project File
A closer Look at the W3bstream Project File
The W3bstream project file includes all the necessary code and configurations for a W3bstream node to correctly serve your DePIN project with data computation and on-chain proof submission. When deploying a W3bstream project you are in fact deploying a project file and linking it to your Project ID in the W3bstream contracts.
Below is an example of a W3bstream project file:
Explanation
The W3bstream project file is in fact an array of configurations. Each configuration in the array allows you to define different settings for various provers and outputs, enabling flexibility in how W3bstream handles proofs and integrates with other components.
defaultVersion: The default version of the configuration to be used.
versions: An array of all available W3bstream configurations for the project. Each configuration includes:
vmType: The type of prover (e.g., halo2, risc0, zkwasm, with more types in the future).
output: Defines where the proof should be written.
version: The version number of this configuration.
code: The actual code of the prover if it's a ZK prover. Zlib compressed and hex encoded.
Create a configuration for your project
A W3bstream project file with a valid configuration can be easily generated using the ioctl CLI for various types of provers. After generation, the configuration can be manually finalized by adding receiver contract details, version numbers, and other necessary information.
Risc Zero provers
To generate a W3bstream project file for a Risc Zero prover using a Postgres database as the Data Availability (DA) Layer, use the following ioctl command:
Make sure to:
Configure DA Layer Credentials: Ensure the Postgres database credentials are correct.
Customize File Paths: Set the path to your
methods.rs
file appropriately.Customize Project File Name: Change the project file name (e.g.,
10001
) as needed.Match
image_id
andelf
Fields: Ensure theimage_id
andelf
fields in the command match the values in yourmethods.rs
file.
Halo2 Provers
For a Halo2 prover, use the command below:
zkWASM Provers
For a zkWASM prover, use the command below:
Last updated