Skip to content

Commit d4f1e7d

Browse files
committed
move out types-circuit
Signed-off-by: noelwei <[email protected]>
1 parent 9801992 commit d4f1e7d

File tree

6 files changed

+1
-196
lines changed

6 files changed

+1
-196
lines changed

Cargo.lock

Lines changed: 0 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
members = [
33
"common/types-rs",
44
"common/types-rs/base",
5-
"common/types-rs/circuit",
65
"common/types-rs/aggregation",
76
"common/types-rs/chunk",
87
"common/types-rs/batch",

common/types-rs/aggregation/src/lib.rs

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -71,37 +71,7 @@ impl From<&ArchivedProgramCommitment> for ProgramCommitment {
7171
/// Number of public-input values, i.e. [u32; N].
7272
///
7373
/// Note that the actual value for each u32 is a byte.
74-
const NUM_PUBLIC_VALUES: usize = 32;
75-
76-
/// Verify a root proof. The real "proof" will be loaded from StdIn.
77-
pub fn verify_proof(commitment: &ProgramCommitment, public_inputs: &[u32]) {
78-
// Sanity check for the number of public-input values.
79-
assert_eq!(public_inputs.len(), NUM_PUBLIC_VALUES);
80-
81-
// Extend the public-input values by prepending the commitments to the root verifier's exe and
82-
// leaf.
83-
let mut extended_public_inputs = vec![];
84-
extended_public_inputs.extend(commitment.exe);
85-
extended_public_inputs.extend(commitment.leaf);
86-
extended_public_inputs.extend_from_slice(public_inputs);
87-
// Pass through kernel and verify against root verifier's ASM.
88-
exec_kernel(extended_public_inputs.as_ptr());
89-
}
90-
91-
fn exec_kernel(_pi_ptr: *const u32) {
92-
// reserve x29, x30, x31 for kernel
93-
let mut _buf1: u32 = 0;
94-
let mut _buf2: u32 = 0;
95-
#[cfg(all(target_os = "zkvm", target_arch = "riscv32"))]
96-
unsafe {
97-
std::arch::asm!(
98-
include_str!("../../../build-guest/root_verifier.asm"),
99-
in("x29") _pi_ptr,
100-
inout("x30") _buf1,
101-
inout("x31") _buf2,
102-
)
103-
}
104-
}
74+
pub const NUM_PUBLIC_VALUES: usize = 32;
10575

10676
/// Witness for an [`AggregationCircuit`][AggCircuit] that also carries proofs that are being
10777
/// aggregated.

common/types-rs/circuit/Cargo.toml

Lines changed: 0 additions & 19 deletions
This file was deleted.

common/types-rs/circuit/src/io.rs

Lines changed: 0 additions & 33 deletions
This file was deleted.

common/types-rs/circuit/src/lib.rs

Lines changed: 0 additions & 97 deletions
This file was deleted.

0 commit comments

Comments
 (0)