Skip to content

Commit

Permalink
feat(halo2_proofs): set format to RawBytesUnchecked by default
Browse files Browse the repository at this point in the history
Tachyon only recognizes the `RawBytesUnchecked` format for serialization.
To ensure compatibility and prevent errors, this commit forces
the format to be set to `RawBytesUnchecked` by default.
  • Loading branch information
chokobole committed Jul 11, 2024
1 parent 0ddaf57 commit b95cf98
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions halo2_proofs/src/plonk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,8 @@ where
C::Scalar: SerdePrimeField + FromUniformBytes<64>,
{
/// Writes a verifying key to a buffer including constraint system.
pub fn write_including_cs<W: io::Write>(
&self,
writer: &mut W,
format: SerdeFormat,
) -> io::Result<()> {
pub fn write_including_cs<W: io::Write>(&self, writer: &mut W) -> io::Result<()> {
let format = SerdeFormat::RawBytesUnchecked;
writer.write_all(&self.domain.k().to_be_bytes())?;
// the `fixed_commitments` here includes selectors
writer.write_all(&(self.fixed_commitments.len() as u32).to_be_bytes())?;
Expand Down Expand Up @@ -355,12 +352,9 @@ where
C::Scalar: SerdePrimeField + FromUniformBytes<64>,
{
/// Writes a proving key to a buffer including constraint system.
pub fn write_including_cs<W: io::Write>(
&self,
writer: &mut W,
format: SerdeFormat,
) -> io::Result<()> {
self.vk.write_including_cs(writer, format)?;
pub fn write_including_cs<W: io::Write>(&self, writer: &mut W) -> io::Result<()> {
let format = SerdeFormat::RawBytesUnchecked;
self.vk.write_including_cs(writer)?;
self.l0.write(writer, format)?;
self.l_last.write(writer, format)?;
self.l_active_row.write(writer, format)?;
Expand Down

0 comments on commit b95cf98

Please sign in to comment.