jellyfish
jellyfish copied to clipboard
[Refactor] Remove unnecessary fields in KZG verifier parameter structs
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.)
Yeah agree. We can always add convenient getters like VerifierParam::g()
which returns powers_of_g[0]
.