diff --git a/.github/workflows/lint-and-test.yml b/.github/workflows/lint-and-test.yml index d3a21d6ce..e5c92b1b3 100644 --- a/.github/workflows/lint-and-test.yml +++ b/.github/workflows/lint-and-test.yml @@ -104,10 +104,16 @@ jobs: run: cargo test -p proof-of-sql --no-run --no-default-features --features="std" - name: Run cargo test (proof primitives - Dory) (std feature only - i.e. not using blitzar) run: cargo test proof_primitive::dory::dory_compute_commitments_test --no-default-features --features="std" - - name: Run hello_world example - run: cargo run --example hello_world --features="blitzar test" - - name: Run posql_db example + - name: Run hello_world example (With Blitzar) + run: cargo run --example hello_world --features="test" + - name: Run hello_world example (Without Blitzar and With Rayon) + run: cargo run --example hello_world --no-default-features --features="rayon test" + - name: Run hello_world example (Without Blitzar and Without Rayon) + run: cargo run --example hello_world --no-default-features --features="test" + - name: Run posql_db example (With Blitzar) run: bash crates/proof-of-sql/examples/posql_db/run_example.sh + - name: Run posql_db example (Without Blitzar) + run: bash crates/proof-of-sql/examples/posql_db/run_example.sh --no-default-features --features="rayon" clippy: name: Clippy diff --git a/crates/proof-of-sql/README.md b/crates/proof-of-sql/README.md index be1254a6e..21fc50cb3 100644 --- a/crates/proof-of-sql/README.md +++ b/crates/proof-of-sql/README.md @@ -73,8 +73,13 @@ The "Hello World" example demonstrates generating and verifying a proof of the q #### Run ```bash -cargo run --example hello_world +cargo run --example hello_world ``` +> [!NOTE] +> To run this example without the `blitzar` (i.e CPU only) feature: +> ```bash +> cargo run --example hello_world --no-default-features --features="rayon test" +> ``` #### Output diff --git a/crates/proof-of-sql/examples/hello_world/README.md b/crates/proof-of-sql/examples/hello_world/README.md index 038f64334..dacbe439e 100644 --- a/crates/proof-of-sql/examples/hello_world/README.md +++ b/crates/proof-of-sql/examples/hello_world/README.md @@ -12,9 +12,15 @@ This example demonstrates generating and verifying a proof of the query `SELECT #### Run ```bash -cargo run --example hello_world +cargo run --example hello_world ``` +> [!NOTE] +> To run this example without the `blitzar` (i.e CPU only) feature: +> ```bash +> cargo run --example hello_world --no-default-features --features="test rayon" +> ``` + #### Output ``` @@ -25,4 +31,4 @@ Generating Proof... 467.45371ms Verifying Proof... 7.106864ms Valid proof! Query result: OwnedTable { table: {Identifier { name: "b" }: VarChar(["hello", "world"])} } -``` \ No newline at end of file +``` diff --git a/crates/proof-of-sql/examples/posql_db/README.md b/crates/proof-of-sql/examples/posql_db/README.md index d64b81071..6774b5eea 100644 --- a/crates/proof-of-sql/examples/posql_db/README.md +++ b/crates/proof-of-sql/examples/posql_db/README.md @@ -5,6 +5,12 @@ Example demonstrating an implementation of a simple csv-backed database with Pro ## Install Run `cargo install --example posql_db --path crates/proof-of-sql` to install the example. +> [!NOTE] +> To run this example without the `blitzar` (i.e CPU only )feature +> ```bash +> cargo install --example posql_db --path crates/proof-of-sql --no-default-features --features="rayon" +> ``` + ## Quick Start Exmaple Run the following ```bash diff --git a/crates/proof-of-sql/examples/posql_db/run_example.sh b/crates/proof-of-sql/examples/posql_db/run_example.sh index 133aea220..f77dd8bd8 100644 --- a/crates/proof-of-sql/examples/posql_db/run_example.sh +++ b/crates/proof-of-sql/examples/posql_db/run_example.sh @@ -1,5 +1,5 @@ cd crates/proof-of-sql/examples/posql_db -cargo run --features="arrow " --example posql_db create -t sxt.table -c a,b -d BIGINT,VARCHAR -cargo run --features="arrow " --example posql_db append -t sxt.table -f hello_world.csv -cargo run --features="arrow " --example posql_db prove -q "SELECT b FROM sxt.table WHERE a = 2" -f hello.proof -cargo run --features="arrow " --example posql_db verify -q "SELECT b FROM sxt.table WHERE a = 2" -f hello.proof \ No newline at end of file +cargo run --features="arrow" "$@" --example posql_db create -t sxt.table -c a,b -d BIGINT,VARCHAR +cargo run --features="arrow" "$@" --example posql_db append -t sxt.table -f hello_world.csv +cargo run --features="arrow" "$@" --example posql_db prove -q "SELECT b FROM sxt.table WHERE a = 2" -f hello.proof +cargo run --features="arrow" "$@" --example posql_db verify -q "SELECT b FROM sxt.table WHERE a = 2" -f hello.proof