Skip to content
This repository has been archived by the owner on Feb 21, 2024. It is now read-only.

Commit

Permalink
Fix BaseSumGenerator and BaseSplitGenerator Ids (0xPolygonZero#1494)
Browse files Browse the repository at this point in the history
* fix: different ids for generators with different bases

required for correct serialisation

Signed-off-by: electron-team <[email protected]>

* fixing wasm32 build issue

Signed-off-by: electron-team <[email protected]>

* fix fmt issue

Signed-off-by: electron-team <[email protected]>

---------

Signed-off-by: electron-team <[email protected]>
  • Loading branch information
utsavjnn authored Feb 1, 2024
1 parent f76245e commit 1dc22b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions plonky2/src/gadgets/split_base.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use alloc::string::{String, ToString};
use alloc::vec;
use alloc::string::String;
use alloc::vec::Vec;
use alloc::{format, vec};
use core::borrow::Borrow;

use itertools::Itertools;
Expand Down Expand Up @@ -91,7 +91,7 @@ impl<F: RichField + Extendable<D>, const B: usize, const D: usize> SimpleGenerat
for BaseSumGenerator<B>
{
fn id(&self) -> String {
"BaseSumGenerator".to_string()
format!("BaseSumGenerator + Base: {B}")
}

fn dependencies(&self) -> Vec<Target> {
Expand Down
4 changes: 2 additions & 2 deletions plonky2/src/gates/base_sum.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use alloc::string::{String, ToString};
use alloc::string::String;
use alloc::vec::Vec;
use alloc::{format, vec};
use core::ops::Range;
Expand Down Expand Up @@ -179,7 +179,7 @@ impl<F: RichField + Extendable<D>, const B: usize, const D: usize> SimpleGenerat
for BaseSplitGenerator<B>
{
fn id(&self) -> String {
"BaseSplitGenerator".to_string()
format!("BaseSplitGenerator + Base: {B}")
}

fn dependencies(&self) -> Vec<Target> {
Expand Down

0 comments on commit 1dc22b7

Please sign in to comment.