Skip to content

[DON'T MERGE] gpu prover (0.1.0-rc.11) #99

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: feat/phase1-stable
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
570 changes: 512 additions & 58 deletions Cargo.lock

Large diffs are not rendered by default.

31 changes: 31 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -88,6 +88,37 @@ alloy-primitives = { git = "https://github.com/scroll-tech/alloy-core", branch =
ruint = { git = "https://github.com/scroll-tech/uint.git", branch = "v1.12.3" }
tiny-keccak = { git = "https://github.com/scroll-tech/tiny-keccak", branch = "scroll-patch-v2.0.2-euclid-upgrade" }

[patch."https://github.com/openvm-org/stark-backend.git"]
openvm-stark-backend = { git = "ssh://[email protected]/scroll-tech/openvm-stark-gpu.git", branch = "main", features = ["gpu"] }
openvm-stark-sdk = { git = "ssh://[email protected]/scroll-tech/openvm-stark-gpu.git", branch = "main", features = ["gpu"] }

[patch."https://github.com/Plonky3/Plonky3.git"]
p3-air = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", tag = "v0.1.0" }
p3-field = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", tag = "v0.1.0" }
p3-commit = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", tag = "v0.1.0" }
p3-matrix = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", tag = "v0.1.0" }
p3-baby-bear = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", features = [
"nightly-features",
], tag = "v0.1.0" }
p3-util = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", tag = "v0.1.0" }
p3-challenger = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", tag = "v0.1.0" }
p3-dft = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", tag = "v0.1.0" }
p3-fri = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", tag = "v0.1.0" }
p3-goldilocks = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", tag = "v0.1.0" }
p3-keccak = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", tag = "v0.1.0" }
p3-keccak-air = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", tag = "v0.1.0" }
p3-blake3 = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", tag = "v0.1.0" }
p3-mds = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", tag = "v0.1.0" }
p3-merkle-tree = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", tag = "v0.1.0" }
p3-monty-31 = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", tag = "v0.1.0" }
p3-poseidon = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", tag = "v0.1.0" }
p3-poseidon2 = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", tag = "v0.1.0" }
p3-poseidon2-air = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", tag = "v0.1.0" }
p3-symmetric = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", tag = "v0.1.0" }
p3-uni-stark = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", tag = "v0.1.0" }
p3-maybe-rayon = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", tag = "v0.1.0" } # the "parallel" feature is NOT on by default to allow single-threaded benchmarking
p3-bn254-fr = { git = "ssh://[email protected]/scroll-tech/plonky3-gpu.git", tag = "v0.1.0" }

[profile.maxperf]
inherits = "release"
lto = "fat"
1 change: 1 addition & 0 deletions crates/integration/Cargo.toml
Original file line number Diff line number Diff line change
@@ -20,6 +20,7 @@ openvm-native-compiler = { workspace = true, default-features = false }
openvm-native-recursion = { workspace = true, default-features = false }
openvm-native-transpiler = { workspace = true, default-features = false }
openvm-transpiler = { workspace = true, default-features = false }
openvm-stark-sdk.workspace = true

alloy-primitives.workspace = true
eyre.workspace = true
3 changes: 2 additions & 1 deletion crates/integration/src/lib.rs
Original file line number Diff line number Diff line change
@@ -57,7 +57,7 @@ pub trait ProverTester {
/// Setup directory structure for the test suite.
fn setup() -> eyre::Result<()> {
// Setup tracing subscriber.
setup_logger()?;
// setup_logger()?;

// If user has set an output directory, use it.
let dir_testrun = if let Ok(env_dir) = std::env::var(ENV_OUTPUT_DIR) {
@@ -154,6 +154,7 @@ impl<T: Clone, P: Clone> ProveVerifyOutcome<T, P> {
}

/// Setup test environment
#[allow(dead_code)]
fn setup_logger() -> eyre::Result<()> {
let fmt_layer = tracing_subscriber::fmt::layer()
.pretty()
2 changes: 1 addition & 1 deletion crates/integration/src/testers/chunk.rs
Original file line number Diff line number Diff line change
@@ -52,7 +52,7 @@ impl ProverTester for ChunkProverTester {
}
Err(_) => {
#[cfg(not(feature = "euclidv2"))]
let blocks = 12508460usize..=12508463usize;
let blocks = 10319966usize..=10319974usize;
#[cfg(feature = "euclidv2")]
let blocks = 1usize..=4usize;
blocks
1,185 changes: 1,185 additions & 0 deletions crates/integration/testdata/phase1/witnesses/10319966.json

Large diffs are not rendered by default.

942 changes: 942 additions & 0 deletions crates/integration/testdata/phase1/witnesses/10319967.json

Large diffs are not rendered by default.

1,970 changes: 1,970 additions & 0 deletions crates/integration/testdata/phase1/witnesses/10319968.json

Large diffs are not rendered by default.

913 changes: 913 additions & 0 deletions crates/integration/testdata/phase1/witnesses/10319969.json

Large diffs are not rendered by default.

967 changes: 967 additions & 0 deletions crates/integration/testdata/phase1/witnesses/10319970.json

Large diffs are not rendered by default.

1,301 changes: 1,301 additions & 0 deletions crates/integration/testdata/phase1/witnesses/10319971.json

Large diffs are not rendered by default.

1,164 changes: 1,164 additions & 0 deletions crates/integration/testdata/phase1/witnesses/10319972.json

Large diffs are not rendered by default.

1,654 changes: 1,654 additions & 0 deletions crates/integration/testdata/phase1/witnesses/10319973.json

Large diffs are not rendered by default.

864 changes: 864 additions & 0 deletions crates/integration/testdata/phase1/witnesses/10319974.json

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions crates/integration/tests/chunk_circuit.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use openvm_stark_sdk::bench::run_with_metric_collection;
use scroll_zkvm_integration::{
ProverTester, prove_verify_multi, prove_verify_single,
testers::chunk::{ChunkProverTester, MultiChunkProverTester, read_block_witness_from_testdata},
@@ -140,9 +141,10 @@ fn guest_profiling() -> eyre::Result<()> {
fn setup_prove_verify_single() -> eyre::Result<()> {
ChunkProverTester::setup()?;

prove_verify_single::<ChunkProverTester>(None)?;

Ok(())
run_with_metric_collection("OUTPUT_PATH", || -> eyre::Result<()> {
prove_verify_single::<ChunkProverTester>(None)?;
Ok(())
})
}

#[test]