Skip to content

Commit

Permalink
Prepare for release v0.17.0 (#786)
Browse files Browse the repository at this point in the history
  • Loading branch information
flaub committed Aug 11, 2023
1 parent 0f3f465 commit da5bc39
Show file tree
Hide file tree
Showing 30 changed files with 279 additions and 194 deletions.
30 changes: 16 additions & 14 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[workspace]
resolver = "2"
members = [
"bonsai/ethereum",
"bonsai/ethereum-relay",
"bonsai/rest-api-mock",
"bonsai/sdk",
Expand All @@ -26,26 +27,27 @@ members = [
exclude = ["tools/crates-validator"]

[workspace.package]
version = "0.16.1"
version = "0.17.0"
edition = "2021"
license = "Apache-2.0"
homepage = "https://risczero.com/"
repository = "https://github.com/risc0/risc0/"

[workspace.dependencies]
bonsai-ethereum-relay = { version = "0.2.0", default-features = false, path = "bonsai/ethereum-relay" }
bonsai-rest-api-mock = { version = "0.2.0", default-features = false, path = "bonsai/rest-api-mock" }
bonsai-sdk = { version = "0.2.0", default-features = false, path = "bonsai/sdk" }
risc0-binfmt = { version = "0.16.1", default-features = false, path = "risc0/binfmt" }
risc0-build = { version = "0.16.1", default-features = false, path = "risc0/build" }
risc0-build-kernel = { version = "0.16.1", default-features = false, path = "risc0/build_kernel" }
risc0-circuit-rv32im = { version = "0.16.1", default-features = false, path = "risc0/circuit/rv32im" }
risc0-circuit-rv32im-sys = { version = "0.16.1", default-features = false, path = "risc0/circuit/rv32im-sys" }
risc0-core = { version = "0.16.1", default-features = false, path = "risc0/core" }
risc0-sys = { version = "0.16.1", default-features = false, path = "risc0/sys" }
risc0-zkp = { version = "0.16.1", default-features = false, path = "risc0/zkp" }
risc0-zkvm = { version = "0.16.1", default-features = false, path = "risc0/zkvm" }
risc0-zkvm-platform = { version = "0.16.1", default-features = false, path = "risc0/zkvm/platform" }
bonsai-ethereum-contracts = { version = "0.1.0", path = "bonsai/ethereum" }
bonsai-ethereum-relay = { version = "0.1.0", default-features = false, path = "bonsai/ethereum-relay" }
bonsai-rest-api-mock = { version = "0.1.0", default-features = false, path = "bonsai/rest-api-mock" }
bonsai-sdk = { version = "0.3.0", default-features = false, path = "bonsai/sdk" }
risc0-binfmt = { version = "0.17.0", default-features = false, path = "risc0/binfmt" }
risc0-build = { version = "0.17.0", default-features = false, path = "risc0/build" }
risc0-build-kernel = { version = "0.17.0", default-features = false, path = "risc0/build_kernel" }
risc0-circuit-rv32im = { version = "0.17.0", default-features = false, path = "risc0/circuit/rv32im" }
risc0-circuit-rv32im-sys = { version = "0.17.0", default-features = false, path = "risc0/circuit/rv32im-sys" }
risc0-core = { version = "0.17.0", default-features = false, path = "risc0/core" }
risc0-sys = { version = "0.17.0", default-features = false, path = "risc0/sys" }
risc0-zkp = { version = "0.17.0", default-features = false, path = "risc0/zkp" }
risc0-zkvm = { version = "0.17.0", default-features = false, path = "risc0/zkvm" }
risc0-zkvm-platform = { version = "0.17.0", default-features = false, path = "risc0/zkvm/platform" }

[profile.bench]
lto = true
Expand Down
57 changes: 33 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
[![Discord chat][discord-badge]][discord-url]
[![Twitter][twitter-badge]][twitter-url]

[crates-badge]: https://img.shields.io/badge/crates.io-v0.16-orange
[crates-badge]: https://img.shields.io/badge/crates.io-v0.17-orange
[crates-url]: https://crates.io/crates/risc0-zkvm
[licence-badge]: https://img.shields.io/github/license/risc0/risc0?color=blue
[licence-url]: https://github.com/risc0/risc0/blob/main/LICENSE
Expand Down Expand Up @@ -55,13 +55,13 @@ entry point that runs the code of the method. Additionally, one can compute for
a given method its *image ID* which is a special type of cryptographic hash of
the ELF file, and is required for verification.

Next, the host program runs and proves the method inside the zkVM. The logical RISC-V machine
running inside the zkVM is called the *guest* and the prover running the zkVM is
called the *host*. The guest and the host can communicate with each other
during the execution of the method, but the host cannot modify the execution of
the guest in any way, or the proof being generated will be invalid. During
execution, the guest code can write to a special append-only log called the
*journal* that represents the official output of the computation.
Next, the host program runs and proves the method inside the zkVM. The logical
RISC-V machine running inside the zkVM is called the *guest* and the prover
running the zkVM is called the *host*. The guest and the host can communicate
with each other during the execution of the method, but the host cannot modify
the execution of the guest in any way, or the proof being generated will be
invalid. During execution, the guest code can write to a special append-only log
called the *journal* that represents the official output of the computation.

Presuming the method terminated correctly, a *receipt* is produced, which
provides the proof of correct execution. This receipt consists of 2 parts: the
Expand Down Expand Up @@ -96,19 +96,27 @@ other manner of problems. Caveat emptor.
## Getting Started

To start your own project, you can use our `cargo risczero` tool to write the
initial boilerplate and set up a standard directory structure.
First, [install Rust][install-rust] if you don't already have it, then install the `cargo risczero` tool:
initial boilerplate and set up a standard directory structure. First, [install
Rust][install-rust] if you don't already have it, then install the `cargo
risczero` tool:

```
cargo install cargo-risczero
```

For the above commands to build successfully you will need to have installed the required dependencies. On a Ubuntu system you can install them with:
For the above commands to build successfully you will need to have installed the
required dependencies. On a Ubuntu system you can install them with:

```bash
sudo apt install curl build-essential libssl-dev pkgconf
```

Next we'll need to install the `risc0` toolchain with:

```
cargo risczero install
```

Then, create a new project (named `my_project` in this example):

```
Expand All @@ -126,24 +134,25 @@ structured, and other resources useful to developers new to RISC Zero, see our

| crate | [crates.io] |
| -------------- | ---------------------------------------------------------------------------------------------------- |
| cargo-risczero | [![x](https://img.shields.io/badge/crates.io-v0.16-orange)](https://crates.io/crates/cargo-risczero) |
| risc0-r0vm | [![x](https://img.shields.io/badge/crates.io-v0.16-orange)](https://crates.io/crates/risc0-r0vm) |
| risc0-tools | [![x](https://img.shields.io/badge/crates.io-v0.16-orange)](https://crates.io/crates/risc0-tools) |
| cargo-risczero | [![x](https://img.shields.io/badge/crates.io-v0.17-orange)](https://crates.io/crates/cargo-risczero) |
| risc0-r0vm | [![x](https://img.shields.io/badge/crates.io-v0.17-orange)](https://crates.io/crates/risc0-r0vm) |
| risc0-tools | [![x](https://img.shields.io/badge/crates.io-v0.17-orange)](https://crates.io/crates/risc0-tools) |

## Rust Libraries

| crate | [crates.io] | [docs.rs](https://docs.rs) |
| ------------------------ | -------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| bonsai-sdk | [![x](https://img.shields.io/badge/crates.io-v0.2-orange)](https://crates.io/crates/bonsai-sdk) | [![](https://img.shields.io/docsrs/bonsai-sdk)](https://docs.rs/bonsai-sdk) |
| risc0-build | [![x](https://img.shields.io/badge/crates.io-v0.16-orange)](https://crates.io/crates/risc0-build) | [![](https://img.shields.io/docsrs/risc0-build)](https://docs.rs/risc0-build) |
| risc0-build-kernel | [![x](https://img.shields.io/badge/crates.io-v0.16-orange)](https://crates.io/crates/risc0-build-kernel) | [![](https://img.shields.io/docsrs/risc0-build-kernel)](https://docs.rs/risc0-build-kernel) |
| risc0-circuit-rv32im | [![x](https://img.shields.io/badge/crates.io-v0.16-orange)](https://crates.io/crates/risc0-circuit-rv32im) | [![](https://img.shields.io/docsrs/risc0-circuit-rv32im)](https://docs.rs/risc0-circuit-rv32im) |
| risc0-circuit-rv32im-sys | [![x](https://img.shields.io/badge/crates.io-v0.16-orange)](https://crates.io/crates/risc0-circuit-rv32im-sys) | [![](https://img.shields.io/docsrs/risc0-circuit-rv32im-sys)](https://docs.rs/risc0-circuit-rv32im-sys) |
| risc0-core | [![x](https://img.shields.io/badge/crates.io-v0.16-orange)](https://crates.io/crates/risc0-core) | [![](https://img.shields.io/docsrs/risc0-core)](https://docs.rs/risc0-core) |
| risc0-sys | [![x](https://img.shields.io/badge/crates.io-v0.16-orange)](https://crates.io/crates/risc0-sys) | [![](https://img.shields.io/docsrs/risc0-sys)](https://docs.rs/risc0-sys) |
| risc0-zkp | [![x](https://img.shields.io/badge/crates.io-v0.16-orange)](https://crates.io/crates/risc0-zkp) | [![](https://img.shields.io/docsrs/risc0-zkp)](https://docs.rs/risc0-zkp) |
| risc0-zkvm | [![x](https://img.shields.io/badge/crates.io-v0.16-orange)](https://crates.io/crates/risc0-zkvm) | [![](https://img.shields.io/docsrs/risc0-zkvm)](https://docs.rs/risc0-zkvm) |
| risc0-zkvm-platform | [![x](https://img.shields.io/badge/crates.io-v0.16-orange)](https://crates.io/crates/risc0-zkvm-platform) | [![](https://img.shields.io/docsrs/risc0-zkvm-platform)](https://docs.rs/risc0-zkvm-platform) |
| bonsai-sdk | [![x](https://img.shields.io/badge/crates.io-v0.3-orange)](https://crates.io/crates/bonsai-sdk) | [![](https://img.shields.io/docsrs/bonsai-sdk)](https://docs.rs/bonsai-sdk) |
| risc0-binfmt | [![x](https://img.shields.io/badge/crates.io-v0.17-orange)](https://crates.io/crates/risc0-binfmt) | [![](https://img.shields.io/docsrs/risc0-binfmt)](https://docs.rs/risc0-binfmt) |
| risc0-build | [![x](https://img.shields.io/badge/crates.io-v0.17-orange)](https://crates.io/crates/risc0-build) | [![](https://img.shields.io/docsrs/risc0-build)](https://docs.rs/risc0-build) |
| risc0-build-kernel | [![x](https://img.shields.io/badge/crates.io-v0.17-orange)](https://crates.io/crates/risc0-build-kernel) | [![](https://img.shields.io/docsrs/risc0-build-kernel)](https://docs.rs/risc0-build-kernel) |
| risc0-circuit-rv32im | [![x](https://img.shields.io/badge/crates.io-v0.17-orange)](https://crates.io/crates/risc0-circuit-rv32im) | [![](https://img.shields.io/docsrs/risc0-circuit-rv32im)](https://docs.rs/risc0-circuit-rv32im) |
| risc0-circuit-rv32im-sys | [![x](https://img.shields.io/badge/crates.io-v0.17-orange)](https://crates.io/crates/risc0-circuit-rv32im-sys) | [![](https://img.shields.io/docsrs/risc0-circuit-rv32im-sys)](https://docs.rs/risc0-circuit-rv32im-sys) |
| risc0-core | [![x](https://img.shields.io/badge/crates.io-v0.17-orange)](https://crates.io/crates/risc0-core) | [![](https://img.shields.io/docsrs/risc0-core)](https://docs.rs/risc0-core) |
| risc0-sys | [![x](https://img.shields.io/badge/crates.io-v0.17-orange)](https://crates.io/crates/risc0-sys) | [![](https://img.shields.io/docsrs/risc0-sys)](https://docs.rs/risc0-sys) |
| risc0-zkp | [![x](https://img.shields.io/badge/crates.io-v0.17-orange)](https://crates.io/crates/risc0-zkp) | [![](https://img.shields.io/docsrs/risc0-zkp)](https://docs.rs/risc0-zkp) |
| risc0-zkvm | [![x](https://img.shields.io/badge/crates.io-v0.17-orange)](https://crates.io/crates/risc0-zkvm) | [![](https://img.shields.io/docsrs/risc0-zkvm)](https://docs.rs/risc0-zkvm) |
| risc0-zkvm-platform | [![x](https://img.shields.io/badge/crates.io-v0.17-orange)](https://crates.io/crates/risc0-zkvm-platform) | [![](https://img.shields.io/docsrs/risc0-zkvm-platform)](https://docs.rs/risc0-zkvm-platform) |

## Feature flags

Expand Down
37 changes: 21 additions & 16 deletions bonsai/ethereum-relay/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,51 +1,56 @@
[package]
name = "bonsai-ethereum-relay"
description = "A relayer to integrate Ethereum with Bonsai."
version = "0.2.0"
version = "0.1.0"
edition = { workspace = true }
license = { workspace = true }
homepage = { workspace = true }
repository = { workspace = true }

[package.metadata.release]
release = false

[dependencies]
anyhow = "1.0"
async-trait = "0.1.58"
axum = { version = "0.6.1", features = ["macros", "headers"] }
bincode = "1.3.3"
bonsai-ethereum-contracts = { path = "../ethereum" }
async-trait = "0.1"
axum = { version = "0.6", features = ["macros", "headers"] }
bincode = "1.3"
bonsai-ethereum-contracts = { workspace = true }
bonsai-rest-api-mock = { workspace = true }
bonsai-sdk = { workspace = true, features = ["async"] }
clap = { version = "4.0", features = ["derive", "env"] }
displaydoc = "0.2"
ethers = { version = "2.0", features = ["rustls", "ws", "ethers-solc"] }
ethers-signers = { version = "2.0", features = ["aws"] }
futures = "0.3"
hex = "0.4.3"
hex = "0.4"
hyper = "0.14"
pin-project = "1"
reqwest = { version = "^0.11.18", features = ["stream", "json", "gzip"] }
reqwest = { version = "0.11", features = ["stream", "json", "gzip"] }
risc0-zkvm = { workspace = true }
rusoto_core = { version = "0.48.0", default-features = false, features = ["rustls"] }
rusoto_kms = { version = "0.48.0", default-features = false }
rusoto_core = { version = "0.48", default-features = false, features = [
"rustls",
] }
rusoto_kms = { version = "0.48", default-features = false }
semver = "1.0"
serde = { version = "1.0", default-features = false, features = ["derive"] }
serde_json = "1.0"
snafu = "0.7"
thiserror = "1.0.11"
thiserror = "1.0"
tokio = { version = "1.19", features = ["full", "sync"] }
tokio-stream = "0.1.12"
tokio-stream = "0.1"
tower-http = { version = "0.4", features = ["trace"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
typed-builder = "0.12.0"
utoipa = { version = "3.0.0", features = ["axum_extras", "time", "uuid"] }
utoipa-swagger-ui = { version = "3.0.2", features = ["axum", "debug-embed"] }
validator = { version = "0.16.0", features = ["derive"] }
utoipa = { version = "3.0", features = ["axum_extras", "time", "uuid"] }
utoipa-swagger-ui = { version = "3.0", features = ["axum", "debug-embed"] }
validator = { version = "0.16", features = ["derive"] }

[dev-dependencies]
bincode = "1"
bytemuck = "1.13"
risc0-zkvm-methods = { path = "../../risc0/zkvm/methods", default-features = false }
time = "0.3.11"
uuid = { version = "1.3.1", features = ["v4", "serde"] }
time = "0.3"
uuid = { version = "1.3", features = ["v4", "serde"] }
wiremock = "0.5"
9 changes: 8 additions & 1 deletion bonsai/ethereum/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
[package]
name = "bonsai-ethereum-contracts"
description = "Bonsai Ethereum contracts"
version = "0.1.0"
edition = "2021"
edition = { workspace = true }
license = { workspace = true }
homepage = { workspace = true }
repository = { workspace = true }

[package.metadata.release]
release = false

[build-dependencies]
anyhow = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion bonsai/examples/governance/methods/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ risc0-build = { workspace = true, features = ["guest-list"] }
risc0-zkvm = { workspace = true }

[dev-dependencies]
hex-literal = "0.4.1"
hex-literal = "0.4"

[features]
default = []
Expand Down
9 changes: 5 additions & 4 deletions bonsai/examples/governance/relay/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,22 @@
name = "bonsai-ethereum-relay-cli"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
anyhow = "1.0"
bincode = "1.3"
bonsai-ethereum-relay = { workspace = true }
bonsai-sdk = { workspace = true, features = ["async"] }
bytemuck = "1.13.1"
bytemuck = "1.13"
clap = { version = "4.3", features = ["derive", "env"] }
ethers = { version = "2.0", features = ["rustls", "ws"] }
ethers-signers = { version = "2.0", features = ["aws"] }
hex = "0.4.3"
hex = "0.4"
methods = { workspace = true }
risc0-build = { workspace = true, features = ["guest-list"] }
risc0-zkvm = { workspace = true, default-features = false, features = ["prove"] }
risc0-zkvm = { workspace = true, default-features = false, features = [
"prove",
] }
tokio = { version = "1.19", features = ["full", "sync"] }

[features]
Expand Down
17 changes: 10 additions & 7 deletions bonsai/rest-api-mock/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
[package]
name = "bonsai-rest-api-mock"
description = "An HTTP REST API server to mock the Bonsai-alpha prover interface."
version = "0.2.0"
version = "0.1.0"
edition = { workspace = true }
license = { workspace = true }
homepage = { workspace = true }
repository = { workspace = true }

[package.metadata.release]
release = false

[dependencies]
anyhow = "1.0"
axum = { version = "0.6.1", features = ["macros", "headers"] }
bincode = "1.3.3"
axum = { version = "0.6", features = ["macros", "headers"] }
bincode = "1.3"
bonsai-sdk = { workspace = true }
displaydoc = "0.2"
hex = "0.4.3"
hex = "0.4"
hyper = "0.14"
risc0-zkvm = { workspace = true, features = ["prove"] }
serde = { version = "1.0", default-features = false, features = ["derive"] }
serde_json = "1.0"
thiserror = "1.0.11"
thiserror = "1.0"
tokio = { version = "1.19", features = ["full", "sync"] }
tokio-stream = "0.1.12"
tokio-stream = "0.1"
tower-http = { version = "0.4", features = ["trace"] }
tracing = "0.1.35"
tracing = "0.1"
tracing-subscriber = "0.3"
uuid = { version = "1.4", features = ["v4", "serde"] }

Expand Down
4 changes: 2 additions & 2 deletions bonsai/sdk/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "bonsai-sdk"
description = "Bonsai Software Development Kit"
version = "0.2.0"
version = "0.3.0"
edition = { workspace = true }
license = { workspace = true }
homepage = { workspace = true }
Expand All @@ -14,7 +14,7 @@ thiserror = "1.0"
tokio = { version = "1.19", features = ["full", "sync"], optional = true }

[dev-dependencies]
env_logger = "0.9.0"
env_logger = "0.10"
httpmock = "0.6"
temp-env = "0.3"
uuid = { version = "1.3", features = ["v4"] }
Expand Down

0 comments on commit da5bc39

Please sign in to comment.