Skip to content

Commit

Permalink
use improved port branch
Browse files Browse the repository at this point in the history
  • Loading branch information
MaanavKhaitan committed Nov 19, 2024
1 parent b95362b commit 0d66f23
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
10 changes: 5 additions & 5 deletions Cargo.lock

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

8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ alloy-sol-types = { version = "0.7", default-features = false }

clap = { version = "4", features = ["derive"] }

ivm-abi = { git = "https://github.com/InfinityVM/InfinityVM.git", branch = "dylan/sp1-porting" }
ivm-abi = { git = "https://github.com/InfinityVM/InfinityVM.git", branch = "maanav/sp1-porting-improvements" }
# TODO: Update these to main after merging SP1 feature branch
ivm-proto = { git = "https://github.com/InfinityVM/InfinityVM.git", branch = "dylan/sp1-porting" }
ivm-zkvm = { git = "https://github.com/InfinityVM/InfinityVM.git", branch = "dylan/sp1-porting" }
ivm-zkvm-executor = { git = "https://github.com/InfinityVM/InfinityVM.git", branch = "dylan/sp1-porting" }
ivm-proto = { git = "https://github.com/InfinityVM/InfinityVM.git", branch = "maanav/sp1-porting-improvements" }
ivm-zkvm = { git = "https://github.com/InfinityVM/InfinityVM.git", branch = "maanav/sp1-porting-improvements" }
ivm-zkvm-executor = { git = "https://github.com/InfinityVM/InfinityVM.git", branch = "maanav/sp1-porting-improvements" }

k256 = { version = "0.13", default-features = false }

Expand Down
2 changes: 1 addition & 1 deletion contracts/script/Deployer.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ contract Deployer is Script, Utils {

// Set ELF paths
jobManager.setElfPath(
bytes32(0x3bbdaf6d405d7da83f503d17334267694f68d75376768f561b1374917539800f), "programs/elf/square-root"
bytes32(0x3bbdaf6d405d7da83f503d17334267694f68d75376768f561b1374917539800f), "programs/square-root/elf"
);

vm.stopBroadcast();
Expand Down
2 changes: 1 addition & 1 deletion programs/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ fn main() {
for program in programs.clone() {
let args = BuildArgs {
elf_name: program.clone(),
output_directory: "programs/elf".to_string(),
output_directory: format!("programs/{}/elf", program),
..Default::default()
};
build_program_with_args(&program, args);
Expand Down
2 changes: 1 addition & 1 deletion programs/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// The ELF (executable and linkable format) file for the square root program.
pub const SQUARE_ROOT_ELF: &[u8] = include_bytes!("../elf/square-root");
pub const SQUARE_ROOT_ELF: &[u8] = include_bytes!("../square-root/elf/square-root");

#[cfg(test)]
mod tests {
Expand Down
6 changes: 3 additions & 3 deletions zkvm-utils/src/sol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ pub fn generate_solidity_files(program_names: Vec<String>, opts: &Options) -> Re
.map(|name| {
let elf_path = format!("elf/{name}");
let elf = std::fs::read(elf_path).unwrap();
let program_id = ivm_zkvm::Sp1.derive_verifying_key(&elf).unwrap();
let elf_path_sol = format!("programs/elf/{name}");
let program_id = ivm_zkvm::Sp1.derive_program_id(&elf).unwrap();
let elf_path_sol = format!("programs/{name}/elf");
ProgramMetadata {
name: name.clone(),
program_id_hex: hex::encode(program_id),
Expand Down Expand Up @@ -114,7 +114,7 @@ pub fn generate_program_id_sol(programs: &[ProgramMetadata]) -> Result<Vec<u8>>
/// Generate source code for Solidity deploy script for coprocessor contracts
pub fn generate_deploy_script(programs: &[ProgramMetadata]) -> Result<Vec<u8>> {
// Generate the code to set ELF paths
let relative_elf_path_prefix = "programs/elf/";
let relative_elf_path_prefix = "programs/";
let elf_entries: Vec<_> = programs
.iter()
.map(|program| {
Expand Down

0 comments on commit 0d66f23

Please sign in to comment.