jellyfish icon indicating copy to clipboard operation
jellyfish copied to clipboard

[Refactor] Remove unnecessary fields in KZG verifier parameter structs

Open chancharles92 opened this issue 1 year ago • 1 comments

Currently, the SRS and KZG verifier params have fields g, h, and beta_h that can be removed as they can be retrieved from powers_of_g and powers_of_h. https://github.com/EspressoSystems/jellyfish/blob/kzg-multiproof-binyi/primitives/src/pcs/univariate_kzg/srs.rs#L18 https://github.com/EspressoSystems/jellyfish/blob/kzg-multiproof-binyi/primitives/src/pcs/univariate_kzg/srs.rs#L49 (P.S. It's better to expose methods only rather than fields in the future to enable easier maintenance.)

Referenced discussion: https://github.com/EspressoSystems/jellyfish/pull/406#discussion_r1389855533

(cc @alxiong @mrain @ggutoski , not a high-priority task, but we should do it sometime.)

chancharles92 avatar Nov 29 '23 22:11 chancharles92

Yeah agree. We can always add convenient getters like VerifierParam::g() which returns powers_of_g[0].

alxiong avatar Dec 01 '23 09:12 alxiong