Skip to content

Commit 1406c0f

Browse files
authored
fix: fix serialization mismatch on wasm32 (#235)
1 parent 9b7dd34 commit 1406c0f

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

folding-schemes/src/arith/ccs/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,12 @@ impl<F: PrimeField, W: AsRef<[F]>, U: AsRef<[F]>> ArithRelation<W, U> for CCS<F>
110110
impl<F: PrimeField> ArithSerializer for CCS<F> {
111111
fn params_to_le_bytes(&self) -> Vec<u8> {
112112
[
113-
self.l.to_le_bytes(),
114-
self.m.to_le_bytes(),
115-
self.n.to_le_bytes(),
116-
self.t.to_le_bytes(),
117-
self.q.to_le_bytes(),
118-
self.d.to_le_bytes(),
113+
(self.l as u64).to_le_bytes(),
114+
(self.m as u64).to_le_bytes(),
115+
(self.n as u64).to_le_bytes(),
116+
(self.t as u64).to_le_bytes(),
117+
(self.q as u64).to_le_bytes(),
118+
(self.d as u64).to_le_bytes(),
119119
]
120120
.concat()
121121
}

folding-schemes/src/arith/r1cs/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@ impl<F: PrimeField, W: AsRef<[F]>, U: AsRef<[F]>> ArithRelation<W, U> for R1CS<F
9090
impl<F: PrimeField> ArithSerializer for R1CS<F> {
9191
fn params_to_le_bytes(&self) -> Vec<u8> {
9292
[
93-
self.l.to_le_bytes(),
94-
self.A.n_rows.to_le_bytes(),
95-
self.A.n_cols.to_le_bytes(),
93+
(self.l as u64).to_le_bytes(),
94+
(self.A.n_rows as u64).to_le_bytes(),
95+
(self.A.n_cols as u64).to_le_bytes(),
9696
]
9797
.concat()
9898
}

0 commit comments

Comments
 (0)