Skip to content

Commit

Permalink
feat: small program works
Browse files Browse the repository at this point in the history
  • Loading branch information
ratankaliani committed Jan 29, 2025
1 parent 15189fd commit addd253
Show file tree
Hide file tree
Showing 8 changed files with 99 additions and 187 deletions.
82 changes: 10 additions & 72 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ reqwest = { version = "0.12", features = ["json"] }
csv = "1.3.0"
serde = { version = "1.0.198", features = ["derive"] }
serde_json = { version = "1.0.117", default-features = false }
rkyv = { version = "0.8", features = ["bytecheck"] }
rkyv = { version = "0.8", features = ["hashbrown-0_15", "std"] }
hex = "0.4.3"
bincode = "1.3.3"
base64 = "0.22.1"
Expand Down Expand Up @@ -60,6 +60,7 @@ kona-derive = { git = "https://github.com/succinctlabs/kona", rev = "2a038e9", d
kona-driver = { git = "https://github.com/succinctlabs/kona", rev = "2a038e9" }
kona-preimage = { git = "https://github.com/succinctlabs/kona", rev = "2a038e9", features = [
"rkyv",
"serde",
] }
kona-executor = { git = "https://github.com/succinctlabs/kona", rev = "2a038e9" }
kona-proof = { git = "https://github.com/succinctlabs/kona", rev = "2a038e9" }
Expand Down Expand Up @@ -111,7 +112,7 @@ maili-genesis = { version = "=0.1.6", default-features = false }
maili-rpc = { version = "=0.1.6", default-features = false }

# Revm
revm = { version = "19.3.0", default-features = false, features = ["kzg-rs"] }
revm = { version = "19.4.0", default-features = false, features = ["kzg-rs"] }


# sp1
Expand All @@ -120,7 +121,8 @@ sp1-lib = { version = "4.0.0", features = ["verify"] }
# Switch back to crates SP1 SDK after the release that turns off alloy default features is out.
# https://github.com/succinctlabs/sp1/pull/1980
sp1-sdk = { git = "https://github.com/succinctlabs/sp1", branch = "dev" }
sp1-zkvm = { version = "4.0.0", features = ["verify", "embedded"] }
# sp1-zkvm = { version = "4.0.0", features = ["verify", "embedded"] }
sp1-zkvm = { version = "4.0.0", features = ["verify"] }
sp1-build = { version = "4.0.0" }

[profile.release-client-lto]
Expand All @@ -135,5 +137,3 @@ sha2 = { git = "https://github.com/sp1-patches/RustCrypto-hashes", package = "sh
ecdsa = { git = "https://github.com/sp1-patches/signatures", tag = "patch-0.16.9-sp1-4.0.0" }
substrate-bn = { git = "https://github.com/sp1-patches/bn", tag = "patch-0.6.0-sp1-4.0.0" }
sha3 = { git = "https://github.com/sp1-patches/RustCrypto-hashes", package = "sha3", tag = "patch-sha3-0.10.8-sp1-4.0.0" }

# Note: kzg-rs must be on version 0.2.4, https://github.com/bluealloy/revm/pull/2002.
Binary file modified elf/range-elf
Binary file not shown.
2 changes: 0 additions & 2 deletions programs/range/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,8 @@ fn main() {
});
println!("cycle-tracker-end: boot-load");

println!("cycle-tracker-start: oracle-load");
let in_memory_oracle_bytes: Vec<u8> = sp1_zkvm::io::read_vec();
let oracle = Arc::new(InMemoryOracle::from_raw_bytes(in_memory_oracle_bytes));
println!("cycle-tracker-end: oracle-load");

println!("cycle-tracker-report-start: oracle-verify");
oracle.verify().expect("key value verification failed");
Expand Down
6 changes: 3 additions & 3 deletions utils/build/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ fn build_zkvm_program(program: &str) {
BuildArgs {
elf_name: Some(format!("{}-elf", program)),
output_directory: Some("../../elf".to_string()),
docker: true,
tag: "v4.0.0-rc.10".to_string(),
// docker: true,
// tag: "v4.0.0-rc.10".to_string(),
..Default::default()
},
);
Expand All @@ -28,7 +28,7 @@ fn build_zkvm_program(program: &str) {
/// programs.
pub fn build_all() {
// Build range program.
// build_zkvm_program("range");
build_zkvm_program("range");

// Build aggregation program.
// build_zkvm_program("aggregation");
Expand Down
4 changes: 3 additions & 1 deletion utils/client/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#![feature(trivial_bounds)]

mod hasher;
pub use hasher::BytesHasherBuilder;

pub mod boot;
pub use boot::{BootInfoWithBytesConfig, AGGREGATION_OUTPUTS_SIZE};

mod oracle;
pub use oracle::{InMemoryOracle, InMemoryOracleData};
pub use oracle::InMemoryOracle;

pub mod precompiles;

Expand Down
Loading

0 comments on commit addd253

Please sign in to comment.