You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.
For IsZero gadget, we defined IsZeroConfig, IsZeroChip, and IsZeroInstruction. For BatchedIsZero gadget, we defined BatchedIsZeroChip and BatchedIsZeroConfig.
For each case, we can collect all relevant methods and keep only XConfig struct in the gadget. The rests are redundant abstractions.
So that eventually we will have only IsZeroConfig and BatchedIsZeroConfig
For the IsZero gadget. The Chip trait did nothing really interesting.
For the BatchIsZero gadget. We don't even implement Chip trait for it.
I didn't make it clear in my #1397 (comment).
What I mean is I couldn't find any xxxCircuitConfig struct having xxxChip defined member fields. Take StateCircuitConfig as example,
So, if we declare push_data_left_is_zero in IsZeroConfig type in #1397, it's more consistent to me but it's not a big issue. Besides, I guess we need to decide if we need xxxChip first.
As for this issue, found something interesting while I went through all the gadgets,
under gadgets/src/, except evm_word.rs, other gadgets implement both xxxChip and xxxConfig (evm_word.rs only has WordConfig). WordConfig has configure and assign_word, but those methods are only available in xxxChip in other files.
some of gadgets in zkevm-circuits/src/state_circuit implement both xxxConfig and xxxChip but LexicographicOrderingConfig doesn't have xxxChip.
I think we need a rule for gadgets implementation, either having both xxxChip and xxxConfig (follow Halo2's practice) or make it simple, just having xxxConfig. I don't have any strong opions on either one.
For IsZero gadget, we defined
IsZeroConfig
,IsZeroChip
, andIsZeroInstruction
. For BatchedIsZero gadget, we defined BatchedIsZeroChip and BatchedIsZeroConfig.For each case, we can collect all relevant methods and keep only XConfig struct in the gadget. The rests are redundant abstractions.
So that eventually we will have only
IsZeroConfig
andBatchedIsZeroConfig
IsZero
gadget. TheChip
trait did nothing really interesting.BatchIsZero
gadget. We don't even implementChip
trait for it.Originally posted by @ChihChengLiang in #1397 (comment)
The text was updated successfully, but these errors were encountered: