0xPolygonZero / plonky2

Apache License 2.0
755 stars 278 forks source link

Fix BaseSumGenerator and BaseSplitGenerator Ids #1494

Closed utsavjnn closed 7 months ago

utsavjnn commented 7 months ago

impl_generator_serializer! matches generator Id to get correct types. You would need different Ids for different bases if you wanna use impl_generator_serializer for these generators with different bases. For example if your circuit uses BaseSplitGenerator<2> and BaseSplitGenerator<4> something like the snippet below:

impl_generator_serializer! {
  CustomGeneratorSerializer
  BaseSplitGenerator<2>,
  BaseSplitGenerator<4>
}

would lead to incorrect generation of ProverOnlyCircuitData when reconstructed using ProverOnlyCircuitData::from_bytes(..)

CC: @ultrainstinct30

sonarcloud[bot] commented 7 months ago

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud