Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
chokobole committed Aug 5, 2024
1 parent 9ef178e commit 1869edc
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions halo2_proofs/src/plonk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,19 @@ where
C::ScalarExt: FromUniformBytes<64>,
{
pub fn bytes_length_including_cs(&self) -> usize {
8 + (self.fixed_commitments.len() * C::default().to_bytes().as_ref().len())
let cs_byte_length = self.cs.bytes_length();
println!("cs: {}", cs_byte_length);
println!(
"fixed commitments: {}",
self.fixed_commitments.len() * C::default().to_bytes().as_ref().len()
);
println!("perm verifying key: {}", self.permutation.bytes_length());
let vk = 8
+ (self.fixed_commitments.len() * C::default().to_bytes().as_ref().len())
+ self.permutation.bytes_length()
+ self.cs.bytes_length()
+ self.cs.bytes_length();
println!("vk: {}", vk);
vk
}

fn bytes_length(&self) -> usize {
Expand Down Expand Up @@ -331,13 +341,17 @@ where
/// Gets the total number of bytes in the serialization of `self` including constraint system
pub fn bytes_length_including_cs(&self) -> usize {
let scalar_len: usize = C::Scalar::default().to_repr().as_ref().len();
self.vk.bytes_length_including_cs()
let perm_proving_key = self.permutation.bytes_length();
println!("perm_proving_key: {}", perm_proving_key);
let pk = self.vk.bytes_length_including_cs()
+ 12
+ scalar_len * (self.l0.len() + self.l_last.len() + self.l_active_row.len())
+ polynomial_slice_byte_length(&self.fixed_values)
+ polynomial_slice_byte_length(&self.fixed_polys)
//+ polynomial_slice_byte_length(&self.fixed_cosets)
+ self.permutation.bytes_length()
+ self.permutation.bytes_length();
println!("pk: {}", pk);
pk
}

/// Gets the total number of bytes in the serialization of `self`
Expand Down

0 comments on commit 1869edc

Please sign in to comment.