Skip to content
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

ci sanity check 2 [do not merge] #2953

Closed
wants to merge 1 commit into from
Closed
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
9 changes: 6 additions & 3 deletions o1vm/src/preimage_oracle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::cannon::{
PREIMAGE_CLIENT_READ_FD, PREIMAGE_CLIENT_WRITE_FD,
};
use command_fds::{CommandFdExt, FdMapping};
use log::debug;
//use log::debug;
use os_pipe::{PipeReader, PipeWriter};
use std::{
io::{Read, Write},
Expand All @@ -20,7 +20,9 @@ pub struct PreImageOracle {
}

pub trait PreImageOracleT {
fn get_preimage(&mut self, key: [u8; 32]) -> Preimage;
fn get_preimage(&mut self, key: [u8; 32]) -> Preimage {
panic!("This function is not being used {}", hex::encode(key))
}

fn hint(&mut self, hint: Hint);
}
Expand Down Expand Up @@ -166,6 +168,7 @@ impl PreImageOracleT for PreImageOracle {
// +---------------------------------+
// a. a 64-bit integer indicating the length of the actual data
// b. the preimage data, with a size of <length> bits
/*
fn get_preimage(&mut self, key: [u8; 32]) -> Preimage {
let RW(ReadWrite { reader, writer }) = &mut self.oracle_client;

Expand Down Expand Up @@ -195,7 +198,7 @@ impl PreImageOracleT for PreImageOracle {
assert_eq!(preimage.len(), length as usize);

Preimage::create(preimage)
}
} */

// The hint protocol goes as follows:
// 1. Write a hint request with the following byte-stream format
Expand Down
Loading